62 G4cout <<
"Champion Elastic model is constructed " <<
G4endl<<
"Energy range: " 77 std::map<G4String, G4DNACrossSectionDataSet*, std::less<G4String> >::iterator
pos;
97 G4cout <<
"Calling G4DNAChampionElasticModel::Initialise()" <<
G4endl;
103 G4cout <<
"G4DNAChampionElasticModel: low energy limit increased from " <<
110 G4cout <<
"G4DNAChampionElasticModel: high energy limit decreased from " <<
119 G4String fileElectron(
"dna/sigma_elastic_e_champion");
139 char *path = getenv(
"G4LEDATA");
143 G4Exception(
"G4ChampionElasticModel::Initialise",
"em0006",
148 std::ostringstream eFullFileName;
149 eFullFileName << path <<
"/dna/sigmadiff_cumulated_elastic_e_champion_hp.dat";
150 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
152 if (!eDiffCrossSection)
153 G4Exception(
"G4DNAChampionElasticModel::Initialise",
"em0003",
155 "Missing data file:/dna/sigmadiff_cumulated_elastic_e_champion_hp.dat; please use G4EMLOW6.36 and above.");
168 while(!eDiffCrossSection.eof())
172 eDiffCrossSection>>tDummy>>eDummy;
179 eVecm[tDummy].push_back(0.);
184 if (eDummy !=
eVecm[tDummy].back())
eVecm[tDummy].push_back(eDummy);
191 G4cout <<
"Loaded cross section files for Champion Elastic model" <<
G4endl;
195 G4cout <<
"Champion Elastic model is initialized " << G4endl
222 G4cout <<
"Calling CrossSectionPerVolume() of G4DNAChampionElasticModel" 231 if(waterDensity!= 0.0)
242 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator
pos;
255 G4Exception(
"G4DNAChampionElasticModel::ComputeCrossSectionPerVolume",
"em0002",
262 G4cout <<
"__________________________________" <<
G4endl;
263 G4cout <<
"=== G4DNAChampionElasticModel - XS INFO START" <<
G4endl;
264 G4cout <<
"=== Kinetic energy(eV)=" << ekin/
eV <<
" particle : " << particleName <<
G4endl;
265 G4cout <<
"=== Cross section per water molecule (cm^2)=" << sigma/
cm/
cm <<
G4endl;
266 G4cout <<
"=== Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./
cm) << G4endl;
268 G4cout <<
"=== G4DNAChampionElasticModel - XS INFO END" <<
G4endl;
273 return sigma*waterDensity;
287 G4cout <<
"Calling SampleSecondaries() of G4DNAChampionElasticModel" <<
G4endl;
310 G4double xDir = std::sqrt(1. - cosTheta*cosTheta);
312 xDir *= std::cos(phi);
313 yDir *= std::sin(phi);
315 G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
344 std::vector<double>::iterator
t2 = std::upper_bound(
eTdummyVec.begin(),
346 std::vector<double>::iterator
t1 = t2 - 1;
348 std::vector<double>::iterator e12 = std::upper_bound(
eVecm[(*t1)].begin(),
351 std::vector<double>::iterator e11 = e12 - 1;
353 std::vector<double>::iterator e22 = std::upper_bound(
eVecm[(*t2)].begin(),
356 std::vector<double>::iterator e21 = e22 - 1;
371 if (xs11 == 0 && xs12 == 0 && xs21 == 0 && xs22 == 0)
return (0.);
373 theta =
QuadInterpolator(valueE11, valueE12, valueE21, valueE22, xs11, xs12,
374 xs21, xs22, valueT1, valueT2, k, integrDiff);
389 G4double value = std::exp(d1 + (d2 - d1) * (e - e1) / (e2 - e1));
403 G4double value = (d1 + (d2 -
d1) * (e - e1) / (e2 -
e1));
415 G4double a = (std::log10(xs2) - std::log10(xs1))
416 / (std::log10(e2) - std::log10(e1));
417 G4double b = std::log10(xs2) - a * std::log10(e2);
419 G4double value = (std::pow(10., sigma));
467 integrdiff = uniformRand;
473 cosTheta = std::cos(theta *
pi / 180);
484 if (threshold < 7.4 *
eV)
486 G4cout<<
"*** WARNING : the G4DNAChampionElasticModel class is not " 487 "activated below 7.4 eV !" <<
G4endl;
488 G4cout<<
"*** NOTE: if you are using G4EmDNAChemistry, do not worry, this is" 489 " the expected behavior" <<
G4endl;
G4double LowEnergyLimit() const
G4double RandomizeCosTheta(G4double k)
static G4Electron * ElectronDefinition()
virtual void SampleSecondaries(std::vector< G4DynamicParticle *> *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4DNAChampionElasticModel(const G4ParticleDefinition *p=0, const G4String &nam="DNAChampionElasticModel")
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
void SetKillBelowThreshold(G4double threshold)
const std::vector< double > * GetNumMolPerVolTableFor(const G4Material *) const
virtual G4bool LoadData(const G4String &argFileName)
virtual ~G4DNAChampionElasticModel()
std::vector< double > eTdummyVec
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
void SetHighEnergyLimit(G4double)
G4double GetKineticEnergy() const
const G4String & GetParticleName() const
virtual G4double FindValue(G4double e, G4int componentId=0) const
G4GLOB_DLL std::ostream G4cout
Hep3Vector cross(const Hep3Vector &) const
G4double HighEnergyLimit() const
Hep3Vector orthogonal() const
G4double Theta(G4ParticleDefinition *aParticleDefinition, G4double k, G4double integrDiff)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
G4double QuadInterpolator(G4double e11, G4double e12, G4double e21, G4double e22, G4double x11, G4double x12, G4double x21, G4double x22, G4double t1, G4double t2, G4double t, G4double e)
static G4DNAMolecularMaterial * Instance()
const G4ThreeVector & GetMomentumDirection() const
G4ParticleChangeForGamma * fParticleChangeForGamma
TriDimensionMap eDiffCrossSectionData
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
void SetLowEnergyLimit(G4double)
G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
static const G4double pos
G4ParticleChangeForGamma * GetParticleChangeForGamma()
const std::vector< G4double > * fpMolWaterDensity