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

#include <G4DNARPWBAIonisationModel.hh>

+ Inheritance diagram for G4DNARPWBAIonisationModel:

Public Member Functions

 G4DNARPWBAIonisationModel (const G4ParticleDefinition *p=nullptr, const G4String &nam="DNARPWBAIonisationModel")
 
 ~G4DNARPWBAIonisationModel () override
 
G4DNARPWBAIonisationModeloperator= (const G4DNARPWBAIonisationModel &right)=delete
 
 G4DNARPWBAIonisationModel (const G4DNARPWBAIonisationModel &)=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
 
void SampleSecondaries (std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
 
G4double GetPartialCrossSection (const G4Material *, G4int, const G4ParticleDefinition *, G4double) override
 
G4double DifferentialCrossSection (const G4double &k, const G4double &energyTransfer, const G4int &shell)
 
G4double TransferedEnergy (G4double incomingParticleEnergy, G4int shell, const G4double &random)
 
void SelectFasterComputation (const G4bool &input)
 
void SelectStationary (const G4bool &input)
 
void SelectSPScaling (const 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 53 of file G4DNARPWBAIonisationModel.hh.

Constructor & Destructor Documentation

◆ G4DNARPWBAIonisationModel() [1/2]

G4DNARPWBAIonisationModel::G4DNARPWBAIonisationModel ( const G4ParticleDefinition p = nullptr,
const G4String nam = "DNARPWBAIonisationModel" 
)

Definition at line 50 of file G4DNARPWBAIonisationModel.cc.

52 : G4VEmModel(nam)
53{
54 // Verbosity scale:
55 // 0 = nothing
56 // 1 = warning for energy non-conservation
57 // 2 = details of energy budget
58 // 3 = calculation of cross sections, file openings, sampling of atoms
59 // 4 = entering in methods
60
61 if(verboseLevel > 0)
62 {
63 G4cout << "RPWBA ionisation model is constructed " << G4endl;
64 }
67}
#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

◆ ~G4DNARPWBAIonisationModel()

G4DNARPWBAIonisationModel::~G4DNARPWBAIonisationModel ( )
override

Definition at line 71 of file G4DNARPWBAIonisationModel.cc.

72{
73 eVecm.clear();
74 pVecm.clear();
75}

◆ G4DNARPWBAIonisationModel() [2/2]

G4DNARPWBAIonisationModel::G4DNARPWBAIonisationModel ( const G4DNARPWBAIonisationModel )
delete

Member Function Documentation

◆ CrossSectionPerVolume()

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

Reimplemented from G4VEmModel.

Definition at line 223 of file G4DNARPWBAIonisationModel.cc.

226{
227 if(particleDefinition != fProtonDef)
228 {
229 G4Exception("G4DNARPWBAIonisationModel::CrossSectionPerVolume", "em0402",
230 FatalException, "Model not applicable to particle type.");
231 }
232 if(verboseLevel > 3)
233 {
234 G4cout << "Calling CrossSectionPerVolume() of G4DNARPWBAIonisationModel"
235 << G4endl;
236 }
237 G4double sigma;
238 G4double waterDensity = (*fpMolWaterDensity)[material->GetIndex()];
239
240 if(InEnergyLimit(ekin))
241 {
242 sigma = fpTotalCrossSection->FindValue(ekin);
243 }
244 else
245 {
246 // nput energy is outside this interval the cross section is set to zero
247 // should add a warning or exception ?
248 return 0;
249 }
250
251 if(verboseLevel > 2)
252 {
253 G4cout << "__________________________________" << G4endl;
254 G4cout << "G4DNARPWBAIonisationModel - XS INFO START" << G4endl;
255 G4cout << "Kinetic energy(eV)=" << ekin / eV
256 << " particle : " << fProtonDef->GetParticleName() << G4endl;
257 G4cout << "Cross section per water molecule (cm^2)=" << sigma / cm / cm
258 << G4endl;
259 G4cout << "Cross section per water molecule (cm^-1)="
260 << sigma * waterDensity / (1. / cm) << G4endl;
261 G4cout << "G4DNARPWBAIonisationModel - XS INFO END" << G4endl;
262 }
263
264 return sigma * waterDensity;
265}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:59
double G4double
Definition: G4Types.hh:83
size_t GetIndex() const
Definition: G4Material.hh:255
const G4String & GetParticleName() const

◆ DifferentialCrossSection()

G4double G4DNARPWBAIonisationModel::DifferentialCrossSection ( const G4double k,
const G4double energyTransfer,
const G4int shell 
)

Definition at line 448 of file G4DNARPWBAIonisationModel.cc.

451{
452 G4double k = kine;
453 G4double sigma = 0.;
454 if(energyTransfer >=
455 waterStructure.IonisationEnergy(ionizationLevelIndex) / eV)
456 {
457 G4double valueT1 = 0;
458 G4double valueT2 = 0;
459 G4double valueE21 = 0;
460 G4double valueE22 = 0;
461 G4double valueE12 = 0;
462 G4double valueE11 = 0;
463
464 G4double xs11 = 0;
465 G4double xs12 = 0;
466 G4double xs21 = 0;
467 G4double xs22 = 0;
468
469 // Protection against out of boundary access - proton case : 100 MeV
470
471 if(k == pTdummyVec.back())
472 {
473 k = k * (1. - 1e-12);
474 }
475 // k should be in eV and energy transfer eV also
476 auto t2 = std::upper_bound(pTdummyVec.begin(), pTdummyVec.end(), k);
477 auto t1 = t2 - 1;
478
479 auto e12 = std::upper_bound(pVecm[(*t1)].begin(), pVecm[(*t1)].end(),
480 energyTransfer);
481 auto e11 = e12 - 1;
482
483 auto e22 = std::upper_bound(pVecm[(*t2)].begin(), pVecm[(*t2)].end(),
484 energyTransfer);
485 auto e21 = e22 - 1;
486
487 valueT1 = *t1;
488 valueT2 = *t2;
489 valueE21 = *e21;
490 valueE22 = *e22;
491 valueE12 = *e12;
492 valueE11 = *e11;
493
494 xs11 = pDiffCrossSectionData[ionizationLevelIndex][valueT1][valueE11];
495 xs12 = pDiffCrossSectionData[ionizationLevelIndex][valueT1][valueE12];
496 xs21 = pDiffCrossSectionData[ionizationLevelIndex][valueT2][valueE21];
497 xs22 = pDiffCrossSectionData[ionizationLevelIndex][valueT2][valueE22];
498
499 G4double xsProduct = xs11 * xs12 * xs21 * xs22;
500 if(xsProduct != 0.)
501 {
502 sigma =
503 QuadInterpolator(valueE11, valueE12, valueE21, valueE22, xs11, xs12,
504 xs21, xs22, valueT1, valueT2, k, energyTransfer);
505 }
506 }
507 return sigma;
508}

◆ GetPartialCrossSection()

G4double G4DNARPWBAIonisationModel::GetPartialCrossSection ( const G4Material ,
G4int  level,
const G4ParticleDefinition particle,
G4double  kineticEnergy 
)
overridevirtual

Reimplemented from G4VEmModel.

Definition at line 577 of file G4DNARPWBAIonisationModel.cc.

580{
581 if(fpTotalCrossSection != nullptr && particle != fProtonDef)
582 {
583 G4Exception("G4DNARPWBAIonisationModel::GetPartialCrossSection", "em0010",
584 FatalException, "Model not applicable to particle type.");
585 }
586 return fpTotalCrossSection->GetComponent(level)->FindValue(kineticEnergy);
587}

◆ Initialise()

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

Implements G4VEmModel.

Definition at line 179 of file G4DNARPWBAIonisationModel.cc.

181{
182 if(isInitialised)
183 {
184 return;
185 }
186 if(verboseLevel > 3)
187 {
188 G4cout << "Calling G4DNARPWBAIonisationModel::Initialise()"
189 << particle->GetParticleName() << G4endl;
190 }
191
192 InitialiseForProton(particle);
193
194 if(verboseLevel > 0)
195 {
196 G4cout << "RPWBA ionisation model is initialized " << G4endl
197 << "Energy range: " << LowEnergyLimit() / MeV << " MeV - "
198 << HighEnergyLimit() / MeV << " MeV for "
199 << particle->GetParticleName() << G4endl;
200 }
201
202 // Initialize water density pointer
203 if(G4Material::GetMaterial("G4_WATER") != nullptr)
204 {
205 fpMolWaterDensity =
207 G4Material::GetMaterial("G4_WATER"));
208 }
209 else
210 {
211 G4ExceptionDescription exceptionDescription;
212 exceptionDescription << "G4_WATER does not exist :";
213 G4Exception("G4DNARPWBAIonisationModel::Initialise", "em00020",
214 FatalException, exceptionDescription);
215 }
216 fAtomDeexcitation = G4LossTableManager::Instance()->AtomDeexcitation();
218 isInitialised = true;
219}
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
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
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:124
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:641
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:634

◆ operator=()

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

◆ SampleSecondaries()

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

Implements G4VEmModel.

Definition at line 269 of file G4DNARPWBAIonisationModel.cc.

272{
273 if(verboseLevel > 3)
274 {
275 G4cout << "Calling SampleSecondaries() of G4DNARPWBAIonisationModel"
276 << G4endl;
277 }
278 G4double k = particle->GetKineticEnergy();
279 if(InEnergyLimit(k))
280 {
281 G4ParticleMomentum primaryDirection = particle->GetMomentumDirection();
282 G4double particleMass = particle->GetDefinition()->GetPDGMass();
283 G4double totalEnergy = k + particleMass;
284 G4double pSquare = k * (totalEnergy + particleMass);
285 G4double totalMomentum = std::sqrt(pSquare);
286 G4int ionizationShell;
287
288 if(!fasterCode)
289 {
290 ionizationShell = RandomSelect(k);
291 }
292 else
293 {
294 // fasterCode = true
295 do
296 {
297 ionizationShell = RandomSelect(k);
298 } while(k < 19 * eV && ionizationShell == 2 &&
300 }
301
302 G4double bindingEnergy = waterStructure.IonisationEnergy(ionizationShell);
303
304 // SI: additional protection if tcs interpolation method is modified
305 if(k < bindingEnergy)
306 {
307 return;
308 }
309 //
310 G4double secondaryKinetic;
311 if(!fasterCode)
312 {
313 secondaryKinetic = RandomizeEjectedElectronEnergy(k, ionizationShell);
314 }
315 else
316 {
317 secondaryKinetic =
318 RandomizeEjectedElectronEnergyFromCumulatedDcs(k, ionizationShell);
319 }
320
321 G4int Z = 8; // water Z (6 Oxygen + 2 hydrogen)
322 G4ThreeVector deltaDirection =
324 particle, secondaryKinetic, Z, ionizationShell, couple->GetMaterial());
325
326 if(secondaryKinetic > 0){
327 auto dp = new G4DynamicParticle(G4Electron::Electron(), deltaDirection,
328 secondaryKinetic);
329 fvect->push_back(dp);
330 }
331
333 G4double deltaTotalMomentum = std::sqrt(
334 secondaryKinetic * (secondaryKinetic + 2. * electron_mass_c2));
335
336 G4double finalPx = totalMomentum * primaryDirection.x() -
337 deltaTotalMomentum * deltaDirection.x();
338 G4double finalPy = totalMomentum * primaryDirection.y() -
339 deltaTotalMomentum * deltaDirection.y();
340 G4double finalPz = totalMomentum * primaryDirection.z() -
341 deltaTotalMomentum * deltaDirection.z();
342 G4double finalMomentum =
343 std::sqrt(finalPx * finalPx + finalPy * finalPy + finalPz * finalPz);
344 finalPx /= finalMomentum;
345 finalPy /= finalMomentum;
346 finalPz /= finalMomentum;
347 G4ThreeVector direction;
348 direction.set(finalPx, finalPy, finalPz);
350 }
351 else
352 {
354 }
355
356 // AM: sample deexcitation
357 // here we assume that H_{2}O electronic levels are the same as Oxygen.
358 // this can be considered true with a rough 10% error in energy on K-shell,
359
360 size_t secNumberInit; // need to know at a certain point the energy of
361 // secondaries
362 size_t
363 secNumberFinal; // So I'll make the diference and then sum the energies
364
365 G4double scatteredEnergy = k - bindingEnergy - secondaryKinetic;
366
367 // SI: only atomic deexcitation from K shell is considered
368 if((fAtomDeexcitation != nullptr) && ionizationShell == 4)
369 {
370 const G4AtomicShell* shell =
371 fAtomDeexcitation->GetAtomicShell(Z, G4AtomicShellEnumerator(0));
372 secNumberInit = fvect->size();
373 fAtomDeexcitation->GenerateParticles(fvect, shell, Z, 0, 0);
374 secNumberFinal = fvect->size();
375
376 if(secNumberFinal > secNumberInit){
377 for(size_t i = secNumberInit; i < secNumberFinal; ++i){
378 if(bindingEnergy >= ((*fvect)[i])->GetKineticEnergy())
379 {
380 bindingEnergy -= ((*fvect)[i])->GetKineticEnergy();
381 }else{
382 delete(*fvect)[i];
383 (*fvect)[i] = nullptr;
384 }
385 }
386 }
387 }
388
389 // This should never happen
390 if(bindingEnergy < 0.0)
391 {
392 G4Exception("G4DNARPWBAIonisatioModel::SampleSecondaries()", "em2050",
393 FatalException, "Negative local energy deposit");
394 }
395
396 // bindingEnergy has been decreased
397 // by the amount of energy taken away by deexc. products
398 if(!statCode){
401 }else{
404 }
405 const G4Track* theIncomingTrack =
408 eIonizedMolecule, ionizationShell, theIncomingTrack);
409 }
410}
G4AtomicShellEnumerator
@ eIonizedMolecule
int G4int
Definition: G4Types.hh:85
const G4int Z[17]
double z() const
Hep3Vector unit() const
double x() const
double y() const
void set(double x, double y, double z)
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * ElectronDefinition()
Definition: G4Electron.cc:88
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
const G4Track * GetCurrentTrack() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
G4double bindingEnergy(G4int A, G4int Z)

◆ SelectFasterComputation()

void G4DNARPWBAIonisationModel::SelectFasterComputation ( const G4bool input)
inline

Definition at line 135 of file G4DNARPWBAIonisationModel.hh.

137{
138 fasterCode = input;
139}

◆ SelectSPScaling()

void G4DNARPWBAIonisationModel::SelectSPScaling ( const G4bool input)
inline

Definition at line 148 of file G4DNARPWBAIonisationModel.hh.

149{
150 spScaling = input;
151}

◆ SelectStationary()

void G4DNARPWBAIonisationModel::SelectStationary ( const G4bool input)
inline

Definition at line 142 of file G4DNARPWBAIonisationModel.hh.

143{
144 statCode = input;
145}

◆ TransferedEnergy()

G4double G4DNARPWBAIonisationModel::TransferedEnergy ( G4double  incomingParticleEnergy,
G4int  shell,
const G4double random 
)

Definition at line 647 of file G4DNARPWBAIonisationModel.cc.

650{
651 G4double nrj = 0.;
652 G4double valueK1 = 0;
653 G4double valueK2 = 0;
654 G4double valuePROB21 = 0;
655 G4double valuePROB22 = 0;
656 G4double valuePROB12 = 0;
657 G4double valuePROB11 = 0;
658 G4double nrjTransf11 = 0;
659 G4double nrjTransf12 = 0;
660 G4double nrjTransf21 = 0;
661 G4double nrjTransf22 = 0;
662 // Protection against out of boundary access - proton case : 100 MeV
663 if(k == pTdummyVec.back())
664 {
665 k = k * (1. - 1e-12);
666 }
667 // k should be in eV
668
669 auto k2 = std::upper_bound(pTdummyVec.begin(), pTdummyVec.end(), k);
670 auto k1 = k2 - 1;
671
672 // SI : the following condition avoids situations where random > last vector
673 // element,
674 // for eg. when the last element is zero
675 if(random <= pProbaShellMap[ionizationLevelIndex][(*k1)].back() &&
676 random <= pProbaShellMap[ionizationLevelIndex][(*k2)].back())
677 {
678 auto prob12 = std::upper_bound(
679 pProbaShellMap[ionizationLevelIndex][(*k1)].begin(),
680 pProbaShellMap[ionizationLevelIndex][(*k1)].end(), random);
681 auto prob11 = prob12 - 1;
682 auto prob22 = std::upper_bound(
683 pProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
684 pProbaShellMap[ionizationLevelIndex][(*k2)].end(), random);
685
686 auto prob21 = prob22 - 1;
687
688 valueK1 = *k1;
689 valueK2 = *k2;
690 valuePROB21 = *prob21;
691 valuePROB22 = *prob22;
692 valuePROB12 = *prob12;
693 valuePROB11 = *prob11;
694
695 nrjTransf11 = pNrjTransfData[ionizationLevelIndex][valueK1][valuePROB11];
696 nrjTransf12 = pNrjTransfData[ionizationLevelIndex][valueK1][valuePROB12];
697 nrjTransf21 = pNrjTransfData[ionizationLevelIndex][valueK2][valuePROB21];
698 nrjTransf22 = pNrjTransfData[ionizationLevelIndex][valueK2][valuePROB22];
699 }
700
701 // Avoids cases where cum xs is zero for k1 and is not for k2 (with always
702 // k1<k2)
703
704 if(random > pProbaShellMap[ionizationLevelIndex][(*k1)].back())
705 {
706 auto prob22 = std::upper_bound(
707 pProbaShellMap[ionizationLevelIndex][(*k2)].begin(),
708 pProbaShellMap[ionizationLevelIndex][(*k2)].end(), random);
709 auto prob21 = prob22 - 1;
710
711 valueK1 = *k1;
712 valueK2 = *k2;
713 valuePROB21 = *prob21;
714 valuePROB22 = *prob22;
715 nrjTransf21 = pNrjTransfData[ionizationLevelIndex][valueK2][valuePROB21];
716 nrjTransf22 = pNrjTransfData[ionizationLevelIndex][valueK2][valuePROB22];
717
718 G4double interpolatedvalue2 =
719 Interpolate(valuePROB21, valuePROB22, random, nrjTransf21, nrjTransf22);
720
721 G4double value = Interpolate(valueK1, valueK2, k, 0., interpolatedvalue2);
722 return value;
723 }
724 G4double nrjTransfProduct =
725 nrjTransf11 * nrjTransf12 * nrjTransf21 * nrjTransf22;
726
727 if(nrjTransfProduct != 0.)
728 {
729 nrj = QuadInterpolator(valuePROB11, valuePROB12, valuePROB21, valuePROB22,
730 nrjTransf11, nrjTransf12, nrjTransf21, nrjTransf22,
731 valueK1, valueK2, k, random);
732 }
733 return nrj;
734}

Member Data Documentation

◆ fParticleChangeForGamma

G4ParticleChangeForGamma* G4DNARPWBAIonisationModel::fParticleChangeForGamma = nullptr
protected

Definition at line 83 of file G4DNARPWBAIonisationModel.hh.

Referenced by Initialise(), and SampleSecondaries().


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