39 #define ELSEPA_VERBOSE
61 G4cout <<
"ELSEPA Elastic model is constructed "
94 G4cout <<
"Calling G4DNAELSEPAElasticModel::Initialise()" <<
G4endl;
103 "Model not applicable to particle type.");
110 G4cout <<
"G4DNAELSEPAElasticModel: low energy limit increased from "
118 G4cout <<
"G4DNAELSEPAElasticModel: high energy limit decreased from "
132 G4String fileElectron(
"dna/sigma_elastic_e_elsepa_muffin");
143 char *path = getenv(
"G4LEDATA");
150 "G4LEDATA environment variable not set.");
154 std::ostringstream eFullFileName;
159 eFullFileName << path <<
"/dna/sigmadiff_cumulated_elastic_e_elsepa_muffin.dat";
160 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
162 if (!eDiffCrossSection)
165 errMsg <<
"Missing data file:/dna/sigmadiff_cumulated_elastic_e_elsepa_muffin.dat; "
166 <<
"please use G4EMLOW7.8 and above.";
185 while(!eDiffCrossSection.eof())
189 eDiffCrossSection >> tDummy >> eDummy;
196 eVecm[tDummy].push_back(0.);
201 if (eDummy !=
eVecm[tDummy].back())
eVecm[tDummy].push_back(eDummy);
205 #ifdef ELSEPA_VERBOSE
210 G4cout <<
"Loaded cross section files for ELSEPA Elastic model" <<
G4endl;
213 G4cout <<
"ELSEPA Elastic model is initialized " <<
G4endl
246 #ifdef ELSEPA_VERBOSE
249 G4cout <<
"Calling CrossSectionPerVolume() of G4DNAELSEPAElasticModel"
259 if(waterDensity!= 0.0)
268 #ifdef ELSEPA_VERBOSE
271 G4cout <<
"__________________________________" <<
G4endl;
272 G4cout <<
"=== G4DNAELSEPAElasticModel - XS INFO START" <<
G4endl;
273 G4cout <<
"=== Kinetic energy(eV)=" << ekin/
eV <<
" particle : " << p->GetParticleName() <<
G4endl;
274 G4cout <<
"=== Cross section per water molecule (cm^2)=" << sigma/
cm/
cm <<
G4endl;
275 G4cout <<
"=== Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./
cm) << G4endl;
276 G4cout <<
"=== G4DNAELSEPAElasticModel - XS INFO END" <<
G4endl;
281 return sigma*waterDensity;
294 #ifdef ELSEPA_VERBOSE
297 G4cout <<
"Calling SampleSecondaries() of G4DNAELSEPAElasticModel" <<
G4endl;
313 G4double xDir = std::sqrt(1. - cosTheta*cosTheta);
315 xDir *= std::cos(phi);
316 yDir *= std::sin(phi);
318 G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
347 std::vector<double>::iterator
t2 = std::upper_bound(
eTdummyVec.begin(),
349 std::vector<double>::iterator
t1 = t2 - 1;
351 std::vector<double>::iterator e12 = std::upper_bound(
eVecm[(*t1)].begin(),
354 std::vector<double>::iterator e11 = e12 - 1;
356 std::vector<double>::iterator e22 = std::upper_bound(
eVecm[(*t2)].begin(),
359 std::vector<double>::iterator e21 = e22 - 1;
374 if (xs11 == 0 && xs12 == 0 && xs21 == 0 && xs22 == 0)
return (0.);
376 theta =
QuadInterpolator(valueE11, valueE12, valueE21, valueE22, xs11, xs12,
377 xs21, xs22, valueT1, valueT2, k, integrDiff);
418 G4double a = (std::log10(xs2) - std::log10(xs1))
419 / (std::log10(e2) - std::log10(e1));
420 G4double b = std::log10(xs2) - a * std::log10(e2);
470 integrdiff = uniformRand;
477 cosTheta = std::cos(theta *
pi / 180);
487 errMsg <<
"The method G4DNAELSEPAElasticModel::SetKillBelowThreshold is deprecated";
489 G4Exception(
"G4DNAELSEPAElasticModel::SetKillBelowThreshold",