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