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.

00064   : zMin(minZ), zMax(maxZ),
00065   length(24)
00066 {
00067   LoadData();
00068 }

G4eIonisationParameters::~G4eIonisationParameters (  ) 

Definition at line 71 of file G4eIonisationParameters.cc.

00072 { 
00073   // Reset the map of data sets: remove the data sets from the map 
00074   std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
00075 
00076   for (pos = param.begin(); pos != param.end(); ++pos)
00077     {
00078       G4VEMDataSet* dataSet = (*pos).second;
00079       delete dataSet;
00080     }
00081 
00082   for (pos = excit.begin(); pos != excit.end(); ++pos)
00083     {
00084       G4VEMDataSet* dataSet = (*pos).second;
00085       delete dataSet;
00086     }
00087 
00088   activeZ.clear();
00089 }


Member Function Documentation

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

Definition at line 125 of file G4eIonisationParameters.cc.

References G4cout, and G4endl.

Referenced by G4eIonisationSpectrum::Excitation().

00126 {
00127   G4double value = 0.;
00128   std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
00129 
00130   pos = excit.find(Z);
00131   if (pos!= excit.end()) {
00132     G4VEMDataSet* dataSet = (*pos).second;
00133 
00134     const G4DataVector ener = dataSet->GetEnergies(0);
00135     G4double ee = std::max(ener.front(),std::min(ener.back(),e));
00136     value = dataSet->FindValue(ee);
00137   } else {
00138     G4cout << "WARNING: G4IonisationParameters::Excitation "
00139            << "did not find ID = "
00140            << Z << G4endl;
00141   }
00142 
00143   return value;
00144 }

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

Definition at line 92 of file G4eIonisationParameters.cc.

References G4VEMDataSet::FindValue(), G4cout, G4endl, and G4VEMDataSet::GetEnergies().

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

00095 {
00096   G4double value = 0.;
00097   G4int id = Z*100 + parameterIndex;
00098   std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
00099 
00100   pos = param.find(id);
00101   if (pos!= param.end()) {
00102     G4VEMDataSet* dataSet = (*pos).second;
00103     G4int nShells = dataSet->NumberOfComponents();
00104 
00105     if(shellIndex < nShells) { 
00106       const G4VEMDataSet* component = dataSet->GetComponent(shellIndex);
00107       const G4DataVector ener = component->GetEnergies(0);
00108       G4double ee = std::max(ener.front(),std::min(ener.back(),e));
00109       value = component->FindValue(ee);
00110     } else {
00111       G4cout << "WARNING: G4IonisationParameters::FindParameter "
00112              << "has no parameters for shell= " << shellIndex 
00113              << "; Z= " << Z
00114              << G4endl;
00115     }
00116   } else {
00117     G4cout << "WARNING: G4IonisationParameters::Parameter "
00118            << "did not find ID = "
00119            << shellIndex << G4endl;
00120   }
00121 
00122   return value;
00123 }

void G4eIonisationParameters::PrintData (  )  const

Definition at line 384 of file G4eIonisationParameters.cc.

References G4cout, G4endl, and G4VEMDataSet::PrintData().

Referenced by G4eIonisationSpectrum::PrintData().

00385 {
00386   G4cout << G4endl;
00387   G4cout << "===== G4eIonisationParameters =====" << G4endl;
00388   G4cout << G4endl;
00389 
00390   size_t nZ = activeZ.size();
00391   std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
00392 
00393   for (size_t i=0; i<nZ; i++) {
00394     G4int Z = (G4int)activeZ[i];      
00395 
00396     for (size_t j=0; j<length; j++) {
00397     
00398       G4int index = Z*100 + j;
00399 
00400       pos = param.find(index);
00401       if (pos!= param.end()) {
00402         G4VEMDataSet* dataSet = (*pos).second;
00403         size_t nShells = dataSet->NumberOfComponents();
00404 
00405         for (size_t k=0; k<nShells; k++) {
00406 
00407           G4cout << "===== Z= " << Z << " shell= " << k 
00408                  << " parameter[" << j << "]  =====" 
00409                  << G4endl;
00410           const G4VEMDataSet* comp = dataSet->GetComponent(k);
00411           comp->PrintData();
00412         }
00413       }
00414     }
00415   }
00416   G4cout << "====================================" << G4endl;
00417 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:51:50 2013 for Geant4 by  doxygen 1.4.7