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");
150 std::ostringstream eFullFileName;
152 if (
fasterCode) eFullFileName << path <<
"/dna/sigmadiff_cumulated_ionisation_e_emfietzoglou.dat";
153 if (!
fasterCode) eFullFileName << path <<
"/dna/sigmadiff_ionisation_e_emfietzoglou.dat";
155 std::ifstream eDiffCrossSection(eFullFileName.str().c_str());
157 if (!eDiffCrossSection)
160 FatalException,
"Missing data file:/dna/sigmadiff_cumulated_ionisation_e_emfietzoglou.dat");
163 FatalException,
"Missing data file:/dna/sigmadiff_ionisation_e_emfietzoglou.dat");
184 while(!eDiffCrossSection.eof())
188 eDiffCrossSection>>tDummy>>eDummy;
190 for (
int j=0; j<5; j++)
196 eNrjTransfData[j][tDummy][eDiffCrossSectionData[j][tDummy][eDummy]]=eDummy;
197 eProbaShellMap[j][tDummy].push_back(eDiffCrossSectionData[j][tDummy][eDummy]);
203 eDiffCrossSectionData[j][tDummy][eDummy]*=scaleFactor;
213 if (particle==electronDef)
221 G4cout <<
"Emfietzoglou ionisation model is initialized " <<
G4endl
255 <<
"Calling CrossSectionPerVolume() of G4DNAEmfietzoglouIonisationModel"
269 if(waterDensity!= 0.0)
274 std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
278 lowLim = pos1->second;
281 std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
285 highLim = pos2->second;
288 if (ekin >= lowLim && ekin < highLim)
290 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator
pos;
303 G4Exception(
"G4DNAEmfietzoglouIonisationModel::CrossSectionPerVolume",
"em0002",
310 G4cout <<
"__________________________________" <<
G4endl;
311 G4cout <<
"G4DNAEmfietzoglouIonisationModel - XS INFO START" <<
G4endl;
312 G4cout <<
"Kinetic energy(eV)=" << ekin/
eV <<
" particle : " << particleName <<
G4endl;
313 G4cout <<
"Cross section per water molecule (cm^2)=" << sigma/
cm/
cm <<
G4endl;
314 G4cout <<
"Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./
cm) << G4endl;
315 G4cout <<
"G4DNAEmfietzoglouIonisationModel - XS INFO END" <<
G4endl;
319 return sigma*waterDensity;
334 G4cout <<
"Calling SampleSecondaries() of G4DNAEmfietzoglouIonisationModel"
345 std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
350 lowLim = pos1->second;
353 std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
358 highLim = pos2->second;
361 if (k >= lowLim && k < highLim)
365 G4double totalEnergy = k + particleMass;
366 G4double pSquare = k * (totalEnergy + particleMass);
367 G4double totalMomentum = std::sqrt(pSquare);
369 G4int ionizationShell = 0;
377 G4int secNumberInit = 0;
378 G4int secNumberFinal = 0;
384 if (k<bindingEnergy)
return;
392 if (ionizationShell <5 && ionizationShell >1)
396 else if (ionizationShell <2)
411 secNumberInit = fvect->size();
413 secNumberFinal = fvect->size();
430 G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
432 G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
433 G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
434 G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
435 G4double finalMomentum = std::sqrt(finalPx*finalPx + finalPy*finalPy + finalPz*finalPz);
436 finalPx /= finalMomentum;
437 finalPy /= finalMomentum;
438 finalPz /= finalMomentum;
441 direction.set(finalPx,finalPy,finalPz);
446 G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
448 for (
G4int j=secNumberInit; j < secNumberFinal; j++)
450 deexSecEnergy = deexSecEnergy + (*fvect)[j]->GetKineticEnergy();
465 if (secondaryKinetic>0)
468 fvect->push_back(dp);
493 G4double maximumEnergyTransfer = 0.;
495 maximumEnergyTransfer = k;
513 G4double maxEnergy = maximumEnergyTransfer;
514 G4int nEnergySteps = 50;
517 G4double stpEnergy(std::pow(maxEnergy / value,
518 1. / static_cast<G4double>(nEnergySteps - 1)));
519 G4int step(nEnergySteps);
528 if(differentialCrossSection >= crossSectionMaximum) crossSectionMaximum =
529 differentialCrossSection;
534 G4double secondaryElectronKineticEnergy = 0.;
542 return secondaryElectronKineticEnergy;
597 G4int ionizationLevelIndex)
619 std::vector<double>::iterator t2 = std::upper_bound(
eTdummyVec.begin(),
623 std::vector<double>::iterator t1 = t2 - 1;
626 if(energyTransfer <=
eVecm[(*t1)].back() && energyTransfer
627 <=
eVecm[(*t2)].back())
629 std::vector<double>::iterator e12 =
630 std::upper_bound(
eVecm[(*t1)].begin(),
633 std::vector<double>::iterator e11 = e12 - 1;
635 std::vector<double>::iterator e22 =
636 std::upper_bound(
eVecm[(*t2)].begin(),
639 std::vector<double>::iterator e21 = e22 - 1;
667 G4double xsProduct = xs11 * xs12 * xs21 * xs22;
702 if(e1 != 0 && e2 != 0 && (std::log10(e2) - std::log10(e1)) != 0
705 G4double a = (std::log10(xs2) - std::log10(xs1))
706 / (std::log10(e2) - std::log10(e1));
707 G4double b = std::log10(xs2) - a * std::log10(e2);
708 G4double sigma = a * std::log10(e) + b;
709 value = (std::pow(10., sigma));
723 if((e2 - e1) != 0 && xs1 != 0 && xs2 != 0 &&
fasterCode)
727 value = std::pow(10., (d1 + (d2 - d1) * (e - e1) / (e2 - e1)));
733 if((e2 - e1) != 0 && (xs1 == 0 || xs2 == 0) &&
fasterCode)
737 value = (d1 + (d2 -
d1) * (e - e1) / (e2 -
e1));
787 std::map<G4String, G4DNACrossSectionDataSet*, std::less<G4String> >::iterator
pos;
805 value += valuesBuffer[i];
816 if(valuesBuffer[i] > value)
818 delete[] valuesBuffer;
821 value -= valuesBuffer[i];
824 if(valuesBuffer)
delete[] valuesBuffer;
830 G4Exception(
"G4DNAEmfietzoglouIonisationModel::RandomSelect",
833 "Model not applicable to particle type.");
847 G4double secondaryElectronKineticEnergy = 0.;
857 if(secondaryElectronKineticEnergy < 0.)
return 0.;
860 return secondaryElectronKineticEnergy;
867 G4int ionizationLevelIndex)
891 std::vector<double>::iterator k1 = k2-1;
909 std::vector<double>::iterator prob12 = std::upper_bound(
eProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
912 std::vector<double>::iterator prob11 = prob12-1;
914 std::vector<double>::iterator prob22 = std::upper_bound(
eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
917 std::vector<double>::iterator prob21 = prob22-1;
921 valuePROB21 =*prob21;
922 valuePROB22 =*prob22;
923 valuePROB12 =*prob12;
924 valuePROB11 =*prob11;
931 nrjTransf11 =
eNrjTransfData[ionizationLevelIndex][valueK1][valuePROB11];
932 nrjTransf12 =
eNrjTransfData[ionizationLevelIndex][valueK1][valuePROB12];
933 nrjTransf21 =
eNrjTransfData[ionizationLevelIndex][valueK2][valuePROB21];
934 nrjTransf22 =
eNrjTransfData[ionizationLevelIndex][valueK2][valuePROB22];
948 if ( random >
eProbaShellMap[ionizationLevelIndex][(*k1)].back() )
951 std::vector<double>::iterator prob22 = std::upper_bound(
eProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
954 std::vector<double>::iterator prob21 = prob22-1;
958 valuePROB21 =*prob21;
959 valuePROB22 =*prob22;
963 nrjTransf21 =
eNrjTransfData[ionizationLevelIndex][valueK2][valuePROB21];
964 nrjTransf22 =
eNrjTransfData[ionizationLevelIndex][valueK2][valuePROB22];
966 G4double interpolatedvalue2 =
Interpolate(valuePROB21, valuePROB22, random, nrjTransf21, nrjTransf22);
989 G4double nrjTransfProduct = nrjTransf11 * nrjTransf12 * nrjTransf21 * nrjTransf22;
993 if (nrjTransfProduct != 0.)
996 valuePROB21, valuePROB22,
997 nrjTransf11, nrjTransf12,
998 nrjTransf21, nrjTransf22,
G4DNAEmfietzoglouIonisationModel(const G4ParticleDefinition *p=0, const G4String &nam="DNAEmfietzoglouIonisationModel")
static G4Electron * ElectronDefinition()
G4double LowEnergyLimit() const
G4DNAEmfietzoglouWaterIonisationStructure waterStructure
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
G4ParticleChangeForGamma * fParticleChangeForGamma
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
static G4LossTableManager * Instance()
G4double GetKineticEnergy() const
CLHEP::Hep3Vector G4ThreeVector
G4double HighEnergyLimit() const
virtual const G4VEMDataSet * GetComponent(G4int componentId) const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
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)
G4VEmAngularDistribution * GetAngularDistribution()
TriDimensionMap eNrjTransfData[6]
virtual G4bool LoadData(const G4String &argFileName)
virtual ~G4DNAEmfietzoglouIonisationModel()
std::map< G4String, G4double, std::less< G4String > > lowEnergyLimit
G4ParticleDefinition * GetDefinition() const
G4double Interpolate(G4double e1, G4double e2, G4double e, G4double xs1, G4double xs2)
void ProposeMomentumDirection(G4double Px, G4double Py, G4double Pz)
G4double RandomizeEjectedElectronEnergyFromCumulatedDcs(G4ParticleDefinition *aParticleDefinition, G4double incomingParticleEnergy, G4int shell)
const G4String & GetParticleName() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetHighEnergyLimit(G4double)
virtual G4ThreeVector & SampleDirectionForShell(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, G4int shellID, const G4Material *)
double DifferentialCrossSection(G4ParticleDefinition *aParticleDefinition, G4double k, G4double energyTransfer, G4int shell)
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
G4double RandomizeEjectedElectronEnergy(G4ParticleDefinition *aParticleDefinition, G4double incomingParticleEnergy, G4int shell)
G4GLOB_DLL std::ostream G4cout
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
const std::vector< G4double > * fpMolWaterDensity
const G4ThreeVector & GetMomentumDirection() const
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &=*(new G4DataVector()))
std::map< G4String, G4double, std::less< G4String > > highEnergyLimit
virtual G4double FindValue(G4double e, G4int componentId=0) const
G4double RandomTransferedEnergy(G4ParticleDefinition *aParticleDefinition, G4double incomingParticleEnergy, G4int shell)
G4int RandomSelect(G4double energy, const G4String &particle)
virtual size_t NumberOfComponents(void) const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4DNAChemistryManager * Instance()
static G4DNAMolecularMaterial * Instance()
G4double GetPDGMass() const
G4double IonisationEnergy(G4int level)
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
Method used by DNA physics model to create a water molecule.
void SetAngularDistribution(G4VEmAngularDistribution *)
const G4Track * GetCurrentTrack() const
static G4Electron * Electron()
void SetProposedKineticEnergy(G4double proposedKinEnergy)
TriDimensionMap eDiffCrossSectionData[6]
G4VAtomDeexcitation * AtomDeexcitation()
void SetLowEnergyLimit(G4double)
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
void SetDeexcitationFlag(G4bool val)
G4ThreeVector G4ParticleMomentum
G4double bindingEnergy(G4int A, G4int Z)
G4VAtomDeexcitation * fAtomDeexcitation
static const G4double pos
std::vector< double > eTdummyVec
G4ParticleChangeForGamma * GetParticleChangeForGamma()
const G4Material * GetMaterial() const