Geant4 11.1.1
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 ()
 
 ~G4eIonisationParameters ()
 
G4double Parameter (G4int Z, G4int shellIndex, G4int parameterIndex, G4double e) const
 
G4double Excitation (G4int Z, G4double e) const
 
void PrintData () const
 
 G4eIonisationParameters (const G4eIonisationParameters &)=delete
 
G4eIonisationParametersoperator= (const G4eIonisationParameters &right)=delete
 

Detailed Description

Definition at line 58 of file G4eIonisationParameters.hh.

Constructor & Destructor Documentation

◆ G4eIonisationParameters() [1/2]

G4eIonisationParameters::G4eIonisationParameters ( )
explicit

Definition at line 63 of file G4eIonisationParameters.cc.

64{
65 LoadData();
66}

◆ ~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 for (auto& pos : param)
74 {
75 G4VEMDataSet* dataSet = pos.second;
76 delete dataSet;
77 dataSet = nullptr;
78 }
79 for (auto& pos : excit)
80 {
81 G4VEMDataSet* dataSet = pos.second;
82 delete dataSet;
83 dataSet = nullptr;
84 }
85 activeZ.clear();
86}

◆ G4eIonisationParameters() [2/2]

G4eIonisationParameters::G4eIonisationParameters ( const G4eIonisationParameters )
delete

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 auto pos = excit.find(Z);
128 if (pos!= excit.end()) {
129 G4VEMDataSet* dataSet = (*pos).second;
130
131 const G4DataVector ener = dataSet->GetEnergies(0);
132 G4double ee = std::max(ener.front(),std::min(ener.back(),e));
133 value = dataSet->FindValue(ee);
134 } else {
135 G4cout << "WARNING: G4IonisationParameters::Excitation "
136 << "did not find ID = "
137 << Z << G4endl;
138 }
139
140 return value;
141}
double G4double
Definition: G4Types.hh:83
const G4int Z[17]
#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().

◆ operator=()

G4eIonisationParameters & G4eIonisationParameters::operator= ( const G4eIonisationParameters right)
delete

◆ Parameter()

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

Definition at line 90 of file G4eIonisationParameters.cc.

93{
94 G4double value = 0.;
95 G4int id = Z*100 + parameterIndex;
96
97 auto pos = param.find(id);
98 if (pos!= param.end()) {
99 G4VEMDataSet* dataSet = (*pos).second;
100 G4int nShells = (G4int)dataSet->NumberOfComponents();
101
102 if(shellIndex < nShells) {
103 const G4VEMDataSet* component = dataSet->GetComponent(shellIndex);
104 const G4DataVector ener = component->GetEnergies(0);
105 G4double ee = std::max(ener.front(),std::min(ener.back(),e));
106 value = component->FindValue(ee);
107 } else {
108 G4cout << "WARNING: G4IonisationParameters::FindParameter "
109 << "has no parameters for shell= " << shellIndex
110 << "; Z= " << Z
111 << G4endl;
112 }
113 } else {
114 G4cout << "WARNING: G4IonisationParameters::Parameter "
115 << "did not find ID = "
116 << shellIndex << G4endl;
117 }
118
119 return value;
120}
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 382 of file G4eIonisationParameters.cc.

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

Referenced by G4eIonisationSpectrum::PrintData().


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