73 G4cout <<
"CPA100 Elastic model is constructed " <<
G4endl
95 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator
pos;
114 #ifdef UEHARA_VERBOSE
116 G4cout <<
"Calling G4DNACPA100ElasticModel::Initialise()" <<
G4endl;
121 G4Exception(
"*** WARNING: the G4DNACPA100ElasticModel is "
122 "not intented to be used with another particle than the electron",
130 G4cout <<
"G4DNACPA100ElasticModel: low energy limit increased from " <<
137 G4cout <<
"G4DNACPA100ElasticModel: high energy limit decreased from " <<
147 G4String fileElectron(
"dna/sigma_elastic_e_cpa100");
176 char *path = getenv(
"G4LEDATA");
180 G4Exception(
"G4DNACPA100ElasticModel::Initialise",
"em0006",
185 std::ostringstream eFullFileName;
187 eFullFileName << path
188 <<
"/dna/sigmadiff_cumulated_elastic_e_cpa100.dat";
190 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
192 if (!eDiffCrossSection)
193 G4Exception(
"G4DNACPA100ElasticModel::Initialise",
"em0003",
195 "Missing data file:/dna/sigmadiff_cumulated_elastic_e_cpa100.dat");
208 while(!eDiffCrossSection.eof())
212 eDiffCrossSection>>tDummy>>eDummy;
219 eVecm[tDummy].push_back(0.);
224 if (eDummy !=
eVecm[tDummy].back())
eVecm[tDummy].push_back(eDummy);
229 #ifdef UEHARA_VERBOSE
231 G4cout <<
"Loaded cross section files for CPA100 Elastic model" <<
G4endl;
234 #ifdef UEHARA_VERBOSE
237 G4cout <<
"CPA100 Elastic model is initialized " << G4endl
265 #ifdef UEHARA_VERBOSE
266 if (verboseLevel > 3)
268 "Calling CrossSectionPerVolume() of G4DNACPA100ElasticModel" <<
G4endl;
279 if (ekin <= HighEnergyLimit() && ekin >= LowEnergyLimit())
284 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator
pos;
285 pos = tableData.find(particleName);
287 if (pos != tableData.end())
325 G4Exception(
"G4DNACPA100ElasticModel::ComputeCrossSectionPerVolume",
331 #ifdef UEHARA_VERBOSE
332 if (verboseLevel > 2)
334 G4cout <<
"__________________________________" <<
G4endl;
335 G4cout <<
"G4DNACPA100ElasticModel - XS INFO START" <<
G4endl;
336 G4cout <<
"Kinetic energy(eV)=" << ekin/
eV <<
" particle : " << particleName <<
G4endl;
337 G4cout <<
"Cross section per water molecule (cm^2)=" << sigma/
cm/
cm <<
G4endl;
338 G4cout <<
"Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./
cm) << G4endl;
341 G4cout <<
"G4DNACPA100ElasticModel - XS INFO END" <<
G4endl;
345 return sigma*waterDensity;
356 #ifdef UEHARA_VERBOSE
358 G4cout <<
"Calling SampleSecondaries() of G4DNACPA100ElasticModel" <<
G4endl;
377 G4double CT1, ST1, CF1, SF1, CT2, ST2, CF2, SF2;
378 G4double sinTheta = std::sqrt (1-cosTheta*cosTheta);
390 ST1=std::sqrt(1.-CT1*CT1);
392 if (ST1!=0) CF1 = zVers.
x()/ST1;
else CF1 = std::cos(2. *
pi *
G4UniformRand());
393 if (ST1!=0) SF1 = zVers.
y()/ST1;
else SF1 = std::sqrt(1.-CF1*CF1);
402 A3 = sinTheta*std::cos(phi);
403 A4 = A3*CT1 + ST1*cosTheta;
404 A5 = sinTheta * std::sin(phi);
405 A2 = A4 * SF1 + A5 * CF1;
406 A1 = A4 * CF1 - A5 * SF1;
408 CT2 = CT1*cosTheta - ST1*A3;
409 ST2 = std::sqrt(1.-CT2*CT2);
411 if (ST2==0) ST2=1
E-6;
439 (electronEnergy0-1.214
E-4*(1.-cosTheta)*electronEnergy0);
468 if (k==eTdummyVec.back()) k=k*(1.-1
e-12);
471 std::vector<G4double>::iterator
t2 = std::upper_bound(eTdummyVec.begin(),eTdummyVec.end(),
k);
472 std::vector<G4double>::iterator
t1 = t2-1;
474 std::vector<G4double>::iterator e12 = std::upper_bound(eVecm[(*t1)].begin(),eVecm[(*t1)].end(),
476 std::vector<G4double>::iterator e11 = e12-1;
478 std::vector<G4double>::iterator e22 = std::upper_bound(eVecm[(*t2)].begin(),eVecm[(*t2)].end(),
480 std::vector<G4double>::iterator e21 = e22-1;
489 xs11 = eDiffCrossSectionData[valueT1][valueE11];
490 xs12 = eDiffCrossSectionData[valueT1][valueE12];
491 xs21 = eDiffCrossSectionData[valueT2][valueE21];
492 xs22 = eDiffCrossSectionData[valueT2][valueE22];
497 if (xs11==0 && xs12==0 && xs21==0 && xs22==0)
return (0.);
499 theta = QuadInterpolator(
523 G4double value = std::exp(d1 + (d2 - d1)*(e - e1)/ (e2 - e1));
549 G4double a = (std::log10(xs2)-std::log10(xs1)) / (std::log10(e2)-std::log10(e1));
550 G4double b = std::log10(xs2) - a*std::log10(e2);
594 integrdiff = uniformRand;