134{
135 if (verboseLevel > 3)
136 G4cout <<
"Calling G4DNAELSEPAElasticModel::Initialise()" <<
G4endl;
137
138 if (isInitialised) {return;}
139
141 {
142 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0001",
144 return;
145 }
146
147 G4ProductionCutsTable* theCoupleTable =
150
151
153
154 fpData_Au=nullptr;
155 fpData_H2O=nullptr;
157
158 for(
G4int i=0; i<numOfCouples; ++i)
159 {
160 const G4MaterialCutsCouple* couple =
164
166 if (nelm==1){
169 if (Z!=79)
170 {
171 continue;
172 }
173
174 if (Z>0)
175 {
176 G4String fileZElectron("dna/sigma_elastic_e_elsepa_Z");
177 std::ostringstream oss;
178 oss.str("");
179 oss.clear(stringstream::goodbit);
180 oss << Z;
181 fileZElectron += oss.str()+"_muffintin";
182
183 fpData_Au = new G4DNACrossSectionDataSet(new G4LogLogInterpolation,
184 eV,
185 scaleFactor );
186 fpData_Au->LoadData(fileZElectron);
187
188 std::ostringstream eFullFileNameZ;
190
191 if (path == nullptr)
192 {
193 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0002",
195 return;
196 }
197
198 eFullFileNameZ.str("");
199 eFullFileNameZ.clear(stringstream::goodbit);
200
201 eFullFileNameZ
202 << path
203 << "/dna/sigmadiff_cumulated_elastic_e_elsepa_Z"
204 << Z << "_muffintin.dat";
205
206 std::ifstream eDiffCrossSectionZ(eFullFileNameZ.str().c_str());
207
208 if (!eDiffCrossSectionZ)
209 {
210 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0003",
212 return;
213 }
214
215 eEdummyVec_Au.clear();
216 eCum_Au.clear();
217 fAngleData_Au.clear();
218
219 eEdummyVec_Au.push_back(0.);
220 do
221 {
224 eDiffCrossSectionZ>>eDummy>>cumDummy;
225 if (eDummy != eEdummyVec_Au.back())
226 {
227 eEdummyVec_Au.push_back(eDummy);
228 eCum_Au[eDummy].push_back(0.);
229 }
230 eDiffCrossSectionZ>>fAngleData_Au[eDummy][cumDummy];
231 if (cumDummy != eCum_Au[eDummy].back())
232 {
233 eCum_Au[eDummy].push_back(cumDummy);
234 }
235 }while(!eDiffCrossSectionZ.eof());
236 }
237
238 }else{
239 if(material == fpBaseWater && !fpData_H2O){
241 {
242 G4cout<<
"G4DNAELSEPAElasticModel: low energy limit increased from "
246 }
247
249 {
250 G4cout<<
"G4DNAELSEPAElasticModel: high energy limit decreased from "
254 }
255
256 G4String fileZElectron("dna/sigma_elastic_e_elsepa_muffin");
257
258 fpData_H2O = new G4DNACrossSectionDataSet(new G4LogLogInterpolation,
259 eV,
260 scaleFactor );
261 fpData_H2O->LoadData(fileZElectron);
262
263 std::ostringstream eFullFileNameZ;
264
266 if (path == nullptr)
267 {
268 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0004",
270 return;
271 }
272
273 eFullFileNameZ.str("");
274 eFullFileNameZ.clear(stringstream::goodbit);
275
276 eFullFileNameZ
277 << path
278 << "/dna/sigmadiff_cumulated_elastic_e_elsepa_muffin.dat";
279
280 std::ifstream eDiffCrossSectionZ(eFullFileNameZ.str().c_str());
281
282 if (!eDiffCrossSectionZ)
283 G4Exception(
"G4DNAELSEPAElasticModel::Initialise",
"em0005",
285 "Missing data file for cumulated DCS");
286
287 eEdummyVec_H2O.clear();
288 eCum_H2O.clear();
289 fAngleData_H2O.clear();
290
291 eEdummyVec_H2O.push_back(0.);
292
293 do
294 {
297 eDiffCrossSectionZ>>eDummy>>cumDummy;
298 if (eDummy != eEdummyVec_H2O.back())
299 {
300 eEdummyVec_H2O.push_back(eDummy);
301 eCum_H2O[eDummy].push_back(0.);
302 }
303 eDiffCrossSectionZ>>fAngleData_H2O[eDummy][cumDummy];
304 if (cumDummy != eCum_H2O[eDummy].back()){
305 eCum_H2O[eDummy].push_back(cumDummy);
306 }
307 }while(!eDiffCrossSectionZ.eof());
308 }
309 }
310 if (verboseLevel > 2)
311 G4cout <<
"Loaded cross section files of ELSEPA Elastic model for"
313
314 if( verboseLevel>0 )
315 {
316 G4cout <<
"ELSEPA elastic model is initialized " <<
G4endl
317 << "Energy range: "
321 }
322 }
323
324
326
327 fpMolDensity =
330
331 isInitialised = true;
332}
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static G4DNAMolecularMaterial * Instance()
static G4EmParameters * Instance()
const G4String & GetDirLEDATA() const
G4ParticleChangeForGamma * GetParticleChangeForGamma()