51 G4int istatus = system(
"echo $G4NEUTRONHPDATA");
54 G4cout <<
"Warning! system(\"echo $G4NEUTRONHPDATA\") returns error value at G4NeutronHPInelastic" <<
G4endl;
58 if(!getenv(
"G4NEUTRONHPDATA"))
59 throw G4HadronicException(__FILE__, __LINE__,
"Please setenv G4NEUTRONHPDATA to point to the neutron cross-section files.");
60 dirName = getenv(
"G4NEUTRONHPDATA");
62 dirName = dirName + tString;
128 for (
G4int i=0; i<numEle; i++)
135 (*theInelastic[i]).Register(&theNFS,
"F01");
136 (*theInelastic[i]).Register(&theNXFS,
"F02");
137 (*theInelastic[i]).Register(&the2NDFS,
"F03");
138 (*theInelastic[i]).Register(&the2NFS,
"F04");
139 (*theInelastic[i]).Register(&the3NFS,
"F05");
140 (*theInelastic[i]).Register(&theNAFS,
"F06");
141 (*theInelastic[i]).Register(&theN3AFS,
"F07");
142 (*theInelastic[i]).Register(&the2NAFS,
"F08");
143 (*theInelastic[i]).Register(&the3NAFS,
"F09");
144 (*theInelastic[i]).Register(&theNPFS,
"F10");
145 (*theInelastic[i]).Register(&theN2AFS,
"F11");
146 (*theInelastic[i]).Register(&the2N2AFS,
"F12");
147 (*theInelastic[i]).Register(&theNDFS,
"F13");
148 (*theInelastic[i]).Register(&theNTFS,
"F14");
149 (*theInelastic[i]).Register(&theNHe3FS,
"F15");
150 (*theInelastic[i]).Register(&theND2AFS,
"F16");
151 (*theInelastic[i]).Register(&theNT2AFS,
"F17");
152 (*theInelastic[i]).Register(&the4NFS,
"F18");
153 (*theInelastic[i]).Register(&the2NPFS,
"F19");
154 (*theInelastic[i]).Register(&the3NPFS,
"F20");
155 (*theInelastic[i]).Register(&theN2PFS,
"F21");
156 (*theInelastic[i]).Register(&theNPAFS,
"F22");
157 (*theInelastic[i]).Register(&thePFS,
"F23");
158 (*theInelastic[i]).Register(&theDFS,
"F24");
159 (*theInelastic[i]).Register(&theTFS,
"F25");
160 (*theInelastic[i]).Register(&theHe3FS,
"F26");
161 (*theInelastic[i]).Register(&theAFS,
"F27");
162 (*theInelastic[i]).Register(&the2AFS,
"F28");
163 (*theInelastic[i]).Register(&the3AFS,
"F29");
164 (*theInelastic[i]).Register(&the2PFS,
"F30");
165 (*theInelastic[i]).Register(&thePAFS,
"F31");
166 (*theInelastic[i]).Register(&theD2AFS,
"F32");
167 (*theInelastic[i]).Register(&theT2AFS,
"F33");
168 (*theInelastic[i]).Register(&thePDFS,
"F34");
169 (*theInelastic[i]).Register(&thePTFS,
"F35");
170 (*theInelastic[i]).Register(&theDAFS,
"F36");
171 (*theInelastic[i]).RestartRegistration();
174 while( !(*theInelastic[i]).HasDataInAnyFinalState() && itry < 6 );
180 G4bool exceptional =
false;
185 if ( !exceptional )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this element");
194 for ( std::vector<G4NeutronHPChannelList*>::iterator
195 it = theInelastic.begin() ; it != theInelastic.end() ; it++ )
199 theInelastic.clear();
223 rWeight = NumAtomsPerVolume[i];
239 if( sum == 0 || random<=running/sum)
break;
258 return std::pair<G4double, G4double>(10*perCent,
DBL_MAX);
261void G4NeutronHPInelastic::addChannelForNewElement()
272 (*theInelastic[i]).Register(&theNFS,
"F01");
273 (*theInelastic[i]).Register(&theNXFS,
"F02");
274 (*theInelastic[i]).Register(&the2NDFS,
"F03");
275 (*theInelastic[i]).Register(&the2NFS,
"F04");
276 (*theInelastic[i]).Register(&the3NFS,
"F05");
277 (*theInelastic[i]).Register(&theNAFS,
"F06");
278 (*theInelastic[i]).Register(&theN3AFS,
"F07");
279 (*theInelastic[i]).Register(&the2NAFS,
"F08");
280 (*theInelastic[i]).Register(&the3NAFS,
"F09");
281 (*theInelastic[i]).Register(&theNPFS,
"F10");
282 (*theInelastic[i]).Register(&theN2AFS,
"F11");
283 (*theInelastic[i]).Register(&the2N2AFS,
"F12");
284 (*theInelastic[i]).Register(&theNDFS,
"F13");
285 (*theInelastic[i]).Register(&theNTFS,
"F14");
286 (*theInelastic[i]).Register(&theNHe3FS,
"F15");
287 (*theInelastic[i]).Register(&theND2AFS,
"F16");
288 (*theInelastic[i]).Register(&theNT2AFS,
"F17");
289 (*theInelastic[i]).Register(&the4NFS,
"F18");
290 (*theInelastic[i]).Register(&the2NPFS,
"F19");
291 (*theInelastic[i]).Register(&the3NPFS,
"F20");
292 (*theInelastic[i]).Register(&theN2PFS,
"F21");
293 (*theInelastic[i]).Register(&theNPAFS,
"F22");
294 (*theInelastic[i]).Register(&thePFS,
"F23");
295 (*theInelastic[i]).Register(&theDFS,
"F24");
296 (*theInelastic[i]).Register(&theTFS,
"F25");
297 (*theInelastic[i]).Register(&theHe3FS,
"F26");
298 (*theInelastic[i]).Register(&theAFS,
"F27");
299 (*theInelastic[i]).Register(&the2AFS,
"F28");
300 (*theInelastic[i]).Register(&the3AFS,
"F29");
301 (*theInelastic[i]).Register(&the2PFS,
"F30");
302 (*theInelastic[i]).Register(&thePAFS,
"F31");
303 (*theInelastic[i]).Register(&theD2AFS,
"F32");
304 (*theInelastic[i]).Register(&theT2AFS,
"F33");
305 (*theInelastic[i]).Register(&thePDFS,
"F34");
306 (*theInelastic[i]).Register(&thePTFS,
"F35");
307 (*theInelastic[i]).Register(&theDAFS,
"F36");
308 (*theInelastic[i]).RestartRegistration();
311 while( !(*theInelastic[i]).HasDataInAnyFinalState() && itry < 6 );
317 G4bool exceptional =
false;
322 if ( !exceptional )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this element");
G4DLLIMPORT std::ostream G4cout
static size_t GetNumberOfElements()
static const G4ElementTable * GetElementTable()
const G4Material * GetMaterial() const
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)
G4double GetTemperature() const
const G4Element * GetElement(G4int iel) const
size_t GetNumberOfElements() const
const G4double * GetVecNbOfAtomsPerVolume() const
G4HadFinalState * ApplyYourself(const G4HadProjectile &aTrack, G4Nucleus &aTargetNucleus)
virtual const std::pair< G4double, G4double > GetFatalEnergyCheckLevels() const
static G4NeutronHPManager * GetInstance()
void OpenReactionWhiteBoard()
void CloseReactionWhiteBoard()
G4NeutronHPReactionWhiteBoard * GetReactionWhiteBoard()
G4double GetThermalEnergy(const G4HadProjectile &aP, const G4Element *anE, G4double aT)
void SetParameters(const G4double A, const G4double Z)