66 G4cout <<
"Emfietzoglou ionisation model is constructed " <<
G4endl;
96 std::map<G4String, G4DNACrossSectionDataSet*, std::less<G4String> >::iterator
pos;
117 G4cout <<
"Calling G4DNAEmfietzoglouIonisationModel::Initialise()" <<
G4endl;
122 G4String fileElectron(
"dna/sigma_ionisation_e_emfietzoglou");
128 G4double scaleFactor = (1.e-22 / 3.343) *
m*
m;
130 char *path = getenv(
"G4LEDATA");
147 std::ostringstream eFullFileName;
149 if (
fasterCode) eFullFileName << path <<
"/dna/sigmadiff_cumulated_ionisation_e_emfietzoglou.dat";
150 if (!
fasterCode) eFullFileName << path <<
"/dna/sigmadiff_ionisation_e_emfietzoglou.dat";
152 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
154 if (!eDiffCrossSection)
157 FatalException,
"Missing data file:/dna/sigmadiff_cumulated_ionisation_e_emfietzoglou.dat");
160 FatalException,
"Missing data file:/dna/sigmadiff_ionisation_e_emfietzoglou.dat");
181 while(!eDiffCrossSection.eof())
185 eDiffCrossSection>>tDummy>>eDummy;
187 for (
G4int j=0; j<5; j++)
212 G4cout <<
"Emfietzoglou ionisation model is initialized " <<
G4endl
248 <<
"Calling CrossSectionPerVolume() of G4DNAEmfietzoglouIonisationModel"
264 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator
pos;
277 G4Exception(
"G4DNAEmfietzoglouIonisationModel::CrossSectionPerVolume",
"em0002",
284 G4cout <<
"__________________________________" <<
G4endl;
285 G4cout <<
"G4DNAEmfietzoglouIonisationModel - XS INFO START" <<
G4endl;
286 G4cout <<
"Kinetic energy(eV)=" << ekin/
eV <<
" particle : " << particleName <<
G4endl;
287 G4cout <<
"Cross section per water molecule (cm^2)=" << sigma/
cm/
cm <<
G4endl;
288 G4cout <<
"Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./
cm) <<
G4endl;
289 G4cout <<
"G4DNAEmfietzoglouIonisationModel - XS INFO END" <<
G4endl;
292 return sigma*waterDensity;
307 G4cout <<
"Calling SampleSecondaries() of G4DNAEmfietzoglouIonisationModel"
319 G4double totalEnergy = k + particleMass;
320 G4double pSquare = k * (totalEnergy + particleMass);
321 G4double totalMomentum = std::sqrt(pSquare);
323 G4int ionizationShell = 0;
350 if (secondaryKinetic>0)
353 fvect->push_back(dp);
358 G4double finalPx = totalMomentum*primaryDirection.
x() - deltaTotalMomentum*deltaDirection.
x();
359 G4double finalPy = totalMomentum*primaryDirection.
y() - deltaTotalMomentum*deltaDirection.
y();
360 G4double finalPz = totalMomentum*primaryDirection.
z() - deltaTotalMomentum*deltaDirection.
z();
361 G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
362 finalPx /= finalMomentum;
363 finalPy /= finalMomentum;
364 finalPz /= finalMomentum;
367 direction.
set(finalPx,finalPy,finalPz);
375 size_t secNumberInit = 0;
376 size_t secNumberFinal = 0;
385 secNumberInit = fvect->size();
387 secNumberFinal = fvect->size();
389 if(secNumberFinal > secNumberInit) {
390 for (
size_t i=secNumberInit; i<secNumberFinal; ++i) {
411 G4Exception(
"G4DNAEmfietzoglouIonisatioModel1::SampleSecondaries()",
454 G4double maximumEnergyTransfer = 0.;
456 maximumEnergyTransfer = k;
474 G4double maxEnergy = maximumEnergyTransfer;
475 G4int nEnergySteps = 50;
478 G4double stpEnergy(std::pow(maxEnergy / value,
479 1. /
static_cast<G4double>(nEnergySteps - 1)));
480 G4int step(nEnergySteps);
489 if(differentialCrossSection >= crossSectionMaximum) crossSectionMaximum =
490 differentialCrossSection;
495 G4double secondaryElectronKineticEnergy = 0.;
503 return secondaryElectronKineticEnergy;
558 G4int ionizationLevelIndex)
584 std::vector<G4double>::iterator t2 = std::upper_bound(
eTdummyVec.begin(),
588 std::vector<G4double>::iterator t1 = t2 - 1;
592 if(energyTransfer <
eVecm[(*t1)].back() &&
593 energyTransfer <
eVecm[(*t2)].back())
595 std::vector<G4double>::iterator e12 =
596 std::upper_bound(
eVecm[(*t1)].begin(),
599 std::vector<G4double>::iterator e11 = e12 - 1;
601 std::vector<G4double>::iterator e22 =
602 std::upper_bound(
eVecm[(*t2)].begin(),
605 std::vector<G4double>::iterator e21 = e22 - 1;
634 G4double xsProduct = xs11 * xs12 * xs21 * xs22;
669 if(
e1 != 0 &&
e2 != 0 && (std::log10(
e2) - std::log10(
e1)) != 0
672 G4double a = (std::log10(xs2) - std::log10(xs1))
673 / (std::log10(
e2) - std::log10(
e1));
674 G4double b = std::log10(xs2) - a * std::log10(
e2);
675 G4double sigma = a * std::log10(e) + b;
676 value = (std::pow(10., sigma));
694 value = std::pow(10., (
d1 + (
d2 -
d1) * (e -
e1) / (
e2 -
e1)));
754 std::map<G4String, G4DNACrossSectionDataSet*, std::less<G4String> >::iterator
pos;
772 value += valuesBuffer[i];
783 if(valuesBuffer[i] > value)
785 delete[] valuesBuffer;
788 value -= valuesBuffer[i];
791 if(valuesBuffer)
delete[] valuesBuffer;
797 G4Exception(
"G4DNAEmfietzoglouIonisationModel::RandomSelect",
800 "Model not applicable to particle type.");
814 G4double secondaryElectronKineticEnergy = 0.;
823 if(secondaryElectronKineticEnergy < 0.)
return 0.;
825 return secondaryElectronKineticEnergy;
832 G4int ionizationLevelIndex)
860 std::vector<G4double>::iterator k1 = k2-1;
878 std::vector<G4double>::iterator prob12 = std::upper_bound(
eProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
881 std::vector<G4double>::iterator prob11 = prob12-1;
883 std::vector<G4double>::iterator prob22 = std::upper_bound(
eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
886 std::vector<G4double>::iterator prob21 = prob22-1;
890 valuePROB21 =*prob21;
891 valuePROB22 =*prob22;
892 valuePROB12 =*prob12;
893 valuePROB11 =*prob11;
900 nrjTransf11 =
eNrjTransfData[ionizationLevelIndex][valueK1][valuePROB11];
901 nrjTransf12 =
eNrjTransfData[ionizationLevelIndex][valueK1][valuePROB12];
902 nrjTransf21 =
eNrjTransfData[ionizationLevelIndex][valueK2][valuePROB21];
903 nrjTransf22 =
eNrjTransfData[ionizationLevelIndex][valueK2][valuePROB22];
917 if ( random >
eProbaShellMap[ionizationLevelIndex][(*k1)].back() )
920 std::vector<G4double>::iterator prob22 = std::upper_bound(
eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
923 std::vector<G4double>::iterator prob21 = prob22-1;
927 valuePROB21 =*prob21;
928 valuePROB22 =*prob22;
932 nrjTransf21 =
eNrjTransfData[ionizationLevelIndex][valueK2][valuePROB21];
933 nrjTransf22 =
eNrjTransfData[ionizationLevelIndex][valueK2][valuePROB22];
935 G4double interpolatedvalue2 =
Interpolate(valuePROB21, valuePROB22, random, nrjTransf21, nrjTransf22);
958 G4double nrjTransfProduct = nrjTransf11 * nrjTransf12 * nrjTransf21 * nrjTransf22;
962 if (nrjTransfProduct != 0.)
965 valuePROB21, valuePROB22,
966 nrjTransf11, nrjTransf12,
967 nrjTransf21, nrjTransf22,
static const G4double e1[44]
static const G4double e2[44]
static const G4double pos
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
static constexpr double m
static constexpr double keV
static constexpr double eV
static constexpr double cm
G4GLOB_DLL std::ostream G4cout
void set(double x, double y, double z)
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
virtual G4double FindValue(G4double e, G4int componentId=0) const
virtual size_t NumberOfComponents(void) const
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
virtual G4bool LoadData(const G4String &argFileName)
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)
G4DNAEmfietzoglouIonisationModel(const G4ParticleDefinition *p=0, const G4String &nam="DNAEmfietzoglouIonisationModel")
G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(G4ParticleDefinition *aParticleDefinition, G4double incomingParticleEnergy, G4int shell)
virtual ~G4DNAEmfietzoglouIonisationModel()
G4VAtomDeexcitation * fAtomDeexcitation
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &= *(new G4DataVector()))
G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition *aParticleDefinition, G4double incomingParticleEnergy, G4int shell)
const std::vector< G4double > * fpMolWaterDensity
G4ParticleChangeForGamma * fParticleChangeForGamma
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
G4double RandomTransferedEnergy(G4ParticleDefinition *aParticleDefinition, G4double incomingParticleEnergy, G4int shell)
std::vector< G4double > eTdummyVec
G4double DifferentialCrossSection(G4ParticleDefinition *aParticleDefinition, G4double k, G4double energyTransfer, G4int shell)
G4DNAEmfietzoglouWaterIonisationStructure waterStructure
TriDimensionMap eDiffCrossSectionData[6]
TriDimensionMap eNrjTransfData[6]
G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
G4int RandomSelect(G4double energy, const G4String &particle)
G4double IonisationEnergy(G4int level)
static G4DNAMolecularMaterial * Instance()
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * ElectronDefinition()
static G4Electron * Electron()
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
const G4Material * GetMaterial() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
const G4Track * GetCurrentTrack() const
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double GetPDGMass() const
const G4String & GetParticleName() const
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual G4ThreeVector & SampleDirectionForShell(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, G4int shellID, const G4Material *)
void SetHighEnergyLimit(G4double)
G4VEmAngularDistribution * GetAngularDistribution()
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
void SetDeexcitationFlag(G4bool val)
void SetAngularDistribution(G4VEmAngularDistribution *)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double bindingEnergy(G4int A, G4int Z)