38 #define CHAMPION_VERBOSE
57 #ifdef CHAMPION_VERBOSE
60 G4cout <<
"Champion Elastic model is constructed "
90 #ifdef CHAMPION_VERBOSE
93 G4cout <<
"Calling G4DNAChampionElasticModel::Initialise()" <<
G4endl;
99 G4Exception(
"G4DNAChampionElasticModel::Initialise",
102 "Model not applicable to particle type.");
109 G4cout <<
"G4DNAChampionElasticModel: low energy limit increased from "
117 G4cout <<
"G4DNAChampionElasticModel: high energy limit decreased from "
131 G4String fileElectron(
"dna/sigma_elastic_e_champion");
140 char *path = getenv(
"G4LEDATA");
147 "G4LEDATA environment variable not set.");
151 std::ostringstream eFullFileName;
152 eFullFileName << path <<
"/dna/sigmadiff_cumulated_elastic_e_champion_hp.dat";
153 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
155 if (!eDiffCrossSection)
158 errMsg <<
"Missing data file:/dna/sigmadiff_cumulated_elastic_e_champion_hp.dat; "
159 <<
"please use G4EMLOW6.36 and above.";
161 G4Exception(
"G4DNAChampionElasticModel::Initialise",
178 while(!eDiffCrossSection.eof())
182 eDiffCrossSection >> tDummy >> eDummy;
189 eVecm[tDummy].push_back(0.);
194 if (eDummy !=
eVecm[tDummy].back())
eVecm[tDummy].push_back(eDummy);
199 #ifdef CHAMPION_VERBOSE
204 G4cout <<
"Loaded cross section files for Champion Elastic model" <<
G4endl;
207 G4cout <<
"Champion Elastic model is initialized " <<
G4endl
240 #ifdef CHAMPION_VERBOSE
243 G4cout <<
"Calling CrossSectionPerVolume() of G4DNAChampionElasticModel"
260 #ifdef CHAMPION_VERBOSE
263 G4cout <<
"__________________________________" <<
G4endl;
264 G4cout <<
"=== G4DNAChampionElasticModel - XS INFO START" <<
G4endl;
265 G4cout <<
"=== Kinetic energy(eV)=" << ekin/
eV <<
" particle : " << p->GetParticleName() <<
G4endl;
266 G4cout <<
"=== Cross section per water molecule (cm^2)=" << sigma/
cm/
cm <<
G4endl;
267 G4cout <<
"=== Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./
cm) << G4endl;
268 G4cout <<
"=== G4DNAChampionElasticModel - XS INFO END" <<
G4endl;
272 return sigma*waterDensity;
284 #ifdef CHAMPION_VERBOSE
287 G4cout <<
"Calling SampleSecondaries() of G4DNAChampionElasticModel" <<
G4endl;
301 G4double xDir = std::sqrt(1. - cosTheta*cosTheta);
303 xDir *= std::cos(phi);
304 yDir *= std::sin(phi);
306 G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
331 std::vector<G4double>::iterator
t2 = std::upper_bound(
eTdummyVec.begin(),
333 std::vector<G4double>::iterator
t1 = t2 - 1;
335 std::vector<G4double>::iterator e12 = std::upper_bound(
eVecm[(*t1)].begin(),
338 std::vector<G4double>::iterator e11 = e12 - 1;
340 std::vector<G4double>::iterator e22 = std::upper_bound(
eVecm[(*t2)].begin(),
343 std::vector<G4double>::iterator e21 = e22 - 1;
357 if (xs11 == 0 && xs12 == 0 && xs21 == 0 && xs22 == 0)
return (0.);
359 theta =
QuadInterpolator(valueE11, valueE12, valueE21, valueE22, xs11, xs12,
360 xs21, xs22, valueT1, valueT2, k, integrDiff);
401 G4double a = (std::log10(xs2) - std::log10(xs1))
402 / (std::log10(e2) - std::log10(e1));
403 G4double b = std::log10(xs2) - a * std::log10(e2);
453 integrdiff = uniformRand;
457 theta =
Theta(k /
eV, integrdiff);
459 cosTheta = std::cos(theta *
pi / 180);
469 errMsg <<
"The method G4DNAChampionElasticModel::SetKillBelowThreshold is deprecated";
471 G4Exception(
"G4DNAChampionElasticModel::SetKillBelowThreshold",