66 G4cout <<
"Ion elastic model is constructed " <<
G4endl<<
"Energy range: "
100 G4cout <<
"Calling G4DNAIonElasticModel::Initialise()" <<
G4endl;
107 G4cout <<
"G4DNAIonElasticModel: low energy limit increased from " <<
114 G4cout <<
"G4DNAIonElasticModel: high energy limit decreased from " <<
123 char *path = getenv(
"G4LEDATA");
127 G4Exception(
"G4IonElasticModel::Initialise",
"em0006",
133 std::ostringstream fullFileName;
146 (particleDefinition == protonDef && protonDef != 0)
148 (particleDefinition == hydrogenDef && hydrogenDef != 0)
153 totalXSFile =
"dna/sigma_elastic_proton_HTran";
156 fullFileName << path <<
"/dna/sigmadiff_cumulated_elastic_proton_HTran.dat";
160 (particleDefinition == instance->
GetIon(
"helium") && heliumDef)
162 (particleDefinition == instance->
GetIon(
"alpha+") && alphaplusDef)
164 (particleDefinition == instance->
GetIon(
"alpha++") && alphaplusplusDef)
169 totalXSFile =
"dna/sigma_elastic_alpha_HTran";
172 fullFileName << path <<
"/dna/sigmadiff_cumulated_elastic_alpha_HTran.dat";
177 std::ifstream diffCrossSection(fullFileName.str().c_str());
179 if (!diffCrossSection)
182 description <<
"Missing data file:"
183 <<fullFileName.str().c_str()<<
G4endl;
184 G4Exception(
"G4IonElasticModel::Initialise",
"em0003",
199 while(!diffCrossSection.eof())
203 diffCrossSection>>tDummy>>eDummy;
210 eVecm[tDummy].push_back(0.);
215 if (eDummy !=
eVecm[tDummy].back())
eVecm[tDummy].push_back(eDummy);
224 G4cout <<
"Loaded cross section files for ion elastic model" <<
G4endl;
252 G4cout <<
"Calling CrossSectionPerVolume() of G4DNAIonElasticModel"
276 G4Exception(
"G4DNAIonElasticModel::ComputeCrossSectionPerVolume",
"em0002",
283 G4cout <<
"__________________________________" <<
G4endl;
284 G4cout <<
"G4DNAIonElasticModel - XS INFO START" <<
G4endl;
285 G4cout <<
"Kinetic energy(eV)=" << ekin/
eV <<
" particle : " << particleName <<
G4endl;
286 G4cout <<
"Cross section per water molecule (cm^2)=" << sigma/
cm/
cm <<
G4endl;
287 G4cout <<
"Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./
cm) <<
G4endl;
288 G4cout <<
"G4DNAIonElasticModel - XS INFO END" <<
G4endl;
291 return sigma*waterDensity;
298 std::vector<G4DynamicParticle*>* ,
305 G4cout <<
"Calling SampleSecondaries() of G4DNAIonElasticModel" <<
G4endl;
339 G4double xDir = std::sqrt(1. - cosTheta*cosTheta);
341 xDir *= std::cos(phi);
342 yDir *= std::sin(phi);
344 G4ThreeVector zPrimeVers((xDir*xVers + yDir*yVers + cosTheta*zVers));
351 depositEnergyCM = 4. * particleEnergy0 *
fParticle_Mass * water_mass *
356 if (!
statCode && (particleEnergy0 >= depositEnergyCM) )
388 std::vector<G4double>::iterator t2 = std::upper_bound(
eTdummyVec.begin(),
390 std::vector<G4double>::iterator t1 = t2 - 1;
392 std::vector<G4double>::iterator e12 = std::upper_bound(
eVecm[(*t1)].begin(),
395 std::vector<G4double>::iterator e11 = e12 - 1;
397 std::vector<G4double>::iterator e22 = std::upper_bound(
eVecm[(*t2)].begin(),
400 std::vector<G4double>::iterator e21 = e22 - 1;
414 if(xs11 == 0 && xs12 == 0 && xs21 == 0 && xs22 == 0)
return (0.);
416 theta =
QuadInterpolator(valueE11, valueE12, valueE21, valueE22, xs11, xs12,
417 xs21, xs22, valueT1, valueT2, k, integrDiff);
452 G4double a = (std::log10(xs2) - std::log10(xs1))
453 / (std::log10(
e2) - std::log10(
e1));
454 G4double b = std::log10(xs2) - a * std::log10(
e2);
455 G4double sigma = a * std::log10(e) + b;
456 G4double value = (std::pow(10., sigma));
500 return Theta(particleDefinition, k /
eV, integrdiff);
512 G4cout <<
"*** WARNING : the G4DNAIonElasticModel class is not "
513 "activated below 100 eV !"
static const G4double e1[44]
static const G4double e2[44]
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4double G4Exp(G4double initial_x)
Exponential Function double precision.
static constexpr double eV
static constexpr double MeV
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
Hep3Vector orthogonal() const
Hep3Vector cross(const Hep3Vector &) const
virtual G4double FindValue(G4double e, G4int componentId=0) const
virtual G4bool LoadData(const G4String &argFileName)
static G4DNAGenericIonsManager * Instance(void)
G4ParticleDefinition * GetIon(const G4String &name)
void SetKillBelowThreshold(G4double threshold)
G4DNACrossSectionDataSet * fpTableData
std::vector< G4double > eTdummyVec
virtual void Initialise(const G4ParticleDefinition *particuleDefinition, const G4DataVector &)
G4DNAIonElasticModel(const G4ParticleDefinition *p=0, const G4String &nam="DNAIonElasticModel")
G4double LinLinInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
virtual ~G4DNAIonElasticModel()
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)
G4double LogLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
const std::vector< G4double > * fpMolWaterDensity
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
G4double LinLogInterpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
G4double Theta(G4ParticleDefinition *aParticleDefinition, G4double k, G4double integrDiff)
G4ParticleChangeForGamma * fParticleChangeForGamma
G4double RandomizeThetaCM(G4double k, G4ParticleDefinition *aParticleDefinition)
TriDimensionMap fDiffCrossSectionData
static G4DNAMolecularMaterial * Instance()
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
const G4String & GetParticleName() const
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static G4ParticleTable * GetParticleTable()
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
static constexpr double pi