50 numberOfPartialCrossSections[0] = 0;
51 numberOfPartialCrossSections[1] = 0;
52 numberOfPartialCrossSections[2] = 0;
64 G4cout <<
"Dingfelder charge decrease model is constructed " <<
G4endl;
79 G4cout <<
"Calling G4DNADingfelderChargeDecreaseModel::Initialise()"
89 alphaPlusDef = instance->
GetIon(
"alpha+");
90 hydrogenDef = instance->
GetIon(
"hydrogen");
91 heliumDef = instance->
GetIon(
"helium");
100 lowEnergyLimit[proton] = 100. * eV;
101 highEnergyLimit[proton] = 100. * MeV;
104 lowEnergyLimit[alphaPlusPlus] = 1. * keV;
105 highEnergyLimit[alphaPlusPlus] = 400. * MeV;
108 lowEnergyLimit[alphaPlus] = 1. * keV;
109 highEnergyLimit[alphaPlus] = 400. * MeV;
113 if (particle==protonDef)
119 if (particle==alphaPlusPlusDef)
125 if (particle==alphaPlusDef)
144 numberOfPartialCrossSections[0] = 1;
147 f0[0][1]=1.; a0[0][1]=0.95;
168 numberOfPartialCrossSections[1] = 2;
182 numberOfPartialCrossSections[2] = 1;
188 G4cout <<
"Dingfelder charge decrease model is initialized " <<
G4endl
202 isInitialised =
true;
214 if (verboseLevel > 3)
217 <<
"Calling CrossSectionPerVolume() of G4DNADingfelderChargeDecreaseModel"
223 particleDefinition != protonDef
225 particleDefinition != alphaPlusPlusDef
227 particleDefinition != alphaPlusDef
240 std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
241 pos1 = lowEnergyLimit.find(particleName);
243 if (pos1 != lowEnergyLimit.end())
245 lowLim = pos1->second;
248 std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
249 pos2 = highEnergyLimit.find(particleName);
251 if (pos2 != highEnergyLimit.end())
253 highLim = pos2->second;
256 if (k >= lowLim && k <= highLim)
258 crossSection = Sum(k,particleDefinition);
261 if (verboseLevel > 2)
263 G4cout <<
"_______________________________________" <<
G4endl;
264 G4cout <<
"G4DNADingfelderChargeDecreaeModel" <<
G4endl;
265 G4cout <<
"Kinetic energy(eV)=" << k/eV <<
"particle :" << particleName <<
G4endl;
266 G4cout <<
"Cross section per water molecule (cm^2)=" << crossSection/cm/cm <<
G4endl;
267 G4cout <<
"Cross section per water molecule (cm^-1)=" << crossSection*
268 waterDensity/(1./cm) <<
G4endl;
272 return crossSection*waterDensity;
286 if (verboseLevel > 3)
289 <<
"Calling SampleSecondaries() of G4DNADingfelderChargeDecreaseModel"
299 G4int finalStateIndex = RandomSelect(inK,definition);
301 G4int n = NumberOfFinalStates(definition, finalStateIndex);
302 G4double waterBindingEnergy = WaterBindingEnergyConstant(definition, finalStateIndex);
303 G4double outgoingParticleBindingEnergy = OutgoingParticleBindingEnergyConstant(definition, finalStateIndex);
309 if (!statCode) outK = inK - n*(inK*electron_mass_c2/proton_mass_c2)
310 - waterBindingEnergy + outgoingParticleBindingEnergy;
316 if (!statCode) outK = inK - n*(inK*electron_mass_c2/particleMass)
317 - waterBindingEnergy + outgoingParticleBindingEnergy;
323 G4Exception(
"G4DNADingfelderChargeDecreaseModel::SampleSecondaries",
"em0004",
336 + waterBindingEnergy - outgoingParticleBindingEnergy);
339 + waterBindingEnergy - outgoingParticleBindingEnergy);
345 fvect->push_back(dp);
357 G4int finalStateIndex)
363 if (particleDefinition == alphaPlusPlusDef)
365 if (finalStateIndex == 0)
370 if (particleDefinition == alphaPlusDef)
379 G4int finalStateIndex)
384 if (particleDefinition == alphaPlusPlusDef)
386 if (finalStateIndex == 0)
391 if (particleDefinition == alphaPlusDef)
400 G4int finalStateIndex)
409 if (particleDefinition == alphaPlusPlusDef)
417 if (finalStateIndex == 0)
420 return 10.79 * 2 * eV;
423 if (particleDefinition == alphaPlusDef)
440 G4int finalStateIndex)
445 if (particleDefinition == alphaPlusPlusDef)
450 if (finalStateIndex == 0)
453 return (54.509 + 24.587) * eV;
456 if (particleDefinition == alphaPlusDef)
473 G4int particleTypeIndex = 0;
475 if (particleDefinition == protonDef)
476 particleTypeIndex = 0;
478 if (particleDefinition == alphaPlusPlusDef)
479 particleTypeIndex = 1;
481 if (particleDefinition == alphaPlusDef)
482 particleTypeIndex = 2;
502 if (x1[index][particleTypeIndex] < x0[index][particleTypeIndex])
512 x1[index][particleTypeIndex] = x0[index][particleTypeIndex]
513 + gpow->
powA((a0[index][particleTypeIndex] - a1[index][particleTypeIndex])
514 / (c0[index][particleTypeIndex]
515 * d0[index][particleTypeIndex]),
516 1. / (d0[index][particleTypeIndex] - 1.));
517 b1[index][particleTypeIndex] = (a0[index][particleTypeIndex]
518 - a1[index][particleTypeIndex]) * x1[index][particleTypeIndex]
519 + b0[index][particleTypeIndex]
520 - c0[index][particleTypeIndex]
521 * gpow->
powA(x1[index][particleTypeIndex]
522 - x0[index][particleTypeIndex],
523 d0[index][particleTypeIndex]);
529 if (x < x0[index][particleTypeIndex])
530 y = a0[index][particleTypeIndex] * x + b0[index][particleTypeIndex];
531 else if (x < x1[index][particleTypeIndex])
532 y = a0[index][particleTypeIndex] * x + b0[index][particleTypeIndex]
533 - c0[index][particleTypeIndex]
534 * gpow->
powA(x - x0[index][particleTypeIndex],
535 d0[index][particleTypeIndex]);
537 y = a1[index][particleTypeIndex] * x + b1[index][particleTypeIndex];
539 return f0[index][particleTypeIndex] * gpow->
powA(10., y) * m * m;
543G4int G4DNADingfelderChargeDecreaseModel::RandomSelect(
G4double k,
546 G4int particleTypeIndex = 0;
548 if (particleDefinition == protonDef)
549 particleTypeIndex = 0;
551 if (particleDefinition == alphaPlusPlusDef)
552 particleTypeIndex = 1;
554 if (particleDefinition == alphaPlusDef)
555 particleTypeIndex = 2;
557 const G4int n = numberOfPartialCrossSections[particleTypeIndex];
565 values[i] = PartialCrossSection(k, i, particleDefinition);
576 if (values[i] > value)
592 G4int particleTypeIndex = 0;
594 if (particleDefinition == protonDef)
595 particleTypeIndex = 0;
597 if (particleDefinition == alphaPlusPlusDef)
598 particleTypeIndex = 1;
600 if (particleDefinition == alphaPlusDef)
601 particleTypeIndex = 2;
605 for (
G4int i = 0; i < numberOfPartialCrossSections[particleTypeIndex]; i++)
607 totalCrossSection += PartialCrossSection(k, i, particleDefinition);
610 return totalCrossSection;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
static G4DNAChemistryManager * Instance()
void CreateWaterMolecule(ElectronicModification, G4int, const G4Track *)
void Initialise(const G4ParticleDefinition *, const G4DataVector &) override
void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy) override
G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax) override
G4ParticleChangeForGamma * fParticleChangeForGamma
G4DNADingfelderChargeDecreaseModel(const G4ParticleDefinition *p=0, const G4String &nam="DNADingfelderChargeDecreaseModel")
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()
const G4ThreeVector & GetMomentumDirection() const
G4ParticleDefinition * GetDefinition() const
G4double GetKineticEnergy() 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 * ProtonDefinition()
static G4Proton * Proton()
void SetHighEnergyLimit(G4double)
G4ParticleChangeForGamma * GetParticleChangeForGamma()
G4double LowEnergyLimit() const
G4double HighEnergyLimit() const
void SetLowEnergyLimit(G4double)
void ProposeTrackStatus(G4TrackStatus status)
const G4Track * GetCurrentTrack() const
void ProposeLocalEnergyDeposit(G4double anEnergyPart)