Geant4  10.02.p03
G4DNADingfelderChargeIncreaseModel Class Reference

#include <G4DNADingfelderChargeIncreaseModel.hh>

Inheritance diagram for G4DNADingfelderChargeIncreaseModel:
Collaboration diagram for G4DNADingfelderChargeIncreaseModel:

Public Member Functions

 G4DNADingfelderChargeIncreaseModel (const G4ParticleDefinition *p=0, const G4String &nam="DNADingfelderChargeIncreaseModel")
 
virtual ~G4DNADingfelderChargeIncreaseModel ()
 
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 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 GetPartialCrossSection (const G4Material *, G4int, const G4ParticleDefinition *, G4double)
 
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 *, G4double &eloss, G4double &niel, G4double length)
 
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 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)
 
G4int SelectIsotopeNumber (const G4Element *)
 
const G4ElementSelectRandomAtom (const G4MaterialCutsCouple *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
const G4ElementSelectRandomAtom (const G4Material *, const G4ParticleDefinition *, G4double kineticEnergy, G4double cutEnergy=0.0, G4double maxEnergy=DBL_MAX)
 
G4int SelectRandomAtomNumber (const G4Material *)
 
void SetParticleChange (G4VParticleChange *, G4VEmFluctuationModel *f=0)
 
void SetCrossSectionTable (G4PhysicsTable *, G4bool isLocal)
 
G4ElementDataGetElementData ()
 
G4PhysicsTableGetCrossSectionTable ()
 
G4VEmFluctuationModelGetModelOfFluctuations ()
 
G4VEmAngularDistributionGetAngularDistribution ()
 
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)
 
void SetPolarAngleLimit (G4double)
 
void SetSecondaryThreshold (G4double)
 
void SetLPMFlag (G4bool val)
 
void SetDeexcitationFlag (G4bool val)
 
void SetForceBuildTable (G4bool val)
 
void SetMasterThread (G4bool val)
 
G4bool IsMaster () const
 
G4double MaxSecondaryKinEnergy (const G4DynamicParticle *dynParticle)
 
const G4StringGetName () const
 
void SetCurrentCouple (const G4MaterialCutsCouple *)
 
const G4ElementGetCurrentElement () const
 
const G4IsotopeGetCurrentIsotope () const
 
G4bool IsLocked () const
 
void SetLocked (G4bool)
 

Protected Attributes

G4ParticleChangeForGamma * fParticleChangeForGamma
 
- Protected Attributes inherited from G4VEmModel
G4ElementDatafElementData
 
G4VParticleChange * pParticleChange
 
G4PhysicsTablexSectionTable
 
const std::vector< G4double > * theDensityFactor
 
const std::vector< G4int > * theDensityIdx
 
size_t idxTable
 

Private Member Functions

G4double PartialCrossSection (G4double energy, G4int level, const G4ParticleDefinition *particle)
 
G4double Sum (G4double energy, const G4ParticleDefinition *particle)
 
G4int RandomSelect (G4double energy, const G4ParticleDefinition *particle)
 
G4int NumberOfFinalStates (G4ParticleDefinition *particleDefinition, G4int finalStateIndex)
 
G4ParticleDefinitionOutgoingParticleDefinition (G4ParticleDefinition *particleDefinition, G4int finalStateIndex)
 
G4double WaterBindingEnergyConstant (G4ParticleDefinition *aParticleDefinition, G4int finalStateIndex)
 
G4double OutgoingParticleBindingEnergyConstant (G4ParticleDefinition *particleDefinition, G4int finalStateIndex)
 
G4double IncomingParticleBindingEnergyConstant (G4ParticleDefinition *particleDefinition, G4int finalStateIndex)
 
G4DNADingfelderChargeIncreaseModeloperator= (const G4DNADingfelderChargeIncreaseModel &right)
 
 G4DNADingfelderChargeIncreaseModel (const G4DNADingfelderChargeIncreaseModel &)
 

Private Attributes

const std::vector< G4double > * fpMolWaterDensity
 
std::map< G4String, G4double, std::less< G4String > > lowEnergyLimit
 
std::map< G4String, G4double, std::less< G4String > > highEnergyLimit
 
G4bool isInitialised
 
G4bool statCode
 
G4int verboseLevel
 
G4int numberOfPartialCrossSections [2]
 
G4double f0 [2][2]
 
G4double a0 [2][2]
 
G4double a1 [2][2]
 
G4double b0 [2][2]
 
G4double b1 [2][2]
 
G4double c0 [2][2]
 
G4double d0 [2][2]
 
G4double x0 [2][2]
 
G4double x1 [2][2]
 

Additional Inherited Members

- Protected Member Functions inherited from G4VEmModel
G4ParticleChangeForLoss * GetParticleChangeForLoss ()
 
G4ParticleChangeForGamma * GetParticleChangeForGamma ()
 
virtual G4double MaxSecondaryEnergy (const G4ParticleDefinition *, G4double kineticEnergy)
 
const G4MaterialCutsCoupleCurrentCouple () const
 
void SetCurrentElement (const G4Element *)
 
- Static Protected Attributes inherited from G4VEmModel
static const G4double inveplus = 1.0/CLHEP::eplus
 

Detailed Description

Definition at line 41 of file G4DNADingfelderChargeIncreaseModel.hh.

Constructor & Destructor Documentation

◆ G4DNADingfelderChargeIncreaseModel() [1/2]

G4DNADingfelderChargeIncreaseModel::G4DNADingfelderChargeIncreaseModel ( const G4ParticleDefinition p = 0,
const G4String nam = "DNADingfelderChargeIncreaseModel" 
)

Definition at line 40 of file G4DNADingfelderChargeIncreaseModel.cc.

41  :
42  G4VEmModel(nam), isInitialised(false)
43 {
44  // nistwater = G4NistManager::Instance()->FindOrBuildMaterial("G4_WATER");
46 
49 
50  verboseLevel = 0;
51  // Verbosity scale:
52  // 0 = nothing
53  // 1 = warning for energy non-conservation
54  // 2 = details of energy budget
55  // 3 = calculation of cross sections, file openings, sampling of atoms
56  // 4 = entering in methods
57 
58  if (verboseLevel > 0)
59  {
60  G4cout << "Dingfelder charge increase model is constructed " << G4endl;
61  }
63 
64  // Selection of stationary mode
65 
66  statCode = false;
67 }
G4VEmModel(const G4String &nam)
Definition: G4VEmModel.cc:69
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

◆ ~G4DNADingfelderChargeIncreaseModel()

G4DNADingfelderChargeIncreaseModel::~G4DNADingfelderChargeIncreaseModel ( )
virtual

Definition at line 71 of file G4DNADingfelderChargeIncreaseModel.cc.

72 {}

◆ G4DNADingfelderChargeIncreaseModel() [2/2]

G4DNADingfelderChargeIncreaseModel::G4DNADingfelderChargeIncreaseModel ( const G4DNADingfelderChargeIncreaseModel )
private

Member Function Documentation

◆ CrossSectionPerVolume()

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

Reimplemented from G4VEmModel.

Definition at line 198 of file G4DNADingfelderChargeIncreaseModel.cc.

203 {
204  if (verboseLevel > 3)
205  {
206  G4cout
207  << "Calling CrossSectionPerVolume() of G4DNADingfelderChargeIncreaseModel"
208  << G4endl;
209  }
210 
211  // Calculate total cross section for model
212 
215 
216  if (
217  particleDefinition != instance->GetIon("hydrogen")
218  &&
219  particleDefinition != instance->GetIon("alpha+")
220  &&
221  particleDefinition != instance->GetIon("helium")
222  )
223 
224  return 0;
225 
226  G4double lowLim = 0;
227  G4double highLim = 0;
228  G4double totalCrossSection = 0.;
229 
230  G4double waterDensity = (*fpMolWaterDensity)[material->GetIndex()];
231 
232  if(waterDensity!= 0.0)
233  // if (material == nistwater || material->GetBaseMaterial() == nistwater)
234  {
235  const G4String& particleName = particleDefinition->GetParticleName();
236 
237  std::map< G4String,G4double,std::less<G4String> >::iterator pos1;
238  pos1 = lowEnergyLimit.find(particleName);
239 
240  if (pos1 != lowEnergyLimit.end())
241  {
242  lowLim = pos1->second;
243  }
244 
245  std::map< G4String,G4double,std::less<G4String> >::iterator pos2;
246  pos2 = highEnergyLimit.find(particleName);
247 
248  if (pos2 != highEnergyLimit.end())
249  {
250  highLim = pos2->second;
251  }
252 
253  if (k >= lowLim && k < highLim)
254  {
255  //HYDROGEN
256  if (particleDefinition == instance->GetIon("hydrogen"))
257  {
258  const G4double aa = 2.835;
259  const G4double bb = 0.310;
260  const G4double cc = 2.100;
261  const G4double dd = 0.760;
262  const G4double fac = 1.0e-18;
263  const G4double rr = 13.606 * eV;
264 
266  G4double x = t / rr;
267  G4double temp = 4.0 * pi * Bohr_radius/nm * Bohr_radius/nm * fac;
268  G4double sigmal = temp * cc * (std::pow(x,dd));
269  G4double sigmah = temp * (aa * std::log(1.0 + x) + bb) / x;
270  totalCrossSection = 1.0/(1.0/sigmal + 1.0/sigmah) *m*m;
271  }
272  else
273  {
274  totalCrossSection = Sum(k,particleDefinition);
275  }
276  }
277 
278  if (verboseLevel > 2)
279  {
280  G4cout << "__________________________________" << G4endl;
281  G4cout << "G4DNADingfelderChargeIncreaseModel - XS INFO START" << G4endl;
282  G4cout << "Kinetic energy(eV)=" << k/eV << " particle : " << particleName << G4endl;
283  G4cout << "Cross section per water molecule (cm^2)=" << totalCrossSection/cm/cm << G4endl;
284  G4cout << "Cross section per water molecule (cm^-1)=" << totalCrossSection*waterDensity/(1./cm) << G4endl;
285  // G4cout << " - Cross section per water molecule (cm^-1)=" << sigma*material->GetAtomicNumDensityVector()[1]/(1./cm) << G4endl;
286  G4cout << "G4DNADingfelderChargeIncreaseModel - XS INFO END" << G4endl;
287  }
288 
289  }
290 
291  return totalCrossSection*waterDensity;
292 // return totalCrossSection*material->GetAtomicNumDensityVector()[1];
293 
294 }
static const double cm
Definition: G4SIunits.hh:118
std::map< G4String, G4double, std::less< G4String > > highEnergyLimit
size_t GetIndex() const
Definition: G4Material.hh:262
std::map< G4String, G4double, std::less< G4String > > lowEnergyLimit
static ulg bb
Definition: csz_inflate.cc:344
G4GLOB_DLL std::ostream G4cout
float Bohr_radius
Definition: hepunit.py:290
static const double nm
Definition: G4SIunits.hh:111
float proton_mass_c2
Definition: hepunit.py:275
float electron_mass_c2
Definition: hepunit.py:274
static G4DNAGenericIonsManager * Instance(void)
static const double eV
Definition: G4SIunits.hh:212
static const double pi
Definition: G4SIunits.hh:74
G4double Sum(G4double energy, const G4ParticleDefinition *particle)
static const G4double fac
#define G4endl
Definition: G4ios.hh:61
static const double m
Definition: G4SIunits.hh:128
static MCTruthManager * instance
double G4double
Definition: G4Types.hh:76
G4ParticleDefinition * GetIon(const G4String &name)
Here is the call graph for this function:

◆ IncomingParticleBindingEnergyConstant()

G4double G4DNADingfelderChargeIncreaseModel::IncomingParticleBindingEnergyConstant ( G4ParticleDefinition particleDefinition,
G4int  finalStateIndex 
)
private

Definition at line 408 of file G4DNADingfelderChargeIncreaseModel.cc.

410 {
412  if (particleDefinition == instance->GetIon("hydrogen"))
413  return 13.6 * eV;
414 
415  if (particleDefinition == instance->GetIon("alpha+"))
416  {
417  // Binding energy for He+ -> He++ + e- 54.509 eV
418  // Binding energy for He -> He+ + e- 24.587 eV
419  return 54.509 * eV;
420  }
421 
422  if (particleDefinition == instance->GetIon("helium"))
423  {
424  // Binding energy for He+ -> He++ + e- 54.509 eV
425  // Binding energy for He -> He+ + e- 24.587 eV
426 
427  if (finalStateIndex == 0)
428  return 24.587 * eV;
429  return (54.509 + 24.587) * eV;
430  }
431 
432  return 0;
433 }
static G4DNAGenericIonsManager * Instance(void)
static const double eV
Definition: G4SIunits.hh:212
static MCTruthManager * instance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Initialise()

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

Implements G4VEmModel.

Definition at line 76 of file G4DNADingfelderChargeIncreaseModel.cc.

78 {
79 
80  if (verboseLevel > 3)
81  {
82  G4cout << "Calling G4DNADingfelderChargeIncreaseModel::Initialise()"
83  << G4endl;
84  }
85 
86  // Energy limits
87 
90  G4ParticleDefinition* hydrogenDef = instance->GetIon("hydrogen");
91  G4ParticleDefinition* alphaPlusDef = instance->GetIon("alpha+");
92  G4ParticleDefinition* heliumDef = instance->GetIon("helium");
93 
94  G4String hydrogen;
95  G4String alphaPlus;
96  G4String helium;
97 
98  // LIMITS
99 
100  hydrogen = hydrogenDef->GetParticleName();
101  lowEnergyLimit[hydrogen] = 100. * eV;
102  highEnergyLimit[hydrogen] = 100. * MeV;
103 
104  alphaPlus = alphaPlusDef->GetParticleName();
105  lowEnergyLimit[alphaPlus] = 1. * keV;
106  highEnergyLimit[alphaPlus] = 400. * MeV;
107 
108  helium = heliumDef->GetParticleName();
109  lowEnergyLimit[helium] = 1. * keV;
110  highEnergyLimit[helium] = 400. * MeV;
111 
112  //
113 
114  if (particle==hydrogenDef)
115  {
118  }
119 
120  if (particle==alphaPlusDef)
121  {
122  SetLowEnergyLimit(lowEnergyLimit[alphaPlus]);
124  }
125 
126  if (particle==heliumDef)
127  {
130  }
131 
132  // Final state
133 
134  //ALPHA+
135 
136  f0[0][0]=1.;
137  a0[0][0]=2.25;
138  a1[0][0]=-0.75;
139  b0[0][0]=-32.10;
140  c0[0][0]=0.600;
141  d0[0][0]=2.40;
142  x0[0][0]=4.60;
143 
144  x1[0][0]=-1.;
145  b1[0][0]=-1.;
146 
148 
149  //HELIUM
150 
151  f0[0][1]=1.;
152  a0[0][1]=2.25;
153  a1[0][1]=-0.75;
154  b0[0][1]=-30.93;
155  c0[0][1]=0.590;
156  d0[0][1]=2.35;
157  x0[0][1]=4.29;
158 
159  f0[1][1]=1.;
160  a0[1][1]=2.25;
161  a1[1][1]=-0.75;
162  b0[1][1]=-32.61;
163  c0[1][1]=0.435;
164  d0[1][1]=2.70;
165  x0[1][1]=4.45;
166 
167  x1[0][1]=-1.;
168  b1[0][1]=-1.;
169 
170  x1[1][1]=-1.;
171  b1[1][1]=-1.;
172 
174 
175  //
176 
177  if( verboseLevel>0 )
178  {
179  G4cout << "Dingfelder charge increase model is initialized " << G4endl
180  << "Energy range: "
181  << LowEnergyLimit() / keV << " keV - "
182  << HighEnergyLimit() / MeV << " MeV for "
183  << particle->GetParticleName()
184  << G4endl;
185  }
186 
187  // Initialize water density pointer
189 
190  if (isInitialised)
191  { return;}
193  isInitialised = true;
194 }
G4double LowEnergyLimit() const
Definition: G4VEmModel.hh:641
static const double MeV
Definition: G4SIunits.hh:211
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Definition: G4Material.cc:604
std::map< G4String, G4double, std::less< G4String > > highEnergyLimit
const std::vector< double > * GetNumMolPerVolTableFor(const G4Material *) const
std::map< G4String, G4double, std::less< G4String > > lowEnergyLimit
void SetHighEnergyLimit(G4double)
Definition: G4VEmModel.hh:725
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
G4double HighEnergyLimit() const
Definition: G4VEmModel.hh:634
static G4DNAGenericIonsManager * Instance(void)
static const double eV
Definition: G4SIunits.hh:212
static G4DNAMolecularMaterial * Instance()
#define G4endl
Definition: G4ios.hh:61
static MCTruthManager * instance
static const double keV
Definition: G4SIunits.hh:213
void SetLowEnergyLimit(G4double)
Definition: G4VEmModel.hh:732
G4ParticleChangeForGamma * GetParticleChangeForGamma()
Definition: G4VEmModel.cc:134
G4ParticleDefinition * GetIon(const G4String &name)
Here is the call graph for this function:

◆ NumberOfFinalStates()

G4int G4DNADingfelderChargeIncreaseModel::NumberOfFinalStates ( G4ParticleDefinition particleDefinition,
G4int  finalStateIndex 
)
private

Definition at line 366 of file G4DNADingfelderChargeIncreaseModel.cc.

369 {
372  if (particleDefinition == instance->GetIon("hydrogen"))
373  return 2;
374  if (particleDefinition == instance->GetIon("alpha+"))
375  return 2;
376 
377  if (particleDefinition == instance->GetIon("helium"))
378  {
379  if (finalStateIndex == 0)
380  return 2;
381  return 3;
382  }
383  return 0;
384 }
static G4DNAGenericIonsManager * Instance(void)
static MCTruthManager * instance
G4ParticleDefinition * GetIon(const G4String &name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

G4DNADingfelderChargeIncreaseModel& G4DNADingfelderChargeIncreaseModel::operator= ( const G4DNADingfelderChargeIncreaseModel right)
private

◆ OutgoingParticleBindingEnergyConstant()

G4double G4DNADingfelderChargeIncreaseModel::OutgoingParticleBindingEnergyConstant ( G4ParticleDefinition particleDefinition,
G4int  finalStateIndex 
)
private

◆ OutgoingParticleDefinition()

G4ParticleDefinition * G4DNADingfelderChargeIncreaseModel::OutgoingParticleDefinition ( G4ParticleDefinition particleDefinition,
G4int  finalStateIndex 
)
private

Definition at line 388 of file G4DNADingfelderChargeIncreaseModel.cc.

390 {
392  if (particleDefinition == instance->GetIon("hydrogen"))
393  return G4Proton::Proton();
394  if (particleDefinition == instance->GetIon("alpha+"))
395  return instance->GetIon("alpha++");
396 
397  if (particleDefinition == instance->GetIon("helium"))
398  {
399  if (finalStateIndex == 0)
400  return instance->GetIon("alpha+");
401  return instance->GetIon("alpha++");
402  }
403  return 0;
404 }
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4DNAGenericIonsManager * Instance(void)
static MCTruthManager * instance
Here is the call graph for this function:
Here is the caller graph for this function:

◆ PartialCrossSection()

G4double G4DNADingfelderChargeIncreaseModel::PartialCrossSection ( G4double  energy,
G4int  level,
const G4ParticleDefinition particle 
)
private

Definition at line 439 of file G4DNADingfelderChargeIncreaseModel.cc.

442 {
443  G4int particleTypeIndex = 0;
446 
447  if (particleDefinition == instance->GetIon("alpha+"))
448  particleTypeIndex = 0;
449  if (particleDefinition == instance->GetIon("helium"))
450  particleTypeIndex = 1;
451 
452  //
453  // sigma(T) = f0 10 ^ y(log10(T/eV))
454  //
455  // / a0 x + b0 x < x0
456  // |
457  // y(x) = < a0 x + b0 - c0 (x - x0)^d0 x0 <= x < x1
458  // |
459  // \ a1 x + b1 x >= x1
460  //
461  //
462  // f0, a0, a1, b0, b1, c0, d0, x0, x1 are parameters that change for protons and helium (0, +, ++)
463  //
464  // f0 has been added to the code in order to manage partial (shell-dependent) cross sections (if no shell dependence is present. f0=1. Sum of f0 over the considered shells should give 1)
465  //
466  // From Rad. Phys. and Chem. 59 (2000) 255-275, M. Dingfelder et al.
467  // Inelastic-collision cross sections of liquid water for interactions of energetic proton
468  //
469 
470  if (x1[index][particleTypeIndex] < x0[index][particleTypeIndex])
471  {
472  //
473  // if x1 < x0 means that x1 and b1 will be calculated with the following formula (this piece of code is run on all alphas and not on protons)
474  //
475  // x1 = x0 + ((a0 - a1)/(c0 * d0)) ^ (1 / (d0 - 1))
476  //
477  // b1 = (a0 - a1) * x1 + b0 - c0 * (x1 - x0) ^ d0
478  //
479 
480  x1[index][particleTypeIndex] = x0[index][particleTypeIndex]
481  + std::pow((a0[index][particleTypeIndex] - a1[index][particleTypeIndex])
482  / (c0[index][particleTypeIndex]
483  * d0[index][particleTypeIndex]),
484  1. / (d0[index][particleTypeIndex] - 1.));
485  b1[index][particleTypeIndex] = (a0[index][particleTypeIndex]
486  - a1[index][particleTypeIndex]) * x1[index][particleTypeIndex]
487  + b0[index][particleTypeIndex]
488  - c0[index][particleTypeIndex]
489  * std::pow(x1[index][particleTypeIndex]
490  - x0[index][particleTypeIndex],
491  d0[index][particleTypeIndex]);
492  }
493 
494  G4double x(std::log10(k / eV));
495  G4double y;
496 
497  if (x < x0[index][particleTypeIndex])
498  y = a0[index][particleTypeIndex] * x + b0[index][particleTypeIndex];
499  else if (x < x1[index][particleTypeIndex])
500  y = a0[index][particleTypeIndex] * x + b0[index][particleTypeIndex]
501  - c0[index][particleTypeIndex]
502  * std::pow(x - x0[index][particleTypeIndex],
503  d0[index][particleTypeIndex]);
504  else
505  y = a1[index][particleTypeIndex] * x + b1[index][particleTypeIndex];
506 
507  return f0[index][particleTypeIndex] * std::pow(10., y) * m * m;
508 
509 }
Int_t index
int G4int
Definition: G4Types.hh:78
Double_t y
static G4DNAGenericIonsManager * Instance(void)
static const double eV
Definition: G4SIunits.hh:212
static const double m
Definition: G4SIunits.hh:128
static MCTruthManager * instance
double G4double
Definition: G4Types.hh:76
G4ParticleDefinition * GetIon(const G4String &name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ RandomSelect()

G4int G4DNADingfelderChargeIncreaseModel::RandomSelect ( G4double  energy,
const G4ParticleDefinition particle 
)
private

Definition at line 513 of file G4DNADingfelderChargeIncreaseModel.cc.

515 {
516  G4int particleTypeIndex = 0;
519 
520  if (particleDefinition == instance->GetIon("hydrogen"))
521  return 0;
522  if (particleDefinition == instance->GetIon("alpha+"))
523  particleTypeIndex = 0;
524  if (particleDefinition == instance->GetIon("helium"))
525  particleTypeIndex = 1;
526 
527  const G4int n = numberOfPartialCrossSections[particleTypeIndex];
528  G4double* values(new G4double[n]);
529  G4double value = 0;
530  G4int i = n;
531 
532  while (i > 0)
533  {
534  i--;
535  values[i] = PartialCrossSection(k, i, particleDefinition);
536  value += values[i];
537  }
538 
539  value *= G4UniformRand();
540 
541  i = n;
542  while (i > 0)
543  {
544  i--;
545 
546  if (values[i] > value)
547  break;
548 
549  value -= values[i];
550  }
551 
552  delete[] values;
553 
554  return i;
555 }
G4double PartialCrossSection(G4double energy, G4int level, const G4ParticleDefinition *particle)
int G4int
Definition: G4Types.hh:78
Char_t n[5]
#define G4UniformRand()
Definition: Randomize.hh:97
static G4DNAGenericIonsManager * Instance(void)
static MCTruthManager * instance
double G4double
Definition: G4Types.hh:76
G4ParticleDefinition * GetIon(const G4String &name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SampleSecondaries()

void G4DNADingfelderChargeIncreaseModel::SampleSecondaries ( std::vector< G4DynamicParticle *> *  fvect,
const G4MaterialCutsCouple ,
const G4DynamicParticle aDynamicParticle,
G4double  tmin,
G4double  maxEnergy 
)
virtual

Implements G4VEmModel.

Definition at line 298 of file G4DNADingfelderChargeIncreaseModel.cc.

304 {
305  if (verboseLevel > 3)
306  {
307  G4cout
308  << "Calling SampleSecondaries() of G4DNADingfelderChargeIncreaseModel"
309  << G4endl;
310  }
311 
312  if (!statCode) fParticleChangeForGamma->ProposeLocalEnergyDeposit(0.);
313 
314  G4ParticleDefinition* definition = aDynamicParticle->GetDefinition();
315 
316  G4double particleMass = definition->GetPDGMass();
317 
318  G4double inK = aDynamicParticle->GetKineticEnergy();
319 
320  G4int finalStateIndex = RandomSelect(inK,definition);
321 
322  G4int n = NumberOfFinalStates(definition,finalStateIndex);
323 
324  G4double outK = 0.;
325 
326  if (!statCode) outK = inK - IncomingParticleBindingEnergyConstant(definition,finalStateIndex);
327 
328  else outK = inK;
329 
330  if (statCode)
331  fParticleChangeForGamma->ProposeLocalEnergyDeposit(IncomingParticleBindingEnergyConstant(definition,finalStateIndex));
332 
333  fParticleChangeForGamma->ProposeTrackStatus(fStopAndKill);
334 
337 
338  G4double electronK;
339  if (definition == instance->GetIon("hydrogen")) electronK = inK*electron_mass_c2/proton_mass_c2;
340  else electronK = inK*electron_mass_c2/(particleMass);
341 
342  if (outK<0)
343  {
344  G4Exception("G4DNADingfelderChargeIncreaseModel::SampleSecondaries","em0004",
345  FatalException,"Final kinetic energy is negative.");
346  }
347 
348  G4DynamicParticle* dp = new G4DynamicParticle(OutgoingParticleDefinition(definition,finalStateIndex),
349  aDynamicParticle->GetMomentumDirection(),
350  outK);
351 
352  fvect->push_back(dp);
353 
354  n = n - 1;
355 
356  while (n>0)
357  {
358  n--;
359  fvect->push_back(new G4DynamicParticle
360  (G4Electron::Electron(), aDynamicParticle->GetMomentumDirection(), electronK) );
361  }
362 }
G4double IncomingParticleBindingEnergyConstant(G4ParticleDefinition *particleDefinition, G4int finalStateIndex)
G4ParticleDefinition * OutgoingParticleDefinition(G4ParticleDefinition *particleDefinition, G4int finalStateIndex)
int G4int
Definition: G4Types.hh:78
G4int RandomSelect(G4double energy, const G4ParticleDefinition *particle)
Char_t n[5]
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
float proton_mass_c2
Definition: hepunit.py:275
float electron_mass_c2
Definition: hepunit.py:274
static G4DNAGenericIonsManager * Instance(void)
G4int NumberOfFinalStates(G4ParticleDefinition *particleDefinition, G4int finalStateIndex)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
const G4ThreeVector & GetMomentumDirection() const
static G4Electron * Electron()
Definition: G4Electron.cc:94
G4ParticleDefinition * GetDefinition() const
#define G4endl
Definition: G4ios.hh:61
static MCTruthManager * instance
double G4double
Definition: G4Types.hh:76
G4ParticleDefinition * GetIon(const G4String &name)
Here is the call graph for this function:

◆ SelectStationary()

void G4DNADingfelderChargeIncreaseModel::SelectStationary ( G4bool  input)
inline

Definition at line 122 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ Sum()

G4double G4DNADingfelderChargeIncreaseModel::Sum ( G4double  energy,
const G4ParticleDefinition particle 
)
private

Definition at line 559 of file G4DNADingfelderChargeIncreaseModel.cc.

561 {
562  G4int particleTypeIndex = 0;
565 
566  if (particleDefinition == instance->GetIon("alpha+"))
567  particleTypeIndex = 0;
568  if (particleDefinition == instance->GetIon("helium"))
569  particleTypeIndex = 1;
570 
571  G4double totalCrossSection = 0.;
572 
573  for (G4int i = 0; i < numberOfPartialCrossSections[particleTypeIndex]; i++)
574  {
575  totalCrossSection += PartialCrossSection(k, i, particleDefinition);
576  }
577  return totalCrossSection;
578 }
G4double PartialCrossSection(G4double energy, G4int level, const G4ParticleDefinition *particle)
int G4int
Definition: G4Types.hh:78
static G4DNAGenericIonsManager * Instance(void)
static MCTruthManager * instance
double G4double
Definition: G4Types.hh:76
G4ParticleDefinition * GetIon(const G4String &name)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WaterBindingEnergyConstant()

G4double G4DNADingfelderChargeIncreaseModel::WaterBindingEnergyConstant ( G4ParticleDefinition aParticleDefinition,
G4int  finalStateIndex 
)
private

Member Data Documentation

◆ a0

G4double G4DNADingfelderChargeIncreaseModel::a0[2][2]
private

Definition at line 93 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ a1

G4double G4DNADingfelderChargeIncreaseModel::a1[2][2]
private

Definition at line 94 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ b0

G4double G4DNADingfelderChargeIncreaseModel::b0[2][2]
private

Definition at line 95 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ b1

G4double G4DNADingfelderChargeIncreaseModel::b1[2][2]
private

Definition at line 96 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ c0

G4double G4DNADingfelderChargeIncreaseModel::c0[2][2]
private

Definition at line 97 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ d0

G4double G4DNADingfelderChargeIncreaseModel::d0[2][2]
private

Definition at line 98 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ f0

G4double G4DNADingfelderChargeIncreaseModel::f0[2][2]
private

Definition at line 92 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ fParticleChangeForGamma

G4ParticleChangeForGamma* G4DNADingfelderChargeIncreaseModel::fParticleChangeForGamma
protected

Definition at line 69 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ fpMolWaterDensity

const std::vector<G4double>* G4DNADingfelderChargeIncreaseModel::fpMolWaterDensity
private

Definition at line 74 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ highEnergyLimit

std::map<G4String,G4double,std::less<G4String> > G4DNADingfelderChargeIncreaseModel::highEnergyLimit
private

Definition at line 77 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ isInitialised

G4bool G4DNADingfelderChargeIncreaseModel::isInitialised
private

Definition at line 79 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ lowEnergyLimit

std::map<G4String,G4double,std::less<G4String> > G4DNADingfelderChargeIncreaseModel::lowEnergyLimit
private

Definition at line 76 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ numberOfPartialCrossSections

G4int G4DNADingfelderChargeIncreaseModel::numberOfPartialCrossSections[2]
private

Definition at line 90 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ statCode

G4bool G4DNADingfelderChargeIncreaseModel::statCode
private

Definition at line 79 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ verboseLevel

G4int G4DNADingfelderChargeIncreaseModel::verboseLevel
private

Definition at line 80 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ x0

G4double G4DNADingfelderChargeIncreaseModel::x0[2][2]
private

Definition at line 99 of file G4DNADingfelderChargeIncreaseModel.hh.

◆ x1

G4double G4DNADingfelderChargeIncreaseModel::x1[2][2]
private

Definition at line 100 of file G4DNADingfelderChargeIncreaseModel.hh.


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