50 G4cout <<
"Dingfelder charge increase model is constructed " <<
G4endl;
62 G4cout <<
"Calling G4DNADingfelderChargeIncreaseModel::Initialise()"
70 hydrogenDef = instance->
GetIon(
"hydrogen");
72 alphaPlusDef = instance->
GetIon(
"alpha+");
73 heliumDef = instance->
GetIon(
"helium");
82 lowEnergyLimit[hydrogen] = 100. * eV;
83 highEnergyLimit[hydrogen] = 100. * MeV;
86 lowEnergyLimit[alphaPlus] = 1. * keV;
87 highEnergyLimit[alphaPlus] = 400. * MeV;
90 lowEnergyLimit[helium] = 1. * keV;
91 highEnergyLimit[helium] = 400. * MeV;
95 if (particle==hydrogenDef)
101 if (particle==alphaPlusDef)
107 if (particle==heliumDef)
128 numberOfPartialCrossSections[0]=1;
154 numberOfPartialCrossSections[1]=2;
160 G4cout <<
"Dingfelder charge increase model is initialized " <<
G4endl
171 if (isInitialised)
return;
174 isInitialised =
true;
185 if (verboseLevel > 3)
188 <<
"Calling CrossSectionPerVolume() of G4DNADingfelderChargeIncreaseModel"
195 particleDefinition != hydrogenDef
197 particleDefinition != alphaPlusDef
199 particleDefinition != heliumDef
212 std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
213 pos1 = lowEnergyLimit.find(particleName);
215 if (pos1 != lowEnergyLimit.end())
217 lowLim = pos1->second;
220 std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
221 pos2 = highEnergyLimit.find(particleName);
223 if (pos2 != highEnergyLimit.end())
225 highLim = pos2->second;
228 if (k >= lowLim && k <= highLim)
231 if (particleDefinition == hydrogenDef)
240 G4double t = k / (proton_mass_c2/electron_mass_c2);
242 G4double temp = 4.0 * pi * Bohr_radius/nm * Bohr_radius/nm * fac;
245 totalCrossSection = 1.0/(1.0/sigmal + 1.0/sigmah) *m*m;
249 totalCrossSection = Sum(k,particleDefinition);
253 if (verboseLevel > 2)
255 G4cout <<
"__________________________________" <<
G4endl;
256 G4cout <<
"G4DNADingfelderChargeIncreaseModel - XS INFO START" <<
G4endl;
257 G4cout <<
"Kinetic energy(eV)=" << k/eV <<
" particle : " << particleName <<
G4endl;
258 G4cout <<
"Cross section per water molecule (cm^2)=" << totalCrossSection/cm/cm <<
G4endl;
259 G4cout <<
"Cross section per water molecule (cm^-1)=" << totalCrossSection*waterDensity/(1./cm) <<
G4endl;
262 G4cout <<
"G4DNADingfelderChargeIncreaseModel - XS INFO END" <<
G4endl;
265 return totalCrossSection*waterDensity;
279 if (verboseLevel > 3)
282 <<
"Calling SampleSecondaries() of G4DNADingfelderChargeIncreaseModel"
294 G4int finalStateIndex = RandomSelect(inK,definition);
296 G4int n = NumberOfFinalStates(definition,finalStateIndex);
300 if (!statCode) outK = inK - IncomingParticleBindingEnergyConstant(definition,finalStateIndex);
306 ProposeLocalEnergyDeposit(IncomingParticleBindingEnergyConstant(definition,finalStateIndex));
311 if (definition == hydrogenDef) electronK = inK*electron_mass_c2/proton_mass_c2;
312 else electronK = inK*electron_mass_c2/(particleMass);
316 G4Exception(
"G4DNADingfelderChargeIncreaseModel::SampleSecondaries",
"em0004",
320 auto dp =
new G4DynamicParticle(OutgoingParticleDefinition(definition,finalStateIndex),
324 fvect->push_back(dp);
339 G4int finalStateIndex)
343 if (particleDefinition == hydrogenDef)
346 if (particleDefinition == alphaPlusDef)
349 if (particleDefinition == heliumDef)
351 if (finalStateIndex == 0)
362 G4int finalStateIndex)
365 if (particleDefinition == hydrogenDef)
368 if (particleDefinition == alphaPlusDef)
369 return alphaPlusPlusDef;
371 if (particleDefinition == heliumDef)
373 if (finalStateIndex == 0)
375 return alphaPlusPlusDef;
384 G4int finalStateIndex)
387 if (particleDefinition == hydrogenDef)
390 if (particleDefinition == alphaPlusDef)
397 if (particleDefinition == heliumDef)
402 if (finalStateIndex == 0)
404 return (54.509 + 24.587) * eV;
412G4double G4DNADingfelderChargeIncreaseModel::PartialCrossSection(
const G4double& k,
416 G4int particleTypeIndex = 0;
418 if (particleDefinition == alphaPlusDef)
419 particleTypeIndex = 0;
421 if (particleDefinition == heliumDef)
422 particleTypeIndex = 1;
443 if (x1[index][particleTypeIndex] < x0[index][particleTypeIndex])
454 x1[index][particleTypeIndex] = x0[index][particleTypeIndex]
455 + gpow->
powA((a0[index][particleTypeIndex] - a1[index][particleTypeIndex])
456 / (c0[index][particleTypeIndex]
457 * d0[index][particleTypeIndex]),
458 1. / (d0[index][particleTypeIndex] - 1.));
459 b1[index][particleTypeIndex] = (a0[index][particleTypeIndex]
460 - a1[index][particleTypeIndex]) * x1[index][particleTypeIndex]
461 + b0[index][particleTypeIndex]
462 - c0[index][particleTypeIndex]
463 * gpow->
powA(x1[index][particleTypeIndex]
464 - x0[index][particleTypeIndex],
465 d0[index][particleTypeIndex]);
471 if (x < x0[index][particleTypeIndex])
472 y = a0[index][particleTypeIndex] * x + b0[index][particleTypeIndex];
473 else if (x < x1[index][particleTypeIndex])
474 y = a0[index][particleTypeIndex] * x + b0[index][particleTypeIndex]
475 - c0[index][particleTypeIndex]
476 * gpow->
powA(x - x0[index][particleTypeIndex],
477 d0[index][particleTypeIndex]);
479 y = a1[index][particleTypeIndex] * x + b1[index][particleTypeIndex];
481 return f0[index][particleTypeIndex] * gpow->
powA(10., y) * m * m;
487G4int G4DNADingfelderChargeIncreaseModel::RandomSelect(
const G4double& k,
490 G4int particleTypeIndex = 0;
492 if (particleDefinition == hydrogenDef)
495 if (particleDefinition == alphaPlusDef)
496 particleTypeIndex = 0;
498 if (particleDefinition == heliumDef)
499 particleTypeIndex = 1;
501 const G4int n = numberOfPartialCrossSections[particleTypeIndex];
509 values[i] = PartialCrossSection(k, i, particleDefinition);
520 if (values[i] > value)
536 G4int particleTypeIndex = 0;
538 if (particleDefinition == alphaPlusDef)
539 particleTypeIndex = 0;
541 if (particleDefinition == heliumDef)
542 particleTypeIndex = 1;
546 for (
G4int i = 0; i < numberOfPartialCrossSections[particleTypeIndex]; i++)
548 totalCrossSection += PartialCrossSection(k, i, particleDefinition);
551 return totalCrossSection;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax) override
G4DNADingfelderChargeIncreaseModel(const G4ParticleDefinition *p=nullptr, const G4String &nam="DNADingfelderChargeIncreaseModel")
G4ParticleChangeForGamma * fParticleChangeForGamma
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
static G4DNAGenericIonsManager * Instance()
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()
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() const
static G4Electron * Electron()
std::size_t GetIndex() const
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
G4double GetPDGMass() const
const G4String & GetParticleName() const
static G4Pow * GetInstance()
G4double logZ(G4int Z) const
G4double powA(G4double A, G4double y) const
static G4Proton * Proton()
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)