Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DNARelativisticIonisationModel Class Reference

#include <G4DNARelativisticIonisationModel.hh>

+ Inheritance diagram for G4DNARelativisticIonisationModel:

Public Member Functions

 G4DNARelativisticIonisationModel (const G4ParticleDefinition *p=nullptr, const G4String &nam="DNARelativisticIonisationModel")
 
 ~G4DNARelativisticIonisationModel () override
 
G4DNARelativisticIonisationModeloperator= (const G4DNARelativisticIonisationModel &right)=delete
 
 G4DNARelativisticIonisationModel (const G4DNARelativisticIonisationModel &)=delete
 
void Initialise (const G4ParticleDefinition *, const G4DataVector &= *(new G4DataVector())) override
 
G4double CrossSectionPerVolume (const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax) override
 
virtual G4double GetTotalCrossSection (const G4Material *material, const G4ParticleDefinition *, G4double kineticEnergy)
 
G4double GetPartialCrossSection (const G4Material *material, G4int level, const G4ParticleDefinition *, G4double kineticEnergy) override
 
virtual G4double GetDifferentialCrossSection (const G4Material *material, const G4ParticleDefinition *particle, G4double kineticEnergy, G4double secondaryEnergy, G4int level)
 
void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
virtual void LoadAtomicStates (G4int z, const char *path)
 
void SelectStationary (G4bool input)
 
void SelectFasterComputation (G4bool input)
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void InitialiseLocal (const G4ParticleDefinition *, G4VEmModel *masterModel)
 
virtual void InitialiseForMaterial (const G4ParticleDefinition *, const G4Material *)
 
virtual void InitialiseForElement (const G4ParticleDefinition *, G4int Z)
 
virtual G4double ComputeDEDXPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
virtual G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, G4double kinEnergy, G4double Z, G4double A=0., G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ComputeCrossSectionPerShell (const G4ParticleDefinition *, G4int Z, G4int shellIdx, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double ChargeSquareRatio (const G4Track &)
 
virtual G4double GetChargeSquareRatio (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual G4double GetParticleCharge (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void StartTracking (G4Track *)
 
virtual void CorrectionsAlongStep (const G4MaterialCutsCouple *, const G4DynamicParticle *, const G4double &length, G4double &eloss)
 
virtual G4double Value (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy)
 
virtual G4double MinPrimaryEnergy (const G4Material *, const G4ParticleDefinition *, G4double cut=0.0)
 
virtual G4double MinEnergyCut (const G4ParticleDefinition *, const G4MaterialCutsCouple *)
 
virtual void SetupForMaterial (const G4ParticleDefinition *, const G4Material *, G4double kineticEnergy)
 
virtual void DefineForRegion (const G4Region *)
 
virtual void FillNumberOfSecondaries (G4int &numberOfTriplets, G4int &numberOfRecoil)
 
virtual void ModelDescription (std::ostream &outFile) const
 
void InitialiseElementSelectors (const G4ParticleDefinition *, const G4DataVector &)
 
std::vector< G4EmElementSelector * > * GetElementSelectors ()
 
void SetElementSelectors (std::vector< G4EmElementSelector * > *)
 
G4double ComputeDEDX (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=DBL_MAX)
 
G4double CrossSection (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeMeanFreePath (const G4ParticleDefinition *, G4double kineticEnergy, const G4Material *, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4double ComputeCrossSectionPerAtom (const G4ParticleDefinition *, const G4Element *, G4double kinEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectTargetAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double logKineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementGetCurrentElement (const G4Material *mat=nullptr) const
 
G4int SelectRandomAtomNumber (const G4Material *) const
 
const G4IsotopeGetCurrentIsotope (const G4Element *elm=nullptr) const
 
G4int SelectIsotopeNumber (const G4Element *) const
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=nullptr)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
G4VEmModelGetTripletModel ()
 
void SetTripletModel (G4VEmModel *)
 
void SetAngularDistribution (G4VEmAngularDistribution *)
 
G4double HighEnergyLimit () const
 
G4double LowEnergyLimit () const
 
G4double HighEnergyActivationLimit () const
 
G4double LowEnergyActivationLimit () const
 
G4double PolarAngleLimit () const
 
G4double SecondaryThreshold () const
 
G4bool DeexcitationFlag () const
 
G4bool ForceBuildTableFlag () const
 
G4bool UseAngularGeneratorFlag () const
 
void SetAngularGeneratorFlag (G4bool)
 
void SetHighEnergyLimit (G4double)
 
void SetLowEnergyLimit (G4double)
 
void SetActivationHighEnergyLimit (G4double)
 
void SetActivationLowEnergyLimit (G4double)
 
G4bool IsActive (G4double kinEnergy) const
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetFluctuationFlag (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
void SetUseBaseMaterials (G4bool val)
 
G4bool UseBaseMaterials () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 
void SetLPMFlag (G4bool)
 
G4VEmModeloperator= (const G4VEmModel &right)=delete
 
 G4VEmModel (const G4VEmModel &)=delete
 

Protected Attributes

G4ParticleChangeForGammafParticleChangeForGamma
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData = nullptr
 
G4VParticleChangepParticleChange = nullptr
 
G4PhysicsTablexSectionTable = nullptr
 
const G4MaterialpBaseMaterial = nullptr
 
const std::vector< G4double > * theDensityFactor = nullptr
 
const std::vector< G4int > * theDensityIdx = nullptr
 
G4double inveplus
 
G4double pFactor = 1.0
 
std::size_t currentCoupleIndex = 0
 
std::size_t basedCoupleIndex = 0
 
G4bool lossFlucFlag = true
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLossGetParticleChangeForLoss ()
 
G4ParticleChangeForGammaGetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 

Detailed Description

Definition at line 46 of file G4DNARelativisticIonisationModel.hh.

Constructor & Destructor Documentation

◆ G4DNARelativisticIonisationModel() [1/2]

G4DNARelativisticIonisationModel::G4DNARelativisticIonisationModel ( const G4ParticleDefinition * p = nullptr,
const G4String & nam = "DNARelativisticIonisationModel" )

Definition at line 61 of file G4DNARelativisticIonisationModel.cc.

63 :
64G4VEmModel(nam), fasterCode(true)
65{
66 fHighEnergyLimit = 0;
67 fLowEnergyLimit = 0;
68
69 verboseLevel = 0;
70
72 fAtomDeexcitation = nullptr;
73 fMaterialDensity = nullptr;
74 fParticleDefinition = nullptr;
76
77 if (verboseLevel > 0)
78 {
79 G4cout << "Relativistic Ionisation Model is constructed " << G4endl;
80 }
81}
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
void SetDeexcitationFlag(G4bool val)
G4VEmModel(const G4String &nam)
Definition G4VEmModel.cc:67

◆ ~G4DNARelativisticIonisationModel()

G4DNARelativisticIonisationModel::~G4DNARelativisticIonisationModel ( )
overridedefault

◆ G4DNARelativisticIonisationModel() [2/2]

G4DNARelativisticIonisationModel::G4DNARelativisticIonisationModel ( const G4DNARelativisticIonisationModel & )
delete

Member Function Documentation

◆ CrossSectionPerVolume()

G4double G4DNARelativisticIonisationModel::CrossSectionPerVolume ( const G4Material * material,
const G4ParticleDefinition * p,
G4double ekin,
G4double emin,
G4double emax )
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 230 of file G4DNARelativisticIonisationModel.cc.

236{
237 if (verboseLevel > 3)
238 {
239 G4cout <<
240 "Calling CrossSectionPerVolume() of G4DNARelativisticIonisationModel"
241 << G4endl;
242 }
243
244 if(particleDefinition != fParticleDefinition) return 0;
245
246 // Calculate total cross section for model
247 G4double sigma=0;
248
249 if(material->GetNumberOfElements()>1) return 0.; // Protection for Molecules
250 G4double atomicNDensity = material->GetAtomicNumDensityVector()[0];
251 G4double z = material->GetZ();
252
253 if(atomicNDensity!= 0.0)
254 {
255 if (ekin >= fLowEnergyLimit && ekin < fHighEnergyLimit)
256 {
257 sigma = GetTotalCrossSection(material,particleDefinition,ekin);
258 }
259
260 if (verboseLevel > 2)
261 {
262 G4cout << "__________________________________" << G4endl;
263 G4cout << "=== G4DNARelativisticIonisationModel - XS INFO START" <<G4endl;
264 G4cout << "=== Kinetic energy (eV)=" << ekin/eV << " particle : "
265 << particleDefinition->GetParticleName() << G4endl;
266 G4cout << "=== Cross section per atom for Z="<<z<<" is (cm^2)"
267 << sigma/cm/cm << G4endl;
268 G4cout << "=== Cross section per atom for Z="<<z<<" is (cm^-1)="
269 << sigma*atomicNDensity/(1./cm) << G4endl;
270 G4cout << "=== G4DNARelativisticIonisationModel - XS INFO END" << G4endl;
271 }
272 }
273 return sigma*atomicNDensity;
274}
double G4double
Definition G4Types.hh:83
virtual G4double GetTotalCrossSection(const G4Material *material, const G4ParticleDefinition *, G4double kineticEnergy)
G4double GetZ() const
const G4double * GetAtomicNumDensityVector() const
std::size_t GetNumberOfElements() const

◆ GetDifferentialCrossSection()

G4double G4DNARelativisticIonisationModel::GetDifferentialCrossSection ( const G4Material * material,
const G4ParticleDefinition * particle,
G4double kineticEnergy,
G4double secondaryEnergy,
G4int level )
virtual

Definition at line 520 of file G4DNARelativisticIonisationModel.cc.

526{
527 G4double value=0.;
528 G4double constRy =13.6057E-6;//MeV
529
530 G4int z = material->GetZ();
531
533 if(particle==electronDef){
534 G4double w = secondaryEnergy /Ebinding[z].at(level);
535 G4double t = kineticEnergy /Ebinding[z].at(level);
536 G4double tdash = kineticEnergy /CLHEP::electron_mass_c2;
537 G4double udash = Ekinetic[z].at(level)/CLHEP::electron_mass_c2;
538 G4double bdash = Ebinding[z].at(level)/CLHEP::electron_mass_c2;
539 G4double beta_t2 = 1.-1./std::pow(1.+tdash,2);
540 G4double beta_u2 = 1.-1./std::pow(1.+udash,2);
541 G4double beta_b2 = 1.-1./std::pow(1.+bdash,2);
542 G4double alpha = std::sqrt(2*constRy/CLHEP::electron_mass_c2);
543 G4double phi = std::cos(std::sqrt(std::pow(alpha,2)/(beta_t2+beta_b2))
544 *G4Log(beta_t2/beta_b2));
545 G4double constS = 4*CLHEP::pi*std::pow(CLHEP::Bohr_radius,2)
546 *Nelectrons[z].at(level)*std::pow(alpha,4);
547
548 if(secondaryEnergy<=((kineticEnergy-Ebinding[z].at(level))/2.))
549 {
550 value = constS/((beta_t2+(beta_u2+beta_b2)/iShell[z].at(level))*2.*bdash)
551 *(-phi/(t+1.)*(1./std::pow(w+1.,1.)+1./std::pow(t-w,1.))
552 *(1.+2*tdash)/std::pow(1.+tdash/2.,2.)
553 +1./std::pow(w+1.,2.)+1./std::pow(t-w,2.)
554 +std::pow(bdash,2)/std::pow(1+tdash/2.,2)
555 +(1./std::pow(w+1.,3.)+1./std::pow(t-w,3.))
556 *(G4Log(beta_t2/(1.-beta_t2))-beta_t2-G4Log(2*bdash)));
557 }
558 }
559 return value;
560}
G4double G4Log(G4double x)
Definition G4Log.hh:227
int G4int
Definition G4Types.hh:85
static G4Electron * ElectronDefinition()
Definition G4Electron.cc:86

◆ GetPartialCrossSection()

G4double G4DNARelativisticIonisationModel::GetPartialCrossSection ( const G4Material * material,
G4int level,
const G4ParticleDefinition * particle,
G4double kineticEnergy )
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 479 of file G4DNARelativisticIonisationModel.cc.

484{
485 G4double value = 0;
486 G4double constRy =13.6057E-6;//MeV
487
489 G4int z = material->GetZ();
490 if(particle==electronDef){
491
492 G4double t = kineticEnergy /Ebinding[z].at(level);
493 G4double tdash = kineticEnergy /CLHEP::electron_mass_c2;
494 G4double udash = Ekinetic[z].at(level)/CLHEP::electron_mass_c2;
495 G4double bdash = Ebinding[z].at(level)/CLHEP::electron_mass_c2;
496 G4double beta_t2 = 1.-1./std::pow(1.+tdash,2);
497 G4double beta_u2 = 1.-1./std::pow(1.+udash,2);
498 G4double beta_b2 = 1.-1./std::pow(1.+bdash,2);
499 G4double alpha = std::sqrt(2*constRy/CLHEP::electron_mass_c2);
500 G4double phi = std::cos(std::sqrt(std::pow(alpha,2)
501 /(beta_t2+beta_b2))*G4Log(beta_t2/beta_b2));
502 G4double constS = 4*CLHEP::pi*std::pow(CLHEP::Bohr_radius,2)
503 *Nelectrons[z].at(level)*std::pow(alpha,4);
504
505 if(Ebinding[z].at(level)<=kineticEnergy)
506 {
507 value =constS/((beta_t2+(beta_u2+beta_b2)/iShell[z].at(level))*2.*bdash)
508 *(1./2.*(G4Log(beta_t2/(1.-beta_t2))-beta_t2-G4Log(2.*bdash))
509 *(1.-1./std::pow(t,2.))
510 +1.-1./t-G4Log(t)/(t+1.)*(1.+2.*tdash)/(std::pow(1.+tdash/2.,2.))
511 *phi+std::pow(bdash,2)/(std::pow(1+tdash/2.,2))*(t-1)/2.);
512 }
513
514 }
515 return value;
516}

Referenced by GetTotalCrossSection().

◆ GetTotalCrossSection()

G4double G4DNARelativisticIonisationModel::GetTotalCrossSection ( const G4Material * material,
const G4ParticleDefinition * particle,
G4double kineticEnergy )
virtual

Definition at line 461 of file G4DNARelativisticIonisationModel.cc.

465{
466 G4double value=0;
467 G4int z = material->GetZ();
468 if(z!=79){ return 0.;}
469
470 std::size_t N=iState[z].size();
471 for(G4int i=0; i<(G4int)N; ++i){
472 value = value+GetPartialCrossSection(material,i,particle,kineticEnergy);
473 }
474 return value;
475}
G4double GetPartialCrossSection(const G4Material *material, G4int level, const G4ParticleDefinition *, G4double kineticEnergy) override
#define N
Definition crc32.c:57

Referenced by CrossSectionPerVolume().

◆ Initialise()

void G4DNARelativisticIonisationModel::Initialise ( const G4ParticleDefinition * particle,
const G4DataVector & = *(new G4DataVector()) )
overridevirtual

Implements G4VEmModel.

Definition at line 90 of file G4DNARelativisticIonisationModel.cc.

92{
93
94 if (verboseLevel > 3)
95 {
96 G4cout <<
97 "Calling G4DNARelativisticIonisationModel::Initialise()"
98 << G4endl;
99 }
100
101
102 if(fParticleDefinition != nullptr && fParticleDefinition != particle)
103 {
104 G4Exception("G4DNARelativisticIonisationModel::Initialise","em0001",
105 FatalException,"Model already initialized for another particle type.");
106 }
107
108 fParticleDefinition = particle;
110 if(particle == electronDef)
111 {
112 fLowEnergyLimit = 10 * eV;
113 fHighEnergyLimit = 1.0 * GeV;
114
115 std::ostringstream eFullFileNameZ;
116
117 const char *path = G4FindDataDir("G4LEDATA");
118 if (path == nullptr)
119 {
120 G4Exception("G4DNARelativisticIonisationModel::Initialise","em0006",
121 FatalException,"G4LEDATA environment variable not set.");
122 return;
123 }
124
125
126 G4ProductionCutsTable *coupletable
128 auto Ncouple = (G4int)coupletable ->GetTableSize();
129 for(G4int i=0; i<Ncouple; ++i)
130 {
131 const G4MaterialCutsCouple* couple
132 = coupletable->GetMaterialCutsCouple(i);
133 const G4Material * material = couple ->GetMaterial();
134 {
135 // Protection: only for single element
136 if(material->GetNumberOfElements()>1) continue;
137
138 G4int Z = material->GetZ();
139 // Protection: only for GOLD
140 if(Z!=79) continue;
141
142 iState [Z].clear();
143 iShell [Z].clear();
144 iSubShell [Z].clear();
145 Nelectrons[Z].clear();
146 Ebinding [Z].clear();
147 Ekinetic [Z].clear();
148 LoadAtomicStates(Z,path);
149
150 /////////////Load cumulated DCS////////////////
151 eVecEZ.clear();
152 eVecEjeEZ.clear();
153 eProbaShellMapZ.clear();
154 eDiffCrossSectionDataZ.clear();
155
156 eFullFileNameZ.str("");
157 eFullFileNameZ.clear(stringstream::goodbit);
158
159 eFullFileNameZ
160 << path
161 << "/dna/sigmadiff_cumulated_ionisation_e_RBEBV_Z"
162 << Z << ".dat";
163 std::ifstream eDiffCrossSectionZ(eFullFileNameZ.str().c_str());
164 if (!eDiffCrossSectionZ)
165 G4Exception("G4DNARelativisticIonisationModel::Initialise","em0003",
167 "Missing data file for cumulated DCS");
168
169 eVecEZ[Z].push_back(0.);
170 while(!eDiffCrossSectionZ.eof())
171 {
172 G4double tDummy;
173 G4double eDummy;
174 eDiffCrossSectionZ>>tDummy>>eDummy;
175 if (tDummy != eVecEZ[Z].back())
176 {
177 eVecEZ[Z].push_back(tDummy);
178 eVecEjeEZ[Z][tDummy].push_back(0.);
179 }
180
181 for(G4int istate=0;istate<(G4int)iState[Z].size();istate++)
182 {
183 eDiffCrossSectionZ>>
184 eDiffCrossSectionDataZ[Z][istate][tDummy][eDummy];
185 eEjectedEnergyDataZ[Z][istate][tDummy]
186 [eDiffCrossSectionDataZ[Z][istate][tDummy][eDummy]]
187 = eDummy;
188 eProbaShellMapZ[Z][istate][tDummy].push_back(
189 eDiffCrossSectionDataZ[Z][istate][tDummy][eDummy]);
190 }
191
192 if (eDummy != eVecEjeEZ[Z][tDummy].back()){
193 eVecEjeEZ[Z][tDummy].push_back(eDummy);
194 }
195 }
196 }
197 }
198 }
199 else
200 {
201 G4cout<<
202 "Error : No particle Definition is found in G4DNARelativisticIonisationModel"
203 <<G4endl;
204 return;
205 }
206
207 if( verboseLevel>0 )
208 {
209 G4cout << "Relativistic Ionisation model is initialized " << G4endl
210 << "Energy range: "
211 << LowEnergyLimit() / eV << " eV - "
212 << HighEnergyLimit() / keV << " keV for "
213 << particle->GetParticleName()
214 << G4endl;
215 }
216
217 // Initialise gold density pointer
218 fMaterialDensity = G4DNAMolecularMaterial::Instance()
220
221 fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
223
224 if (isInitialised){return;}
225 isInitialised = true;
226}
const char * G4FindDataDir(const char *)
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
const std::vector< G4double > * GetNumMolPerVolTableFor(const G4Material *) const
Retrieve a table of molecular densities (number of molecules per unit volume) in the G4 unit system f...
static G4DNAMolecularMaterial * Instance()
virtual void LoadAtomicStates(G4int z, const char *path)
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
const G4Material * GetMaterial() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
const G4String & GetParticleName() const
const G4MaterialCutsCouple * GetMaterialCutsCouple(G4int i) const
static G4ProductionCutsTable * GetProductionCutsTable()
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const

◆ LoadAtomicStates()

void G4DNARelativisticIonisationModel::LoadAtomicStates ( G4int z,
const char * path )
virtual

Definition at line 392 of file G4DNARelativisticIonisationModel.cc.

394{
395
396 if (verboseLevel > 3)
397 {
398 G4cout <<
399 "Calling LoadAtomicStates() of G4DNARelativisticIonisationModel"
400 << G4endl;
401 }
402 const char *datadir = path;
403 if(datadir == nullptr)
404 {
405 datadir = G4FindDataDir("G4LEDATA");
406 if(datadir == nullptr)
407 {
408 G4Exception("G4DNARelativisticIonisationModel::LoadAtomicStates()",
409 "em0002",FatalException,"Enviroment variable G4LEDATA not defined");
410
411 return;
412 }
413 }
414 std::ostringstream targetfile;
415 targetfile << datadir <<"/dna/atomicstate_Z"<< z <<".dat";
416 std::ifstream fin(targetfile.str().c_str());
417 if(!fin)
418 {
419 G4cout<< " Error : "<< targetfile.str() <<" is not found "<<G4endl;
420 G4Exception("G4DNARelativisticIonisationModel::LoadAtomicStates()","em0002",
421 FatalException,"There is no target file");
422 return;
423 }
424
425 G4String buff0,buff1,buff2,buff3,buff4,buff5,buff6;
426 fin >> buff0 >>buff1>>buff2>>buff3>>buff4>>buff5>>buff6;
427 G4int iline=0;
428 while(true){
429 fin >> buff0 >>buff1>>buff2>>buff3>>buff4>>buff5>>buff6;
430 if(!fin.eof())
431 {
432 iState [z].push_back(stoi(buff0));
433 iShell [z].push_back(stoi(buff1));
434 iSubShell [z].push_back(stoi(buff2));
435 Nelectrons[z].push_back(stoi(buff3));
436 Ebinding [z].push_back(stod(buff4));
437 if(stod(buff5)==0.)
438 {// if there is no kinetic energy in the file, kinetic energy
439 // for Bhor atomic model will be calculated: !!! I's not realistic!!!
440 G4double radius = std::pow(iShell[z].at(iline),2)
441 *std::pow(CLHEP::hbar_Planck,2)*(4*CLHEP::pi*CLHEP::epsilon0)
442 /CLHEP::electron_mass_c2;
443 G4double momentum = iShell[z].at(iline)*CLHEP::hbar_Planck/radius;
444 Ekinetic[z].push_back(std::pow(momentum,2)/(2*CLHEP::electron_mass_c2));
445 }
446 else
447 {
448 Ekinetic [z].push_back(stod(buff5));
449 }
450 iline++;
451 }
452 else
453 {
454 break;
455 }
456 }
457}

Referenced by Initialise().

◆ operator=()

G4DNARelativisticIonisationModel & G4DNARelativisticIonisationModel::operator= ( const G4DNARelativisticIonisationModel & right)
delete

◆ SampleSecondaries()

void G4DNARelativisticIonisationModel::SampleSecondaries ( std::vector< G4DynamicParticle * > * fvect,
const G4MaterialCutsCouple * couple,
const G4DynamicParticle * particle,
G4double tmin,
G4double maxEnergy )
overridevirtual

Implements G4VEmModel.

Definition at line 278 of file G4DNARelativisticIonisationModel.cc.

283{
284 if (verboseLevel > 3)
285 {
286 G4cout <<
287 "Calling SampleSecondaries() of G4DNARelativisticIonisationModel"
288 << G4endl;
289 }
290
291
292 G4ParticleDefinition* particleDef = particle->GetDefinition();
293 G4double k = particle->GetKineticEnergy();
294 G4double ejectedE = 0.*eV;
295
296 if(fLowEnergyLimit <= k && k<fHighEnergyLimit)
297 {
298 G4ThreeVector primaryDir = particle ->GetMomentumDirection();
299
300 G4double particleMass = particleDef->GetPDGMass();
301 G4double totalEnergy = k+particleMass;
302 G4double pSquare = k*(totalEnergy+particleMass);
303 G4double totalMomentum = std::sqrt(pSquare);
304
305 const G4Material *material = couple->GetMaterial();
306 G4int z = material->GetZ();
307 G4int level = RandomSelect(material,particleDef,k);
308
309 if(k<Ebinding[z].at(level)) return;
310
311 G4int NumSecParticlesInit =0;
312 G4int NumSecParticlesFinal=0;
313
314 if(fAtomDeexcitation != nullptr){
315 auto as = G4AtomicShellEnumerator(level);
316 const G4AtomicShell *shell = fAtomDeexcitation->GetAtomicShell(z,as);
317 NumSecParticlesInit = (G4int)fvect->size();
318 fAtomDeexcitation->GenerateParticles(fvect,shell,z,0,0);
319 NumSecParticlesFinal = (G4int)fvect->size();
320 }
321
322 ejectedE
323 = GetEjectedElectronEnergy (material,particleDef,k,level);
324 G4ThreeVector ejectedDir
325 = GetEjectedElectronDirection(particleDef,k,ejectedE);
326 ejectedDir.rotateUz(primaryDir);
327
328 G4double scatteredE = k - Ebinding[z].at(level) - ejectedE;
329
330 if(particleDef == G4Electron::ElectronDefinition()){
331 G4double secondaryTotMomentum
332 = std::sqrt(ejectedE*(ejectedE+2*CLHEP::electron_mass_c2));
333 G4double finalMomentumX
334 = totalMomentum*primaryDir.x()- secondaryTotMomentum*ejectedDir.x();
335 G4double finalMomentumY
336 = totalMomentum*primaryDir.y()- secondaryTotMomentum*ejectedDir.y();
337 G4double finalMomentumZ
338 = totalMomentum*primaryDir.z()- secondaryTotMomentum*ejectedDir.z();
339
340 G4ThreeVector scatteredDir(finalMomentumX,finalMomentumY,finalMomentumZ);
342
343 }
344 else
345 {
347 }
348
349 //G4double deexSecEnergy=0.;
350 G4double restEproduction = Ebinding[z].at(level);
351 for(G4int iparticle=NumSecParticlesInit;
352 iparticle<NumSecParticlesFinal;iparticle++)
353 {
354 //deexSecEnergy = deexSecEnergy + (*fvect)[iparticle]->GetKineticEnergy();
355 G4double Edeex = (*fvect)[iparticle]->GetKineticEnergy();
356 if(restEproduction>=Edeex){
357 restEproduction -= Edeex;
358 }
359 else{
360 delete (*fvect)[iparticle];
361 (*fvect)[iparticle]=nullptr;
362 }
363 }
364 if(restEproduction < 0.0){
365 G4Exception("G4DNARelativisticIonisationModel::SampleSecondaries()",
366 "em0008",FatalException,"Negative local energy deposit");
367 }
368
369 if(!statCode)
370 {
371 if(scatteredE>0){
374 //fParticleChangeForGamma
375 //->ProposeLocalEnergyDeposit(k-scatteredE-ejectedE-deexSecEnergy);
376 }
377 }
378 else
379 {
382 }
383
384 if(ejectedE>0){
385 auto ejectedelectron
386 = new G4DynamicParticle(G4Electron::Electron(),ejectedDir,ejectedE);
387 fvect->push_back(ejectedelectron);
388 }
389 }
390}
double z() const
double x() const
double y() const
Hep3Vector & rotateUz(const Hep3Vector &)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
Definition G4Electron.cc:91
void SetProposedKineticEnergy(G4double proposedKinEnergy)
void ProposeMomentumDirection(const G4ThreeVector &Pfinal)
virtual const G4AtomicShell * GetAtomicShell(G4int Z, G4AtomicShellEnumerator shell)=0
void GenerateParticles(std::vector< G4DynamicParticle * > *secVect, const G4AtomicShell *, G4int Z, G4int coupleIndex)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)

◆ SelectFasterComputation()

void G4DNARelativisticIonisationModel::SelectFasterComputation ( G4bool input)
inline

Definition at line 87 of file G4DNARelativisticIonisationModel.hh.

87{fasterCode = input;};

◆ SelectStationary()

void G4DNARelativisticIonisationModel::SelectStationary ( G4bool input)
inline

Definition at line 86 of file G4DNARelativisticIonisationModel.hh.

86{statCode = input;};

Member Data Documentation

◆ fParticleChangeForGamma

G4ParticleChangeForGamma* G4DNARelativisticIonisationModel::fParticleChangeForGamma
protected

The documentation for this class was generated from the following files: