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

#include <G4eIonisationParameters.hh>

Public Member Functions

 G4eIonisationParameters (G4int minZ=1, G4int maxZ=99)
 
 ~G4eIonisationParameters ()
 
G4double Parameter (G4int Z, G4int shellIndex, G4int parameterIndex, G4double e) const
 
G4double Excitation (G4int Z, G4double e) const
 
void PrintData () const
 

Detailed Description

Definition at line 60 of file G4eIonisationParameters.hh.

Constructor & Destructor Documentation

◆ G4eIonisationParameters()

G4eIonisationParameters::G4eIonisationParameters ( G4int  minZ = 1,
G4int  maxZ = 99 
)

Definition at line 62 of file G4eIonisationParameters.cc.

63 : zMin(minZ), zMax(maxZ),
64 length(24)
65{
66 LoadData();
67}

◆ ~G4eIonisationParameters()

G4eIonisationParameters::~G4eIonisationParameters ( )

Definition at line 70 of file G4eIonisationParameters.cc.

71{
72 // Reset the map of data sets: remove the data sets from the map
73 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
74
75 for (pos = param.begin(); pos != param.end(); ++pos)
76 {
77 G4VEMDataSet* dataSet = (*pos).second;
78 delete dataSet;
79 }
80
81 for (pos = excit.begin(); pos != excit.end(); ++pos)
82 {
83 G4VEMDataSet* dataSet = (*pos).second;
84 delete dataSet;
85 }
86
87 activeZ.clear();
88}

Member Function Documentation

◆ Excitation()

G4double G4eIonisationParameters::Excitation ( G4int  Z,
G4double  e 
) const

Definition at line 124 of file G4eIonisationParameters.cc.

125{
126 G4double value = 0.;
127 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
128
129 pos = excit.find(Z);
130 if (pos!= excit.end()) {
131 G4VEMDataSet* dataSet = (*pos).second;
132
133 const G4DataVector ener = dataSet->GetEnergies(0);
134 G4double ee = std::max(ener.front(),std::min(ener.back(),e));
135 value = dataSet->FindValue(ee);
136 } else {
137 G4cout << "WARNING: G4IonisationParameters::Excitation "
138 << "did not find ID = "
139 << Z << G4endl;
140 }
141
142 return value;
143}
double G4double
Definition: G4Types.hh:83
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
virtual G4double FindValue(G4double x, G4int componentId=0) const =0

Referenced by G4eIonisationSpectrum::Excitation().

◆ Parameter()

G4double G4eIonisationParameters::Parameter ( G4int  Z,
G4int  shellIndex,
G4int  parameterIndex,
G4double  e 
) const

Definition at line 91 of file G4eIonisationParameters.cc.

94{
95 G4double value = 0.;
96 G4int id = Z*100 + parameterIndex;
97 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
98
99 pos = param.find(id);
100 if (pos!= param.end()) {
101 G4VEMDataSet* dataSet = (*pos).second;
102 G4int nShells = dataSet->NumberOfComponents();
103
104 if(shellIndex < nShells) {
105 const G4VEMDataSet* component = dataSet->GetComponent(shellIndex);
106 const G4DataVector ener = component->GetEnergies(0);
107 G4double ee = std::max(ener.front(),std::min(ener.back(),e));
108 value = component->FindValue(ee);
109 } else {
110 G4cout << "WARNING: G4IonisationParameters::FindParameter "
111 << "has no parameters for shell= " << shellIndex
112 << "; Z= " << Z
113 << G4endl;
114 }
115 } else {
116 G4cout << "WARNING: G4IonisationParameters::Parameter "
117 << "did not find ID = "
118 << shellIndex << G4endl;
119 }
120
121 return value;
122}
int G4int
Definition: G4Types.hh:85
virtual const G4VEMDataSet * GetComponent(G4int componentId) const =0
virtual size_t NumberOfComponents(void) const =0

Referenced by G4eIonisationSpectrum::AverageEnergy(), G4eIonisationSpectrum::Probability(), and G4eIonisationSpectrum::SampleEnergy().

◆ PrintData()

void G4eIonisationParameters::PrintData ( ) const

Definition at line 383 of file G4eIonisationParameters.cc.

384{
385 G4cout << G4endl;
386 G4cout << "===== G4eIonisationParameters =====" << G4endl;
387 G4cout << G4endl;
388
389 size_t nZ = activeZ.size();
390 std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
391
392 for (size_t i=0; i<nZ; i++) {
393 G4int Z = (G4int)activeZ[i];
394
395 for (size_t j=0; j<length; j++) {
396
397 G4int index = Z*100 + j;
398
399 pos = param.find(index);
400 if (pos!= param.end()) {
401 G4VEMDataSet* dataSet = (*pos).second;
402 size_t nShells = dataSet->NumberOfComponents();
403
404 for (size_t k=0; k<nShells; k++) {
405
406 G4cout << "===== Z= " << Z << " shell= " << k
407 << " parameter[" << j << "] ====="
408 << G4endl;
409 const G4VEMDataSet* comp = dataSet->GetComponent(k);
410 comp->PrintData();
411 }
412 }
413 }
414 }
415 G4cout << "====================================" << G4endl;
416}
virtual void PrintData(void) const =0

Referenced by G4eIonisationSpectrum::PrintData().


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