47 {
50
51 G4int istatus = system(
"echo $G4NEUTRONHPDATA");
52 if ( istatus < 0 )
53 {
54 G4cout <<
"Warning! system(\"echo $G4NEUTRONHPDATA\") returns error value at G4NeutronHPInelastic" <<
G4endl;
55 }
56
57
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;
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128 for (
G4int i=0; i<numEle; i++)
129 {
133 do
134 {
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();
172 itry++;
173 }
174 while( !(*theInelastic[i]).HasDataInAnyFinalState() && itry < 6 );
175
176
177 if ( itry == 6 )
178 {
179
180 G4bool exceptional =
false;
182 {
184 }
185 if ( !exceptional )
throw G4HadronicException(__FILE__, __LINE__,
"Channel: Do not know what to do with this element");
186 }
187
188 }
189 }
G4DLLIMPORT std::ostream G4cout
static size_t GetNumberOfElements()
static const G4ElementTable * GetElementTable()
void SetMinEnergy(G4double anEnergy)
void SetMaxEnergy(const G4double anEnergy)