151{
152 if (verboseLevel > 3)
153 G4cout <<
"Calling G4DNAELSEPAElasticModel::Initialise()" <<
G4endl;
154
155 if (isInitialised) {return;}
156
158 {
159 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0001",
161 return;
162 }
163
167
168
170
171
172
173
174
175 fpData_Au=nullptr;
176 fpData_H2O=nullptr;
177
178 for(
G4int i=0; i<numOfCouples; ++i)
179 {
184
186 if (nelm==1){
188 if (Z!=79)
189 {
190 continue;
191 }
192
193 if (Z>0)
194 {
195 G4String fileZElectron(
"dna/sigma_elastic_e_elsepa_Z");
196 std::ostringstream oss;
197 oss.str("");
198 oss.clear(stringstream::goodbit);
199 oss << Z;
200 fileZElectron += oss.str()+"_muffintin";
201
202
203
204
205
206
207
208
210 eV,
211 scaleFactor );
213
214 std::ostringstream eFullFileNameZ;
216 if (path == nullptr)
217 {
218 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0002",
220 return;
221 }
222
223 eFullFileNameZ.str("");
224 eFullFileNameZ.clear(stringstream::goodbit);
225
226 eFullFileNameZ
227 << path
228 << "/dna/sigmadiff_cumulated_elastic_e_elsepa_Z"
229 << Z << "_muffintin.dat";
230
231 std::ifstream eDiffCrossSectionZ(eFullFileNameZ.str().c_str());
232
233 if (!eDiffCrossSectionZ)
234 {
235 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0003",
237 return;
238 }
239
240
241
242
243
244 eEdummyVec_Au.clear();
245 eCum_Au.clear();
246 fAngleData_Au.clear();
247
248
249 eEdummyVec_Au.push_back(0.);
250 do
251 {
254 eDiffCrossSectionZ>>eDummy>>cumDummy;
255
256 if (eDummy != eEdummyVec_Au.back())
257 {
258
259
260 eEdummyVec_Au.push_back(eDummy);
261
262 eCum_Au[eDummy].push_back(0.);
263 }
264
265 eDiffCrossSectionZ>>fAngleData_Au[eDummy][cumDummy];
266
267 if (cumDummy != eCum_Au[eDummy].back())
268 {
269
270 eCum_Au[eDummy].push_back(cumDummy);
271 }
272 }while(!eDiffCrossSectionZ.eof());
273 }
274
275 }else{
276 if(material->
GetName()==
"G4_WATER"){
278 {
279 G4cout<<
"G4DNAELSEPAElasticModel: low energy limit increased from "
283 }
284
286 {
287 G4cout<<
"G4DNAELSEPAElasticModel: high energy limit decreased from "
291 }
292
293 G4String fileZElectron(
"dna/sigma_elastic_e_elsepa_muffin");
294
295
296
297
298
299
300
301
303 eV,
304 scaleFactor );
305 fpData_H2O->
LoadData(fileZElectron);
306
307 std::ostringstream eFullFileNameZ;
308
310 if (path == nullptr)
311 {
312 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0004",
314 return;
315 }
316
317 eFullFileNameZ.str("");
318 eFullFileNameZ.clear(stringstream::goodbit);
319
320 eFullFileNameZ
321 << path
322 << "/dna/sigmadiff_cumulated_elastic_e_elsepa_muffin.dat";
323
324 std::ifstream eDiffCrossSectionZ(eFullFileNameZ.str().c_str());
325
326 if (!eDiffCrossSectionZ)
327 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0005",
329 "Missing data file for cumulated DCS");
330
331
332
333
334
335 eEdummyVec_H2O.clear();
336 eCum_H2O.clear();
337 fAngleData_H2O.clear();
338
339
340 eEdummyVec_H2O.push_back(0.);
341
342 do
343 {
346 eDiffCrossSectionZ>>eDummy>>cumDummy;
347
348 if (eDummy != eEdummyVec_H2O.back())
349 {
350
351 eEdummyVec_H2O.push_back(eDummy);
352
353 eCum_H2O[eDummy].push_back(0.);
354 }
355
356 eDiffCrossSectionZ>>fAngleData_H2O[eDummy][cumDummy];
357
358 if (cumDummy != eCum_H2O[eDummy].back()){
359
360 eCum_H2O[eDummy].push_back(cumDummy);
361 }
362 }while(!eDiffCrossSectionZ.eof());
363 }
364 }
365 if (verboseLevel > 2)
366 G4cout <<
"Loaded cross section files of ELSEPA Elastic model for"
368
369 if( verboseLevel>0 )
370 {
371 G4cout <<
"ELSEPA elastic model is initialized " <<
G4endl
372 << "Energy range: "
376 }
377 }
378
379
381 fpMolDensity = nullptr;
382
383 isInitialised = true;
384}
const char * G4FindDataDir(const char *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4bool LoadData(const G4String &argFileName) override
G4ParticleChangeForGamma * GetParticleChangeForGamma()