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

#include <G4DNARuddIonisationModel.hh>

+ Inheritance diagram for G4DNARuddIonisationModel:

Public Member Functions

 G4DNARuddIonisationModel (const G4ParticleDefinition *p=0, const G4String &nam="DNARuddIonisationModel")
 
virtual ~G4DNARuddIonisationModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)
 
virtual G4double CrossSectionPerVolume (const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
 
void SelectStationary (G4bool input)
 
- Public Member Functions inherited from G4VEmModel
 G4VEmModel (const G4String &nam)
 
virtual ~G4VEmModel ()
 
virtual void Initialise (const G4ParticleDefinition *, const G4DataVector &)=0
 
virtual void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin=0.0, G4double tmax=DBL_MAX)=0
 
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 CrossSectionPerVolume (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
virtual G4double GetPartialCrossSection (const G4Material *, G4int level, const G4ParticleDefinition *, G4double kineticEnergy)
 
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 LPMFlag () 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 SetLPMFlag (G4bool val)
 
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)
 
G4VEmModeloperator= (const G4VEmModel &right)=delete
 
 G4VEmModel (const G4VEmModel &)=delete
 

Protected Attributes

G4ParticleChangeForGammafParticleChangeForGamma = nullptr
 
- 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
 
size_t currentCoupleIndex = 0
 
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 45 of file G4DNARuddIonisationModel.hh.

Constructor & Destructor Documentation

◆ G4DNARuddIonisationModel()

G4DNARuddIonisationModel::G4DNARuddIonisationModel ( const G4ParticleDefinition p = 0,
const G4String nam = "DNARuddIonisationModel" 
)

Definition at line 49 of file G4DNARuddIonisationModel.cc.

50 :
51G4VEmModel(nam), isInitialised(false)
52{
53 slaterEffectiveCharge[0] = 0.;
54 slaterEffectiveCharge[1] = 0.;
55 slaterEffectiveCharge[2] = 0.;
56 sCoefficient[0] = 0.;
57 sCoefficient[1] = 0.;
58 sCoefficient[2] = 0.;
59
60 lowEnergyLimitForZ1 = 0 * eV;
61 lowEnergyLimitForZ2 = 0 * eV;
62 lowEnergyLimitOfModelForZ1 = 100 * eV;
63 lowEnergyLimitOfModelForZ2 = 1 * keV;
64 killBelowEnergyForZ1 = lowEnergyLimitOfModelForZ1;
65 killBelowEnergyForZ2 = lowEnergyLimitOfModelForZ2;
66
67 verboseLevel = 0;
68 // Verbosity scale:
69 // 0 = nothing
70 // 1 = warning for energy non-conservation
71 // 2 = details of energy budget
72 // 3 = calculation of cross sections, file openings, sampling of atoms
73 // 4 = entering in methods
74
75 if (verboseLevel > 0)
76 {
77 G4cout << "Rudd ionisation model is constructed " << G4endl;
78 }
79
80 // Define default angular generator
82
83 // Mark this model as "applicable" for atomic deexcitation
85
86 // Selection of stationary mode
87
88 statCode = false;
89}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void SetDeexcitationFlag(G4bool val)
Definition: G4VEmModel.hh:802
void SetAngularDistribution(G4VEmAngularDistribution *)
Definition: G4VEmModel.hh:607

◆ ~G4DNARuddIonisationModel()

G4DNARuddIonisationModel::~G4DNARuddIonisationModel ( )
virtual

Definition at line 93 of file G4DNARuddIonisationModel.cc.

94{
95 // Cross section
96
97 std::map<G4String, G4DNACrossSectionDataSet*, std::less<G4String> >::iterator pos;
98 for (pos = tableData.begin(); pos != tableData.end(); ++pos)
99 {
100 G4DNACrossSectionDataSet* table = pos->second;
101 delete table;
102 }
103
104 // The following removal is forbidden since G4VEnergyLossmodel takes care of deletion
105 // Coverity however will signal this as an error
106 // if (fAtomDeexcitation) {delete fAtomDeexcitation;}
107
108}

Member Function Documentation

◆ CrossSectionPerVolume()

G4double G4DNARuddIonisationModel::CrossSectionPerVolume ( const G4Material material,
const G4ParticleDefinition p,
G4double  ekin,
G4double  emin,
G4double  emax 
)
virtual

Reimplemented from G4VEmModel.

Definition at line 287 of file G4DNARuddIonisationModel.cc.

292{
293 if (verboseLevel > 3)
294 {
295 G4cout << "Calling CrossSectionPerVolume() of G4DNARuddIonisationModel"
296 << G4endl;
297 }
298
299 // Calculate total cross section for model
300
301 if (
302 particleDefinition != protonDef
303 &&
304 particleDefinition != hydrogenDef
305 &&
306 particleDefinition != alphaPlusPlusDef
307 &&
308 particleDefinition != alphaPlusDef
309 &&
310 particleDefinition != heliumDef
311 )
312
313 return 0;
314
315 G4double lowLim = 0;
316
317 if ( particleDefinition == protonDef
318 || particleDefinition == hydrogenDef
319 )
320
321 lowLim = lowEnergyLimitOfModelForZ1;
322
323 if ( particleDefinition == alphaPlusPlusDef
324 || particleDefinition == alphaPlusDef
325 || particleDefinition == heliumDef
326 )
327
328 lowLim = lowEnergyLimitOfModelForZ2;
329
330 G4double highLim = 0;
331 G4double sigma=0;
332
333 G4double waterDensity = (*fpWaterDensity)[material->GetIndex()];
334
335 const G4String& particleName = particleDefinition->GetParticleName();
336
337 // SI - the following is useless since lowLim is already defined
338 /*
339 std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
340 pos1 = lowEnergyLimit.find(particleName);
341
342 if (pos1 != lowEnergyLimit.end())
343 {
344 lowLim = pos1->second;
345 }
346 */
347
348 std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
349 pos2 = highEnergyLimit.find(particleName);
350
351 if (pos2 != highEnergyLimit.end())
352 {
353 highLim = pos2->second;
354 }
355
356 if (k <= highLim)
357 {
358 //SI : XS must not be zero otherwise sampling of secondaries method ignored
359
360 if (k < lowLim) k = lowLim;
361
362 //
363
364 std::map< G4String,G4DNACrossSectionDataSet*,std::less<G4String> >::iterator pos;
365 pos = tableData.find(particleName);
366
367 if (pos != tableData.end())
368 {
369 G4DNACrossSectionDataSet* table = pos->second;
370 if (table != 0)
371 {
372 sigma = table->FindValue(k);
373 }
374 }
375 else
376 {
377 G4Exception("G4DNARuddIonisationModel::CrossSectionPerVolume","em0002",
378 FatalException,"Model not applicable to particle type.");
379 }
380
381 }
382
383 if (verboseLevel > 2)
384 {
385 G4cout << "__________________________________" << G4endl;
386 G4cout << "G4DNARuddIonisationModel - XS INFO START" << G4endl;
387 G4cout << "Kinetic energy(eV)=" << k/eV << " particle : " << particleDefinition->GetParticleName() << G4endl;
388 G4cout << "Cross section per water molecule (cm^2)=" << sigma/cm/cm << G4endl;
389 G4cout << "Cross section per water molecule (cm^-1)=" << sigma*waterDensity/(1./cm) << G4endl;
390 //G4cout << " - Cross section per water molecule (cm^-1)="
391 //<< sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl;
392 G4cout << "G4DNARuddIonisationModel - XS INFO END" << G4endl;
393 }
394
395 return sigma*waterDensity;
396
397}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
double G4double
Definition: G4Types.hh:83
virtual G4double FindValue(G4double e, G4int componentId=0) const
size_t GetIndex() const
Definition: G4Material.hh:255

◆ Initialise()

void G4DNARuddIonisationModel::Initialise ( const G4ParticleDefinition particle,
const G4DataVector  
)
virtual

Implements G4VEmModel.

Definition at line 112 of file G4DNARuddIonisationModel.cc.

114{
115
116 if (verboseLevel > 3)
117 {
118 G4cout << "Calling G4DNARuddIonisationModel::Initialise()" << G4endl;
119 }
120
121 // Energy limits
122
123 G4String fileProton("dna/sigma_ionisation_p_rudd");
124 G4String fileHydrogen("dna/sigma_ionisation_h_rudd");
125 G4String fileAlphaPlusPlus("dna/sigma_ionisation_alphaplusplus_rudd");
126 G4String fileAlphaPlus("dna/sigma_ionisation_alphaplus_rudd");
127 G4String fileHelium("dna/sigma_ionisation_he_rudd");
128
129 G4DNAGenericIonsManager *instance;
131 protonDef = G4Proton::ProtonDefinition();
132 hydrogenDef = instance->GetIon("hydrogen");
133 alphaPlusPlusDef = G4Alpha::Alpha();
134 alphaPlusDef = instance->GetIon("alpha+");
135 heliumDef = instance->GetIon("helium");
136
138 G4String hydrogen;
139 G4String alphaPlusPlus;
140 G4String alphaPlus;
141 G4String helium;
142
143 G4double scaleFactor = 1 * m*m;
144
145 // LIMITS AND DATA
146
147 // ********************************************************
148
149 proton = protonDef->GetParticleName();
150 tableFile[proton] = fileProton;
151
152 lowEnergyLimit[proton] = lowEnergyLimitForZ1;
153 highEnergyLimit[proton] = 500. * keV;
154
155 // Cross section
156
158 eV,
159 scaleFactor );
160 tableProton->LoadData(fileProton);
161 tableData[proton] = tableProton;
162
163 // ********************************************************
164
165 hydrogen = hydrogenDef->GetParticleName();
166 tableFile[hydrogen] = fileHydrogen;
167
168 lowEnergyLimit[hydrogen] = lowEnergyLimitForZ1;
169 highEnergyLimit[hydrogen] = 100. * MeV;
170
171 // Cross section
172
174 eV,
175 scaleFactor );
176 tableHydrogen->LoadData(fileHydrogen);
177
178 tableData[hydrogen] = tableHydrogen;
179
180 // ********************************************************
181
182 alphaPlusPlus = alphaPlusPlusDef->GetParticleName();
183 tableFile[alphaPlusPlus] = fileAlphaPlusPlus;
184
185 lowEnergyLimit[alphaPlusPlus] = lowEnergyLimitForZ2;
186 highEnergyLimit[alphaPlusPlus] = 400. * MeV;
187
188 // Cross section
189
191 eV,
192 scaleFactor );
193 tableAlphaPlusPlus->LoadData(fileAlphaPlusPlus);
194
195 tableData[alphaPlusPlus] = tableAlphaPlusPlus;
196
197 // ********************************************************
198
199 alphaPlus = alphaPlusDef->GetParticleName();
200 tableFile[alphaPlus] = fileAlphaPlus;
201
202 lowEnergyLimit[alphaPlus] = lowEnergyLimitForZ2;
203 highEnergyLimit[alphaPlus] = 400. * MeV;
204
205 // Cross section
206
208 eV,
209 scaleFactor );
210 tableAlphaPlus->LoadData(fileAlphaPlus);
211 tableData[alphaPlus] = tableAlphaPlus;
212
213 // ********************************************************
214
215 helium = heliumDef->GetParticleName();
216 tableFile[helium] = fileHelium;
217
218 lowEnergyLimit[helium] = lowEnergyLimitForZ2;
219 highEnergyLimit[helium] = 400. * MeV;
220
221 // Cross section
222
224 eV,
225 scaleFactor );
226 tableHelium->LoadData(fileHelium);
227 tableData[helium] = tableHelium;
228
229 //
230
231 if (particle==protonDef)
232 {
233 SetLowEnergyLimit(lowEnergyLimit[proton]);
234 SetHighEnergyLimit(highEnergyLimit[proton]);
235 }
236
237 if (particle==hydrogenDef)
238 {
239 SetLowEnergyLimit(lowEnergyLimit[hydrogen]);
240 SetHighEnergyLimit(highEnergyLimit[hydrogen]);
241 }
242
243 if (particle==heliumDef)
244 {
245 SetLowEnergyLimit(lowEnergyLimit[helium]);
246 SetHighEnergyLimit(highEnergyLimit[helium]);
247 }
248
249 if (particle==alphaPlusDef)
250 {
251 SetLowEnergyLimit(lowEnergyLimit[alphaPlus]);
252 SetHighEnergyLimit(highEnergyLimit[alphaPlus]);
253 }
254
255 if (particle==alphaPlusPlusDef)
256 {
257 SetLowEnergyLimit(lowEnergyLimit[alphaPlusPlus]);
258 SetHighEnergyLimit(highEnergyLimit[alphaPlusPlus]);
259 }
260
261 if( verboseLevel>0 )
262 {
263 G4cout << "Rudd ionisation model is initialized " << G4endl
264 << "Energy range: "
265 << LowEnergyLimit() / eV << " eV - "
266 << HighEnergyLimit() / keV << " keV for "
267 << particle->GetParticleName()
268 << G4endl;
269 }
270
271 // Initialize water density pointer
273
274 //
275
276 fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
277
278 if (isInitialised)
279 { return;}
281 isInitialised = true;
282
283}
static G4Alpha * Alpha()
Definition: G4Alpha.cc:88
virtual G4bool LoadData(const G4String &argFileName)
static G4DNAGenericIonsManager * Instance(void)
G4ParticleDefinition * GetIon(const G4String &name)
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()
G4ParticleChangeForGamma * fParticleChangeForGamma
static G4LossTableManager * Instance()
G4VAtomDeexcitation * AtomDeexcitation()
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:691
const G4String & GetParticleName() const
static G4Proton * ProtonDefinition()
Definition: G4Proton.cc:87
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:746
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:124
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:641
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:634
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:753

◆ SampleSecondaries()

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

Implements G4VEmModel.

Definition at line 401 of file G4DNARuddIonisationModel.cc.

406{
407 if (verboseLevel > 3)
408 {
409 G4cout << "Calling SampleSecondaries() of G4DNARuddIonisationModel"
410 << G4endl;
411 }
412
413 G4double lowLim = 0;
414 G4double highLim = 0;
415
416 if ( particle->GetDefinition() == protonDef
417 || particle->GetDefinition() == hydrogenDef
418 )
419
420 lowLim = killBelowEnergyForZ1;
421
422 if ( particle->GetDefinition() == alphaPlusPlusDef
423 || particle->GetDefinition() == alphaPlusDef
424 || particle->GetDefinition() == heliumDef
425 )
426
427 lowLim = killBelowEnergyForZ2;
428
429 G4double k = particle->GetKineticEnergy();
430
431 const G4String& particleName = particle->GetDefinition()->GetParticleName();
432
433 // SI - the following is useless since lowLim is already defined
434 /*
435 std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
436 pos1 = lowEnergyLimit.find(particleName);
437
438 if (pos1 != lowEnergyLimit.end())
439 {
440 lowLim = pos1->second;
441 }
442 */
443
444 std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
445 pos2 = highEnergyLimit.find(particleName);
446
447 if (pos2 != highEnergyLimit.end())
448 {
449 highLim = pos2->second;
450 }
451
452 if (k >= lowLim && k <= highLim)
453 {
454 G4ParticleDefinition* definition = particle->GetDefinition();
455 G4ParticleMomentum primaryDirection = particle->GetMomentumDirection();
456 /*
457 G4double particleMass = definition->GetPDGMass();
458 G4double totalEnergy = k + particleMass;
459 G4double pSquare = k*(totalEnergy+particleMass);
460 G4double totalMomentum = std::sqrt(pSquare);
461 */
462
463 G4int ionizationShell = RandomSelect(k,particleName);
464
466 bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
467
468 //SI: additional protection if tcs interpolation method is modified
469 if (k<bindingEnergy) return;
470 //
471
472 // SI - For atom. deexc. tagging - 23/05/2017
473 G4int Z = 8;
474 //
475
476 G4double secondaryKinetic = RandomizeEjectedElectronEnergy(definition,k,ionizationShell);
477
478 G4ThreeVector deltaDirection =
479 GetAngularDistribution()->SampleDirectionForShell(particle, secondaryKinetic,
480 Z, ionizationShell,
481 couple->GetMaterial());
482
483 G4DynamicParticle* dp = new G4DynamicParticle (G4Electron::Electron(),deltaDirection,secondaryKinetic);
484 fvect->push_back(dp);
485
486 // Ignored for ions on electrons
487 /*
488 G4double deltaTotalMomentum = std::sqrt(secondaryKinetic*(secondaryKinetic + 2.*electron_mass_c2 ));
489
490 G4double finalPx = totalMomentum*primaryDirection.x() - deltaTotalMomentum*deltaDirection.x();
491 G4double finalPy = totalMomentum*primaryDirection.y() - deltaTotalMomentum*deltaDirection.y();
492 G4double finalPz = totalMomentum*primaryDirection.z() - deltaTotalMomentum*deltaDirection.z();
493 G4double finalMomentum = std::sqrt(finalPx*finalPx+finalPy*finalPy+finalPz*finalPz);
494 finalPx /= finalMomentum;
495 finalPy /= finalMomentum;
496 finalPz /= finalMomentum;
497
498 G4ThreeVector direction;
499 direction.set(finalPx,finalPy,finalPz);
500
501 fParticleChangeForGamma->ProposeMomentumDirection(direction.unit()) ;
502 */
503
505
506 // sample deexcitation
507 // here we assume that H_{2}O electronic levels are the same of Oxigen.
508 // this can be considered true with a rough 10% error in energy on K-shell,
509
510 size_t secNumberInit = 0;// need to know at a certain point the energy of secondaries
511 size_t secNumberFinal = 0;// So I'll make the diference and then sum the energies
512
513 G4double scatteredEnergy = k-bindingEnergy-secondaryKinetic;
514
515 // SI: only atomic deexcitation from K shell is considered
516 if(fAtomDeexcitation && ionizationShell == 4)
517 {
518 const G4AtomicShell* shell
519 = fAtomDeexcitation->GetAtomicShell(Z, G4AtomicShellEnumerator(0));
520 secNumberInit = fvect->size();
521 fAtomDeexcitation->GenerateParticles(fvect, shell, Z, 0, 0);
522 secNumberFinal = fvect->size();
523
524 if(secNumberFinal > secNumberInit)
525 {
526 for (size_t i=secNumberInit; i<secNumberFinal; ++i)
527 {
528 //Check if there is enough residual energy
529 if (bindingEnergy >= ((*fvect)[i])->GetKineticEnergy())
530 {
531 //Ok, this is a valid secondary: keep it
532 bindingEnergy -= ((*fvect)[i])->GetKineticEnergy();
533 }
534 else
535 {
536 //Invalid secondary: not enough energy to create it!
537 //Keep its energy in the local deposit
538 delete (*fvect)[i];
539 (*fvect)[i]=0;
540 }
541 }
542 }
543
544 }
545
546 //This should never happen
547 if(bindingEnergy < 0.0)
548 G4Exception("G4DNAEmfietzoglouIonisatioModel1::SampleSecondaries()",
549 "em2050",FatalException,"Negative local energy deposit");
550
551 //bindingEnergy has been decreased
552 //by the amount of energy taken away by deexc. products
553 if (!statCode)
554 {
557 }
558 else
559 {
562 }
563
564 // debug
565 // k-scatteredEnergy-secondaryKinetic-deexSecEnergy = k-(k-bindingEnergy-secondaryKinetic)-secondaryKinetic-deexSecEnergy =
566 // = k-k+bindingEnergy+secondaryKinetic-secondaryKinetic-deexSecEnergy=
567 // = bindingEnergy-deexSecEnergy
568 // SO deexSecEnergy=0 => LocalEnergyDeposit = bindingEnergy
569
570 // TEST //////////////////////////
571 // if (secondaryKinetic<0) abort();
572 // if (scatteredEnergy<0) abort();
573 // if (k-scatteredEnergy-secondaryKinetic-deexSecEnergy<0) abort();
574 // if (k-scatteredEnergy<0) abort();
575 /////////////////////////////////
576
577 const G4Track * theIncomingTrack = fParticleChangeForGamma->GetCurrentTrack();
579 ionizationShell,
580 theIncomingTrack);
581 }
582
583 // SI - not useful since low energy of model is 0 eV
584
585 if (k < lowLim)
586 {
590 }
591
592}
G4AtomicShellEnumerator
@ eIonizedMolecule
@ fStopAndKill
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
Definition: G4Electron.cc:93
const G4Material * GetMaterial() const
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)
virtual G4ThreeVector & SampleDirectionForShell(const G4DynamicParticle *dp, G4double finalTotalEnergy, G4int Z, G4int shellID, const G4Material *)
G4VEmAngularDistribution * GetAngularDistribution()
Definition: G4VEmModel.hh:600
void ProposeTrackStatus(G4TrackStatus status)
const G4Track * GetCurrentTrack() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double bindingEnergy(G4int A, G4int Z)

◆ SelectStationary()

void G4DNARuddIonisationModel::SelectStationary ( G4bool  input)
inline

Definition at line 169 of file G4DNARuddIonisationModel.hh.

170{
171 statCode = input;
172}

Member Data Documentation

◆ fParticleChangeForGamma

G4ParticleChangeForGamma* G4DNARuddIonisationModel::fParticleChangeForGamma = nullptr
protected

Definition at line 73 of file G4DNARuddIonisationModel.hh.

Referenced by Initialise(), and SampleSecondaries().


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