Geant4  10.02.p03
G4ParticleHPInelastic Class Reference

#include <G4ParticleHPInelastic.hh>

Inheritance diagram for G4ParticleHPInelastic:
Collaboration diagram for G4ParticleHPInelastic:

Public Member Functions

 G4ParticleHPInelastic (G4ParticleDefinition *projectile=G4Neutron::Neutron(), const char *name="NeutronHPInelastic")
 
 ~G4ParticleHPInelastic ()
 
G4HadFinalStateApplyYourself (const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
 
virtual const std::pair< G4double, G4doubleGetFatalEnergyCheckLevels () const
 
G4int GetVerboseLevel () const
 
void SetVerboseLevel (G4int)
 
void BuildPhysicsTable (const G4ParticleDefinition &)
 
virtual void ModelDescription (std::ostream &outFile) const
 
- Public Member Functions inherited from G4HadronicInteraction
 G4HadronicInteraction (const G4String &modelName="HadronicModel")
 
virtual ~G4HadronicInteraction ()
 
virtual G4double SampleInvariantT (const G4ParticleDefinition *p, G4double plab, G4int Z, G4int A)
 
virtual G4bool IsApplicable (const G4HadProjectile &, G4Nucleus &)
 
G4double GetMinEnergy () const
 
G4double GetMinEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMinEnergy (G4double anEnergy)
 
void SetMinEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMinEnergy (G4double anEnergy, const G4Material *aMaterial)
 
G4double GetMaxEnergy () const
 
G4double GetMaxEnergy (const G4Material *aMaterial, const G4Element *anElement) const
 
void SetMaxEnergy (const G4double anEnergy)
 
void SetMaxEnergy (G4double anEnergy, const G4Element *anElement)
 
void SetMaxEnergy (G4double anEnergy, const G4Material *aMaterial)
 
const G4HadronicInteractionGetMyPointer () const
 
const G4StringGetModelName () const
 
void DeActivateFor (const G4Material *aMaterial)
 
void ActivateFor (const G4Material *aMaterial)
 
void DeActivateFor (const G4Element *anElement)
 
void ActivateFor (const G4Element *anElement)
 
G4bool IsBlocked (const G4Material *aMaterial) const
 
G4bool IsBlocked (const G4Element *anElement) const
 
void SetRecoilEnergyThreshold (G4double val)
 
G4double GetRecoilEnergyThreshold () const
 
G4bool operator== (const G4HadronicInteraction &right) const
 
G4bool operator!= (const G4HadronicInteraction &right) const
 
virtual std::pair< G4double, G4doubleGetEnergyMomentumCheckLevels () const
 
void SetEnergyMomentumCheckLevels (G4double relativeLevel, G4double absoluteLevel)
 

Protected Attributes

std::vector< G4ParticleHPChannelList * > * theInelastic
 
G4String dirName
 
G4int numEle
 
- Protected Attributes inherited from G4HadronicInteraction
G4HadFinalState theParticleChange
 
G4int verboseLevel
 
G4double theMinEnergy
 
G4double theMaxEnergy
 
G4bool isBlocked
 

Private Attributes

G4ParticleDefinitiontheProjectile
 

Additional Inherited Members

- Protected Member Functions inherited from G4HadronicInteraction
void SetModelName (const G4String &nam)
 
G4bool IsBlocked () const
 
void Block ()
 

Detailed Description

Definition at line 89 of file G4ParticleHPInelastic.hh.

Constructor & Destructor Documentation

◆ G4ParticleHPInelastic()

G4ParticleHPInelastic::G4ParticleHPInelastic ( G4ParticleDefinition projectile = G4Neutron::Neutron(),
const char *  name = "NeutronHPInelastic" 
)

Definition at line 47 of file G4ParticleHPInelastic.cc.

49  ,theInelastic(NULL)
50  ,numEle(0)
51  ,theProjectile(projectile)
52 {
53  const char* dataDirVariable;
55  dataDirVariable = "G4NEUTRONHPDATA";
56  }else if( theProjectile == G4Proton::Proton() ) {
57  dataDirVariable = "G4PROTONHPDATA";
58  }else if( theProjectile == G4Deuteron::Deuteron() ) {
59  dataDirVariable = "G4DEUTERONHPDATA";
60  }else if( theProjectile == G4Triton::Triton() ) {
61  dataDirVariable = "G4TRITONHPDATA";
62  }else if( theProjectile == G4He3::He3() ) {
63  dataDirVariable = "G4HE3HPDATA";
64  }else if( theProjectile == G4Alpha::Alpha() ) {
65  dataDirVariable = "G4ALPHAHPDATA";
66  } else {
67  G4String message("G4ParticleHPInelastic may only be called for neutron, proton, deuteron, triton, He3 or alpha, while it is called for " + theProjectile->GetParticleName());
68  throw G4HadronicException(__FILE__, __LINE__,message.c_str());
69  }
70 
71  SetMinEnergy( 0.0 );
72  SetMaxEnergy( 20.*MeV );
73 
74 // G4cout << " entering G4ParticleHPInelastic constructor"<<G4endl;
75  if(!getenv(dataDirVariable)){
76  G4String message("Please set the environement variable " + G4String(dataDirVariable) + " to point to the " + theProjectile->GetParticleName() + " cross-section files.");
77  throw G4HadronicException(__FILE__, __LINE__,message.c_str());
78  }
79  dirName = getenv(dataDirVariable);
80  G4cout << dirName << G4endl;
81 
82  G4String tString = "/Inelastic";
83  dirName = dirName + tString;
84  //numEle = G4Element::GetNumberOfElements();
85 
86  G4cout << "@@@ G4ParticleHPInelastic instantiated for particle " << theProjectile->GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
87 
88 /*
89  theInelastic = new G4ParticleHPChannelList[numEle];
90  for (G4int i=0; i<numEle; i++)
91  {
92  theInelastic[i].Init((*(G4Element::GetElementTable()))[i], dirName);
93  G4int itry = 0;
94  do
95  {
96  theInelastic[i].Register(&theNFS, "F01"); // has
97  theInelastic[i].Register(&theNXFS, "F02");
98  theInelastic[i].Register(&the2NDFS, "F03");
99  theInelastic[i].Register(&the2NFS, "F04"); // has, E Done
100  theInelastic[i].Register(&the3NFS, "F05"); // has, E Done
101  theInelastic[i].Register(&theNAFS, "F06");
102  theInelastic[i].Register(&theN3AFS, "F07");
103  theInelastic[i].Register(&the2NAFS, "F08");
104  theInelastic[i].Register(&the3NAFS, "F09");
105  theInelastic[i].Register(&theNPFS, "F10");
106  theInelastic[i].Register(&theN2AFS, "F11");
107  theInelastic[i].Register(&the2N2AFS, "F12");
108  theInelastic[i].Register(&theNDFS, "F13");
109  theInelastic[i].Register(&theNTFS, "F14");
110  theInelastic[i].Register(&theNHe3FS, "F15");
111  theInelastic[i].Register(&theND2AFS, "F16");
112  theInelastic[i].Register(&theNT2AFS, "F17");
113  theInelastic[i].Register(&the4NFS, "F18"); // has, E Done
114  theInelastic[i].Register(&the2NPFS, "F19");
115  theInelastic[i].Register(&the3NPFS, "F20");
116  theInelastic[i].Register(&theN2PFS, "F21");
117  theInelastic[i].Register(&theNPAFS, "F22");
118  theInelastic[i].Register(&thePFS, "F23");
119  theInelastic[i].Register(&theDFS, "F24");
120  theInelastic[i].Register(&theTFS, "F25");
121  theInelastic[i].Register(&theHe3FS, "F26");
122  theInelastic[i].Register(&theAFS, "F27");
123  theInelastic[i].Register(&the2AFS, "F28");
124  theInelastic[i].Register(&the3AFS, "F29");
125  theInelastic[i].Register(&the2PFS, "F30");
126  theInelastic[i].Register(&thePAFS, "F31");
127  theInelastic[i].Register(&theD2AFS, "F32");
128  theInelastic[i].Register(&theT2AFS, "F33");
129  theInelastic[i].Register(&thePDFS, "F34");
130  theInelastic[i].Register(&thePTFS, "F35");
131  theInelastic[i].Register(&theDAFS, "F36");
132  theInelastic[i].RestartRegistration();
133  itry++;
134  }
135  //while(!theInelastic[i].HasDataInAnyFinalState());
136  while( !theInelastic[i].HasDataInAnyFinalState() && itry < 6 );
137  // 6 is corresponding to the value(5) of G4ParticleHPChannel. TK
138 
139  if ( itry == 6 )
140  {
141  // No Final State at all.
142  G4bool exceptional = false;
143  if ( (*(G4Element::GetElementTable()))[i]->GetNumberOfIsotopes() == 1 )
144  {
145  if ( (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetZ() == 1 && (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetN() == 1 ) exceptional = true; //1H
146  }
147  if ( !exceptional ) throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this element");
148  }
149  }
150 */
151 /*
152  for (G4int i=0; i<numEle; i++)
153  {
154  theInelastic.push_back( new G4ParticleHPChannelList );
155  (*theInelastic[i]).Init((*(G4Element::GetElementTable()))[i], dirName, theProjectile);
156  G4int itry = 0;
157  do
158  {
159  (*theInelastic[i]).Register(&theNFS, "F01"); // has
160  (*theInelastic[i]).Register(&theNXFS, "F02");
161  (*theInelastic[i]).Register(&the2NDFS, "F03");
162  (*theInelastic[i]).Register(&the2NFS, "F04"); // has, E Done
163  (*theInelastic[i]).Register(&the3NFS, "F05"); // has, E Done
164  (*theInelastic[i]).Register(&theNAFS, "F06");
165  (*theInelastic[i]).Register(&theN3AFS, "F07");
166  (*theInelastic[i]).Register(&the2NAFS, "F08");
167  (*theInelastic[i]).Register(&the3NAFS, "F09");
168  (*theInelastic[i]).Register(&theNPFS, "F10");
169  (*theInelastic[i]).Register(&theN2AFS, "F11");
170  (*theInelastic[i]).Register(&the2N2AFS, "F12");
171  (*theInelastic[i]).Register(&theNDFS, "F13");
172  (*theInelastic[i]).Register(&theNTFS, "F14");
173  (*theInelastic[i]).Register(&theNHe3FS, "F15");
174  (*theInelastic[i]).Register(&theND2AFS, "F16");
175  (*theInelastic[i]).Register(&theNT2AFS, "F17");
176  (*theInelastic[i]).Register(&the4NFS, "F18"); // has, E Done
177  (*theInelastic[i]).Register(&the2NPFS, "F19");
178  (*theInelastic[i]).Register(&the3NPFS, "F20");
179  (*theInelastic[i]).Register(&theN2PFS, "F21");
180  (*theInelastic[i]).Register(&theNPAFS, "F22");
181  (*theInelastic[i]).Register(&thePFS, "F23");
182  (*theInelastic[i]).Register(&theDFS, "F24");
183  (*theInelastic[i]).Register(&theTFS, "F25");
184  (*theInelastic[i]).Register(&theHe3FS, "F26");
185  (*theInelastic[i]).Register(&theAFS, "F27");
186  (*theInelastic[i]).Register(&the2AFS, "F28");
187  (*theInelastic[i]).Register(&the3AFS, "F29");
188  (*theInelastic[i]).Register(&the2PFS, "F30");
189  (*theInelastic[i]).Register(&thePAFS, "F31");
190  (*theInelastic[i]).Register(&theD2AFS, "F32");
191  (*theInelastic[i]).Register(&theT2AFS, "F33");
192  (*theInelastic[i]).Register(&thePDFS, "F34");
193  (*theInelastic[i]).Register(&thePTFS, "F35");
194  (*theInelastic[i]).Register(&theDAFS, "F36");
195  (*theInelastic[i]).RestartRegistration();
196  itry++;
197  }
198  while( !(*theInelastic[i]).HasDataInAnyFinalState() && itry < 6 );
199  // 6 is corresponding to the value(5) of G4ParticleHPChannel. TK
200 
201  if ( itry == 6 )
202  {
203  // No Final State at all.
204  G4bool exceptional = false;
205  if ( (*(G4Element::GetElementTable()))[i]->GetNumberOfIsotopes() == 1 )
206  {
207  if ( (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetZ() == 1 && (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetN() == 1 ) exceptional = true; //1H
208  }
209  if ( !exceptional ) {
210  G4cerr << " ELEMENT Z " << (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetZ() << " N " << (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetN() << G4endl; //1H
211 throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this element");
212  }
213  }
214 
215  }
216 */
217 
218  }
static const double MeV
Definition: G4SIunits.hh:211
G4ParticleDefinition * theProjectile
G4String name
Definition: TRTMaterials.hh:40
void SetMinEnergy(G4double anEnergy)
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
std::vector< G4ParticleHPChannelList * > * theInelastic
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4Proton * Proton()
Definition: G4Proton.cc:93
G4HadronicInteraction(const G4String &modelName="HadronicModel")
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
void SetMaxEnergy(const G4double anEnergy)
#define G4endl
Definition: G4ios.hh:61
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4He3 * He3()
Definition: G4He3.cc:94
Here is the call graph for this function:

◆ ~G4ParticleHPInelastic()

G4ParticleHPInelastic::~G4ParticleHPInelastic ( )

Definition at line 220 of file G4ParticleHPInelastic.cc.

221  {
222 // delete [] theInelastic;
223  if ( theInelastic != NULL ) {
224  for ( std::vector<G4ParticleHPChannelList*>::iterator
225  it = theInelastic->begin() ; it != theInelastic->end() ; it++ ) {
226  delete *it;
227  }
228  theInelastic->clear();
229  }
230  }
std::vector< G4ParticleHPChannelList * > * theInelastic

Member Function Documentation

◆ ApplyYourself()

G4HadFinalState * G4ParticleHPInelastic::ApplyYourself ( const G4HadProjectile aTrack,
G4Nucleus aTargetNucleus 
)
virtual

Implements G4HadronicInteraction.

Definition at line 234 of file G4ParticleHPInelastic.cc.

235  {
237  const G4Material * theMaterial = aTrack.GetMaterial();
238  G4int n = theMaterial->GetNumberOfElements();
239  G4int index = theMaterial->GetElement(0)->GetIndex();
240  G4int it=0;
241  if(n!=1)
242  {
243  G4double* xSec = new G4double[n];
244  G4double sum=0;
245  G4int i;
246  const G4double * NumAtomsPerVolume = theMaterial->GetVecNbOfAtomsPerVolume();
247  G4double rWeight;
248  G4ParticleHPThermalBoost aThermalE;
249  for (i=0; i<n; i++)
250  {
251  index = theMaterial->GetElement(i)->GetIndex();
252  rWeight = NumAtomsPerVolume[i];
253  if ( aTrack.GetDefinition() == G4Neutron::Neutron() ) {
254  xSec[i] = ((*theInelastic)[index])->GetXsec(aThermalE.GetThermalEnergy(aTrack,
255  theMaterial->GetElement(i),
256  theMaterial->GetTemperature()));
257  } else {
258  xSec[i] = ((*theInelastic)[index])->GetXsec(aTrack.GetKineticEnergy());
259  }
260  xSec[i] *= rWeight;
261  sum+=xSec[i];
262 #ifdef G4PHPDEBUG
263  if( getenv("G4ParticleHPDebug") ) G4cout << " G4ParticleHPInelastic XSEC ELEM " << i << " = " << xSec[i] << G4endl;
264 #endif
265 
266  }
267  G4double random = G4UniformRand();
268  G4double running = 0;
269  for (i=0; i<n; i++)
270  {
271  running += xSec[i];
272  index = theMaterial->GetElement(i)->GetIndex();
273  it = i;
274  //if(random<=running/sum) break;
275  if( sum == 0 || random<=running/sum) break;
276  }
277  delete [] xSec;
278  }
279 
280 #ifdef G4PHPDEBUG
281  if( getenv("G4ParticleHPDebug") ) G4cout << " G4ParticleHPInelastic SELECTED ELEM " << it << " = " << theMaterial->GetElement(it)->GetName() << " FROM MATERIAL " << theMaterial->GetName() << G4endl;
282 #endif
283  //return theInelastic[index].ApplyYourself(theMaterial->GetElement(it), aTrack);
284  G4HadFinalState* result = ((*theInelastic)[index])->ApplyYourself(theMaterial->GetElement(it), aTrack);
285  //
286  aNucleus.SetParameters(G4ParticleHPManager::GetInstance()->GetReactionWhiteBoard()->GetTargA(),G4ParticleHPManager::GetInstance()->GetReactionWhiteBoard()->GetTargZ());
287  const G4Element* target_element = (*G4Element::GetElementTable())[index];
288  const G4Isotope* target_isotope=NULL;
289  G4int iele = target_element->GetNumberOfIsotopes();
290  for ( G4int j = 0 ; j != iele ; j++ ) {
291  target_isotope=target_element->GetIsotope( j );
292  if ( target_isotope->GetN() == G4ParticleHPManager::GetInstance()->GetReactionWhiteBoard()->GetTargA() ) break;
293  }
294  //G4cout << "Target Material of this reaction is " << theMaterial->GetName() << G4endl;
295  //G4cout << "Target Element of this reaction is " << target_element->GetName() << G4endl;
296  //G4cout << "Target Isotope of this reaction is " << target_isotope->GetName() << G4endl;
297  aNucleus.SetIsotope( target_isotope );
298 
300 
301  //GDEB
302  if( getenv("G4PHPTEST") ) {
303  G4HadSecondary* seco = result->GetSecondary(0);
304  if(seco) {
305  G4ThreeVector secoMom = seco->GetParticle()->GetMomentum();
306  G4cout << " G4ParticleHPinelastic COS THETA " << std::cos(secoMom.theta()) <<" " << secoMom << G4endl;
307  }
308  }
309 
310  return result;
311  }
static G4ParticleHPManager * GetInstance()
const G4Isotope * GetIsotope(G4int iso) const
Definition: G4Element.hh:169
const G4Material * GetMaterial() const
G4HadSecondary * GetSecondary(size_t i)
Int_t index
size_t GetIndex() const
Definition: G4Element.hh:181
int G4int
Definition: G4Types.hh:78
size_t GetNumberOfIsotopes() const
Definition: G4Element.hh:158
Char_t n[5]
G4ThreeVector GetMomentum() const
#define G4UniformRand()
Definition: Randomize.hh:97
G4GLOB_DLL std::ostream G4cout
double theta() const
const G4double * GetVecNbOfAtomsPerVolume() const
Definition: G4Material.hh:206
const G4Element * GetElement(G4int iel) const
Definition: G4Material.hh:202
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
G4double GetTemperature() const
Definition: G4Material.hh:182
G4double GetThermalEnergy(const G4HadProjectile &aP, const G4Element *anE, G4double aT)
const G4ParticleDefinition * GetDefinition() const
const G4String & GetName() const
Definition: G4Element.hh:127
G4double GetKineticEnergy() const
G4DynamicParticle * GetParticle()
G4int GetN() const
Definition: G4Isotope.hh:94
size_t GetNumberOfElements() const
Definition: G4Material.hh:186
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:395
const G4String & GetName() const
Definition: G4Material.hh:178
G4ParticleHPReactionWhiteBoard * GetReactionWhiteBoard()
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
Here is the call graph for this function:

◆ BuildPhysicsTable()

void G4ParticleHPInelastic::BuildPhysicsTable ( const G4ParticleDefinition projectile)
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 437 of file G4ParticleHPInelastic.cc.

437  {
438 
440 
441  theInelastic = hpmanager->GetInelasticFinalStates( &projectile );
442 
443  if ( G4Threading::IsMasterThread() ) {
444 
445  if ( theInelastic == NULL ) theInelastic = new std::vector<G4ParticleHPChannelList*>;
446 
447  if ( numEle == (G4int)G4Element::GetNumberOfElements() ) return;
448 
449  if ( theInelastic->size() == G4Element::GetNumberOfElements() ) {
451  return;
452  }
453 
454  const char* dataDirVariable;
455  if( &projectile == G4Neutron::Neutron() ) {
456  dataDirVariable = "G4NEUTRONHPDATA";
457  }else if( &projectile == G4Proton::Proton() ) {
458  dataDirVariable = "G4PROTONHPDATA";
459  }else if( &projectile == G4Deuteron::Deuteron() ) {
460  dataDirVariable = "G4DEUTERONHPDATA";
461  }else if( &projectile == G4Triton::Triton() ) {
462  dataDirVariable = "G4TRITONHPDATA";
463  }else if( &projectile == G4He3::He3() ) {
464  dataDirVariable = "G4HE3HPDATA";
465  }else if( &projectile == G4Alpha::Alpha() ) {
466  dataDirVariable = "G4ALPHAHPDATA";
467  } else {
468  G4String message("G4ParticleHPInelastic may only be called for neutron, proton, deuteron, triton, He3 or alpha, while it is called for " + projectile.GetParticleName());
469  throw G4HadronicException(__FILE__, __LINE__,message.c_str());
470  }
471  if(!getenv(dataDirVariable)){
472  G4String message("Please set the environement variable " + G4String(dataDirVariable) + " to point to the " + projectile.GetParticleName() + " cross-section files.");
473  throw G4HadronicException(__FILE__, __LINE__,message.c_str());
474  }
475  dirName = getenv(dataDirVariable);
476  G4cout << dirName << G4endl;
477 
478  G4String tString = "/Inelastic";
479  dirName = dirName + tString;
480 
481  G4cout << "@@@ G4ParticleHPInelastic instantiated for particle " << projectile.GetParticleName() << " data directory variable is " << dataDirVariable << " pointing to " << dirName << G4endl;
482 
483  for (G4int i = numEle ; i < (G4int)G4Element::GetNumberOfElements(); i++)
484  {
485  theInelastic->push_back( new G4ParticleHPChannelList );
486  ((*theInelastic)[i])->Init((*(G4Element::GetElementTable()))[i], dirName, const_cast<G4ParticleDefinition*>(&projectile));
487  G4int itry = 0;
488  do
489  {
490  ((*theInelastic)[i])->Register( new G4ParticleHPNInelasticFS , "F01"); // has
491  ((*theInelastic)[i])->Register( new G4ParticleHPNXInelasticFS , "F02");
492  ((*theInelastic)[i])->Register( new G4ParticleHP2NDInelasticFS , "F03");
493  ((*theInelastic)[i])->Register( new G4ParticleHP2NInelasticFS , "F04"); // has, E Done
494  ((*theInelastic)[i])->Register( new G4ParticleHP3NInelasticFS , "F05"); // has, E Done
495  ((*theInelastic)[i])->Register( new G4ParticleHPNAInelasticFS , "F06");
496  ((*theInelastic)[i])->Register( new G4ParticleHPN3AInelasticFS , "F07");
497  ((*theInelastic)[i])->Register( new G4ParticleHP2NAInelasticFS , "F08");
498  ((*theInelastic)[i])->Register( new G4ParticleHP3NAInelasticFS , "F09");
499  ((*theInelastic)[i])->Register( new G4ParticleHPNPInelasticFS , "F10");
500  ((*theInelastic)[i])->Register( new G4ParticleHPN2AInelasticFS , "F11");
501  ((*theInelastic)[i])->Register( new G4ParticleHP2N2AInelasticFS , "F12");
502  ((*theInelastic)[i])->Register( new G4ParticleHPNDInelasticFS , "F13");
503  ((*theInelastic)[i])->Register( new G4ParticleHPNTInelasticFS , "F14");
504  ((*theInelastic)[i])->Register( new G4ParticleHPNHe3InelasticFS , "F15");
505  ((*theInelastic)[i])->Register( new G4ParticleHPND2AInelasticFS , "F16");
506  ((*theInelastic)[i])->Register( new G4ParticleHPNT2AInelasticFS , "F17");
507  ((*theInelastic)[i])->Register( new G4ParticleHP4NInelasticFS , "F18"); // has, E Done
508  ((*theInelastic)[i])->Register( new G4ParticleHP2NPInelasticFS , "F19");
509  ((*theInelastic)[i])->Register( new G4ParticleHP3NPInelasticFS , "F20");
510  ((*theInelastic)[i])->Register( new G4ParticleHPN2PInelasticFS , "F21");
511  ((*theInelastic)[i])->Register( new G4ParticleHPNPAInelasticFS , "F22");
512  ((*theInelastic)[i])->Register( new G4ParticleHPPInelasticFS , "F23");
513  ((*theInelastic)[i])->Register( new G4ParticleHPDInelasticFS , "F24");
514  ((*theInelastic)[i])->Register( new G4ParticleHPTInelasticFS , "F25");
515  ((*theInelastic)[i])->Register( new G4ParticleHPHe3InelasticFS , "F26");
516  ((*theInelastic)[i])->Register( new G4ParticleHPAInelasticFS , "F27");
517  ((*theInelastic)[i])->Register( new G4ParticleHP2AInelasticFS , "F28");
518  ((*theInelastic)[i])->Register( new G4ParticleHP3AInelasticFS , "F29");
519  ((*theInelastic)[i])->Register( new G4ParticleHP2PInelasticFS , "F30");
520  ((*theInelastic)[i])->Register( new G4ParticleHPPAInelasticFS , "F31");
521  ((*theInelastic)[i])->Register( new G4ParticleHPD2AInelasticFS , "F32");
522  ((*theInelastic)[i])->Register( new G4ParticleHPT2AInelasticFS , "F33");
523  ((*theInelastic)[i])->Register( new G4ParticleHPPDInelasticFS , "F34");
524  ((*theInelastic)[i])->Register( new G4ParticleHPPTInelasticFS , "F35");
525  ((*theInelastic)[i])->Register( new G4ParticleHPDAInelasticFS , "F36");
526  ((*theInelastic)[i])->RestartRegistration();
527  itry++;
528  }
529  while( !((*theInelastic)[i])->HasDataInAnyFinalState() && itry < 6 ); // Loop checking, 11.05.2015, T. Koi
530  // 6 is corresponding to the value(5) of G4ParticleHPChannel. TK
531 
532  if ( itry == 6 ) {
533  // No Final State at all.
534  /*
535  G4bool exceptional = false;
536  if ( (*(G4Element::GetElementTable()))[i]->GetNumberOfIsotopes() == 1 )
537  {
538  if ( (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetZ() == 1 && (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetN() == 1 ) exceptional = true; //1H
539  }
540  if ( !exceptional ) {
541  G4cerr << " ELEMENT Z " << (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetZ() << " N " << (*(G4Element::GetElementTable()))[i]->GetIsotope( 0 )->GetN() << G4endl; //1H
542  throw G4HadronicException(__FILE__, __LINE__, "Channel: Do not know what to do with this element");
543  }
544  */
546  G4cout << "ParticleHP::Inelastic for " << projectile.GetParticleName() << ". Do not know what to do with element of \"" << (*(G4Element::GetElementTable()))[i]->GetName() << "\"." << G4endl;
547  G4cout << "The components of the element are" << G4endl;
548  //G4cout << "TKDB dataDirVariable = " << dataDirVariable << G4endl;
549  for ( G4int ii = 0 ; ii < (G4int)( (*(G4Element::GetElementTable()))[i]->GetNumberOfIsotopes() ) ; ii++ ) {
550  G4cout << " Z: " << (*(G4Element::GetElementTable()))[i]->GetIsotope( ii )->GetZ() << ", A: " << (*(G4Element::GetElementTable()))[i]->GetIsotope( ii )->GetN() << G4endl;
551  }
552  G4cout << "No possible final state data of the element is found in " << dataDirVariable << "." << G4endl;
553  }
554  }
555  }
556  hpmanager->RegisterInelasticFinalStates( &projectile , theInelastic );
557  }
559 }
static G4ParticleHPManager * GetInstance()
void Init()
Definition: G4IonTable.cc:86
void RegisterInelasticFinalStates(const G4ParticleDefinition *, std::vector< G4ParticleHPChannelList *> *)
int G4int
Definition: G4Types.hh:78
void Register(T *inst)
Definition: G4AutoDelete.hh:65
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
static size_t GetNumberOfElements()
Definition: G4Element.cc:402
std::vector< G4ParticleHPChannelList * > * theInelastic
static G4Triton * Triton()
Definition: G4Triton.cc:95
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Neutron * Neutron()
Definition: G4Neutron.cc:104
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
std::vector< G4ParticleHPChannelList * > * GetInelasticFinalStates(const G4ParticleDefinition *)
#define G4endl
Definition: G4ios.hh:61
G4bool IsMasterThread()
Definition: G4Threading.cc:136
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4ElementTable * GetElementTable()
Definition: G4Element.cc:395
static G4He3 * He3()
Definition: G4He3.cc:94
Here is the call graph for this function:

◆ GetFatalEnergyCheckLevels()

const std::pair< G4double, G4double > G4ParticleHPInelastic::GetFatalEnergyCheckLevels ( ) const
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 313 of file G4ParticleHPInelastic.cc.

314 {
315  // max energy non-conservation is mass of heavy nucleus
316 // if ( getenv("G4PHP_DO_NOT_ADJUST_FINAL_STATE") ) return std::pair<G4double, G4double>(5*perCent,250*GeV);
317  // This should be same to the hadron default value
318 // return std::pair<G4double, G4double>(10*perCent,10*GeV);
319  return std::pair<G4double, G4double>(10*perCent,DBL_MAX);
320 }
static const double perCent
Definition: G4SIunits.hh:329
#define DBL_MAX
Definition: templates.hh:83

◆ GetVerboseLevel()

G4int G4ParticleHPInelastic::GetVerboseLevel ( ) const
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 391 of file G4ParticleHPInelastic.cc.

392 {
394 }
static G4ParticleHPManager * GetInstance()
Here is the call graph for this function:

◆ ModelDescription()

void G4ParticleHPInelastic::ModelDescription ( std::ostream &  outFile) const
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 561 of file G4ParticleHPInelastic.cc.

562 {
563  outFile << "Extension of High Precision model for inelastic reaction of proton, deuteron, triton, He3 and alpha below 20MeV\n";
564 }

◆ SetVerboseLevel()

void G4ParticleHPInelastic::SetVerboseLevel ( G4int  newValue)
virtual

Reimplemented from G4HadronicInteraction.

Definition at line 395 of file G4ParticleHPInelastic.cc.

396 {
398 }
static G4ParticleHPManager * GetInstance()
Here is the call graph for this function:

Member Data Documentation

◆ dirName

G4String G4ParticleHPInelastic::dirName
protected

Definition at line 110 of file G4ParticleHPInelastic.hh.

◆ numEle

G4int G4ParticleHPInelastic::numEle
protected

Definition at line 111 of file G4ParticleHPInelastic.hh.

◆ theInelastic

std::vector<G4ParticleHPChannelList*>* G4ParticleHPInelastic::theInelastic
protected

Definition at line 109 of file G4ParticleHPInelastic.hh.

◆ theProjectile

G4ParticleDefinition* G4ParticleHPInelastic::theProjectile
private

Definition at line 153 of file G4ParticleHPInelastic.hh.


The documentation for this class was generated from the following files: