Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
G4RDeIonisationParameters Class Reference

#include <G4RDeIonisationParameters.hh>

Public Member Functions

 G4RDeIonisationParameters (G4int minZ=1, G4int maxZ=99)
 
 ~G4RDeIonisationParameters ()
 
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 62 of file G4RDeIonisationParameters.hh.

Constructor & Destructor Documentation

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

Definition at line 62 of file G4RDeIonisationParameters.cc.

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

Definition at line 70 of file G4RDeIonisationParameters.cc.

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

Member Function Documentation

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

Definition at line 124 of file G4RDeIonisationParameters.cc.

References G4RDVEMDataSet::FindValue(), G4cout, G4endl, G4RDVEMDataSet::GetEnergies(), G4INCL::Math::max(), and G4INCL::Math::min().

Referenced by G4RDeIonisationSpectrum::Excitation().

125 {
126  G4double value = 0.;
127  std::map<G4int,G4RDVEMDataSet*,std::less<G4int> >::const_iterator pos;
128 
129  pos = excit.find(Z);
130  if (pos!= excit.end()) {
131  G4RDVEMDataSet* 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 }
G4GLOB_DLL std::ostream G4cout
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
const XML_Char int const XML_Char * value
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double G4RDeIonisationParameters::Parameter ( G4int  Z,
G4int  shellIndex,
G4int  parameterIndex,
G4double  e 
) const

Definition at line 91 of file G4RDeIonisationParameters.cc.

References G4RDVEMDataSet::FindValue(), G4cout, G4endl, G4RDVEMDataSet::GetComponent(), G4RDVEMDataSet::GetEnergies(), G4INCL::Math::max(), G4INCL::Math::min(), and G4RDVEMDataSet::NumberOfComponents().

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

94 {
95  G4double value = 0.;
96  G4int id = Z*100 + parameterIndex;
97  std::map<G4int,G4RDVEMDataSet*,std::less<G4int> >::const_iterator pos;
98 
99  pos = param.find(id);
100  if (pos!= param.end()) {
101  G4RDVEMDataSet* dataSet = (*pos).second;
102  G4int nShells = dataSet->NumberOfComponents();
103 
104  if(shellIndex < nShells) {
105  const G4RDVEMDataSet* 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 }
virtual const G4RDVEMDataSet * GetComponent(G4int componentId) const =0
int G4int
Definition: G4Types.hh:78
virtual size_t NumberOfComponents(void) const =0
G4GLOB_DLL std::ostream G4cout
virtual G4double FindValue(G4double x, G4int componentId=0) const =0
virtual const G4DataVector & GetEnergies(G4int componentId) const =0
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
const XML_Char int const XML_Char * value
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void G4RDeIonisationParameters::PrintData ( void  ) const

Definition at line 373 of file G4RDeIonisationParameters.cc.

References G4cout, G4endl, G4RDVEMDataSet::GetComponent(), G4RDVEMDataSet::NumberOfComponents(), and G4RDVEMDataSet::PrintData().

Referenced by G4RDeIonisationSpectrum::PrintData().

374 {
375  G4cout << G4endl;
376  G4cout << "===== G4RDeIonisationParameters =====" << G4endl;
377  G4cout << G4endl;
378 
379  size_t nZ = activeZ.size();
380  std::map<G4int,G4RDVEMDataSet*,std::less<G4int> >::const_iterator pos;
381 
382  for (size_t i=0; i<nZ; i++) {
383  G4int Z = (G4int)activeZ[i];
384 
385  for (size_t j=0; j<length; j++) {
386 
387  G4int index = Z*100 + j;
388 
389  pos = param.find(index);
390  if (pos!= param.end()) {
391  G4RDVEMDataSet* dataSet = (*pos).second;
392  size_t nShells = dataSet->NumberOfComponents();
393 
394  for (size_t k=0; k<nShells; k++) {
395 
396  G4cout << "===== Z= " << Z << " shell= " << k
397  << " parameter[" << j << "] ====="
398  << G4endl;
399  const G4RDVEMDataSet* comp = dataSet->GetComponent(k);
400  comp->PrintData();
401  }
402  }
403  }
404  }
405  G4cout << "====================================" << G4endl;
406 }
virtual const G4RDVEMDataSet * GetComponent(G4int componentId) const =0
int G4int
Definition: G4Types.hh:78
virtual size_t NumberOfComponents(void) const =0
G4GLOB_DLL std::ostream G4cout
virtual void PrintData(void) const =0
#define G4endl
Definition: G4ios.hh:61

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