48 fpMolWaterDensity = 0;
50 numberOfPartialCrossSections[0] = 0;
51 numberOfPartialCrossSections[1] = 0;
63 G4cout <<
"Dingfelder charge increase model is constructed " <<
G4endl;
85 G4cout <<
"Calling G4DNADingfelderChargeIncreaseModel::Initialise()"
93 hydrogenDef = instance->
GetIon(
"hydrogen");
95 alphaPlusDef = instance->
GetIon(
"alpha+");
96 heliumDef = instance->
GetIon(
"helium");
105 lowEnergyLimit[hydrogen] = 100. * eV;
106 highEnergyLimit[hydrogen] = 100. * MeV;
109 lowEnergyLimit[alphaPlus] = 1. * keV;
110 highEnergyLimit[alphaPlus] = 400. * MeV;
113 lowEnergyLimit[helium] = 1. * keV;
114 highEnergyLimit[helium] = 400. * MeV;
118 if (particle==hydrogenDef)
124 if (particle==alphaPlusDef)
130 if (particle==heliumDef)
151 numberOfPartialCrossSections[0]=1;
177 numberOfPartialCrossSections[1]=2;
183 G4cout <<
"Dingfelder charge increase model is initialized " <<
G4endl
194 if (isInitialised)
return;
197 isInitialised =
true;
208 if (verboseLevel > 3)
211 <<
"Calling CrossSectionPerVolume() of G4DNADingfelderChargeIncreaseModel"
218 particleDefinition != hydrogenDef
220 particleDefinition != alphaPlusDef
222 particleDefinition != heliumDef
235 std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
236 pos1 = lowEnergyLimit.find(particleName);
238 if (pos1 != lowEnergyLimit.end())
240 lowLim = pos1->second;
243 std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
244 pos2 = highEnergyLimit.find(particleName);
246 if (pos2 != highEnergyLimit.end())
248 highLim = pos2->second;
251 if (k >= lowLim && k <= highLim)
254 if (particleDefinition == hydrogenDef)
263 G4double t = k / (proton_mass_c2/electron_mass_c2);
265 G4double temp = 4.0 * pi * Bohr_radius/nm * Bohr_radius/nm * fac;
268 totalCrossSection = 1.0/(1.0/sigmal + 1.0/sigmah) *m*m;
272 totalCrossSection = Sum(k,particleDefinition);
276 if (verboseLevel > 2)
278 G4cout <<
"__________________________________" <<
G4endl;
279 G4cout <<
"G4DNADingfelderChargeIncreaseModel - XS INFO START" <<
G4endl;
280 G4cout <<
"Kinetic energy(eV)=" << k/eV <<
" particle : " << particleName <<
G4endl;
281 G4cout <<
"Cross section per water molecule (cm^2)=" << totalCrossSection/cm/cm <<
G4endl;
282 G4cout <<
"Cross section per water molecule (cm^-1)=" << totalCrossSection*waterDensity/(1./cm) <<
G4endl;
285 G4cout <<
"G4DNADingfelderChargeIncreaseModel - XS INFO END" <<
G4endl;
288 return totalCrossSection*waterDensity;
302 if (verboseLevel > 3)
305 <<
"Calling SampleSecondaries() of G4DNADingfelderChargeIncreaseModel"
317 G4int finalStateIndex = RandomSelect(inK,definition);
319 G4int n = NumberOfFinalStates(definition,finalStateIndex);
323 if (!statCode) outK = inK - IncomingParticleBindingEnergyConstant(definition,finalStateIndex);
329 ProposeLocalEnergyDeposit(IncomingParticleBindingEnergyConstant(definition,finalStateIndex));
334 if (definition == hydrogenDef) electronK = inK*electron_mass_c2/proton_mass_c2;
335 else electronK = inK*electron_mass_c2/(particleMass);
339 G4Exception(
"G4DNADingfelderChargeIncreaseModel::SampleSecondaries",
"em0004",
347 fvect->push_back(dp);
362 G4int finalStateIndex)
366 if (particleDefinition == hydrogenDef)
369 if (particleDefinition == alphaPlusDef)
372 if (particleDefinition == heliumDef)
374 if (finalStateIndex == 0)
385 G4int finalStateIndex)
388 if (particleDefinition == hydrogenDef)
391 if (particleDefinition == alphaPlusDef)
392 return alphaPlusPlusDef;
394 if (particleDefinition == heliumDef)
396 if (finalStateIndex == 0)
398 return alphaPlusPlusDef;
407 G4int finalStateIndex)
410 if (particleDefinition == hydrogenDef)
413 if (particleDefinition == alphaPlusDef)
420 if (particleDefinition == heliumDef)
425 if (finalStateIndex == 0)
427 return (54.509 + 24.587) * eV;
439 G4int particleTypeIndex = 0;
441 if (particleDefinition == alphaPlusDef)
442 particleTypeIndex = 0;
444 if (particleDefinition == heliumDef)
445 particleTypeIndex = 1;
466 if (x1[index][particleTypeIndex] < x0[index][particleTypeIndex])
477 x1[index][particleTypeIndex] = x0[index][particleTypeIndex]
478 + gpow->
powA((a0[index][particleTypeIndex] - a1[index][particleTypeIndex])
479 / (c0[index][particleTypeIndex]
480 * d0[index][particleTypeIndex]),
481 1. / (d0[index][particleTypeIndex] - 1.));
482 b1[index][particleTypeIndex] = (a0[index][particleTypeIndex]
483 - a1[index][particleTypeIndex]) * x1[index][particleTypeIndex]
484 + b0[index][particleTypeIndex]
485 - c0[index][particleTypeIndex]
486 * gpow->
powA(x1[index][particleTypeIndex]
487 - x0[index][particleTypeIndex],
488 d0[index][particleTypeIndex]);
494 if (x < x0[index][particleTypeIndex])
495 y = a0[index][particleTypeIndex] * x + b0[index][particleTypeIndex];
496 else if (x < x1[index][particleTypeIndex])
497 y = a0[index][particleTypeIndex] * x + b0[index][particleTypeIndex]
498 - c0[index][particleTypeIndex]
499 * gpow->
powA(x - x0[index][particleTypeIndex],
500 d0[index][particleTypeIndex]);
502 y = a1[index][particleTypeIndex] * x + b1[index][particleTypeIndex];
504 return f0[index][particleTypeIndex] * gpow->
powA(10., y) * m * m;
510G4int G4DNADingfelderChargeIncreaseModel::RandomSelect(
G4double k,
513 G4int particleTypeIndex = 0;
515 if (particleDefinition == hydrogenDef)
518 if (particleDefinition == alphaPlusDef)
519 particleTypeIndex = 0;
521 if (particleDefinition == heliumDef)
522 particleTypeIndex = 1;
524 const G4int n = numberOfPartialCrossSections[particleTypeIndex];
532 values[i] = PartialCrossSection(k, i, particleDefinition);
543 if (values[i] > value)
559 G4int particleTypeIndex = 0;
561 if (particleDefinition == alphaPlusDef)
562 particleTypeIndex = 0;
564 if (particleDefinition == heliumDef)
565 particleTypeIndex = 1;
569 for (
G4int i = 0; i < numberOfPartialCrossSections[particleTypeIndex]; i++)
571 totalCrossSection += PartialCrossSection(k, i, particleDefinition);
574 return totalCrossSection;
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4double G4Log(G4double x)
G4GLOB_DLL std::ostream G4cout
G4ParticleChangeForGamma * fParticleChangeForGamma
virtual ~G4DNADingfelderChargeIncreaseModel()
virtual void Initialise(const G4ParticleDefinition *, const G4DataVector &)
G4DNADingfelderChargeIncreaseModel(const G4ParticleDefinition *p=0, const G4String &nam="DNADingfelderChargeIncreaseModel")
virtual void SampleSecondaries(std::vector< G4DynamicParticle * > *, const G4MaterialCutsCouple *, const G4DynamicParticle *, G4double tmin, G4double maxEnergy)
virtual G4double CrossSectionPerVolume(const G4Material *material, const G4ParticleDefinition *p, G4double ekin, G4double emin, G4double emax)
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 G4Electron * Electron()
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)