Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 61 of file G4eIonisationParameters.hh.

Constructor & Destructor Documentation

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

Definition at line 63 of file G4eIonisationParameters.cc.

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

Definition at line 71 of file G4eIonisationParameters.cc.

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

Member Function Documentation

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

Definition at line 125 of file G4eIonisationParameters.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 92 of file G4eIonisationParameters.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void G4eIonisationParameters::PrintData ( void  ) const

Definition at line 384 of file G4eIonisationParameters.cc.

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

Here is the call graph for this function:

Here is the caller graph for this function:


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