G4DopplerProfile Class Reference

#include <G4DopplerProfile.hh>


Public Member Functions

 G4DopplerProfile (G4int minZ=1, G4int maxZ=100)
 ~G4DopplerProfile ()
size_t NumberOfProfiles (G4int Z) const
const G4VEMDataSet * Profiles (G4int Z) const
const G4VEMDataSet * Profile (G4int Z, G4int ShellIndex) const
void PrintData () const
G4double RandomSelectMomentum (G4int Z, G4int shellIndex) const


Detailed Description

Definition at line 52 of file G4DopplerProfile.hh.


Constructor & Destructor Documentation

G4DopplerProfile::G4DopplerProfile ( G4int  minZ = 1,
G4int  maxZ = 100 
)

Definition at line 55 of file G4DopplerProfile.cc.

00056   : zMin(minZ), zMax(maxZ)
00057 {  
00058   nBiggs = 31;
00059 
00060   LoadBiggsP("/doppler/p-biggs");
00061 
00062   for (G4int Z=zMin; Z<zMax+1; Z++)
00063     {
00064       LoadProfile("/doppler/profile",Z);
00065     }
00066 }

G4DopplerProfile::~G4DopplerProfile (  ) 

Definition at line 69 of file G4DopplerProfile.cc.

00070 {
00071   std::map<G4int,G4VEMDataSet*,std::less<G4int> >::iterator pos;
00072   for (pos = profileMap.begin(); pos != profileMap.end(); ++pos)
00073     {
00074       G4VEMDataSet* dataSet = (*pos).second;
00075       delete dataSet;
00076       dataSet = 0;
00077     }
00078 }


Member Function Documentation

size_t G4DopplerProfile::NumberOfProfiles ( G4int  Z  )  const

Definition at line 81 of file G4DopplerProfile.cc.

References CLHEP::detail::n.

00082 {
00083   G4int n = 0;
00084   if (Z>= zMin && Z <= zMax) n = nShells[Z-1];
00085   return n;
00086 }

void G4DopplerProfile::PrintData (  )  const

Definition at line 109 of file G4DopplerProfile.cc.

References G4VEMDataSet::PrintData(), and Profiles().

00110 {
00111   for (G4int Z=zMin; Z<zMax; Z++)
00112     {
00113       const G4VEMDataSet* profis = Profiles(Z);
00114       profis->PrintData();
00115     }
00116 }

const G4VEMDataSet * G4DopplerProfile::Profile ( G4int  Z,
G4int  ShellIndex 
) const

Definition at line 101 of file G4DopplerProfile.cc.

References G4VEMDataSet::GetComponent(), and Profiles().

00102 {
00103   const G4VEMDataSet* profis = Profiles(Z);
00104   const G4VEMDataSet* profi = profis->GetComponent(shellIndex);
00105   return profi;
00106 }

const G4VEMDataSet * G4DopplerProfile::Profiles ( G4int  Z  )  const

Definition at line 89 of file G4DopplerProfile.cc.

References FatalException, and G4Exception().

Referenced by PrintData(), Profile(), and RandomSelectMomentum().

00090 {
00091   std::map<G4int,G4VEMDataSet*,std::less<G4int> >::const_iterator pos;
00092   if (Z < zMin || Z > zMax) 
00093     G4Exception("G4DopplerProfile::Profiles",
00094                     "em1005",FatalException,"Z outside boundaries");
00095   pos = profileMap.find(Z);
00096   G4VEMDataSet* dataSet = (*pos).second;
00097   return dataSet;
00098 }

G4double G4DopplerProfile::RandomSelectMomentum ( G4int  Z,
G4int  shellIndex 
) const

Definition at line 227 of file G4DopplerProfile.cc.

References Profiles(), and G4VEMDataSet::RandomSelect().

Referenced by G4LowEPComptonModel::SampleSecondaries(), G4LivermorePolarizedComptonModel::SampleSecondaries(), G4LivermoreComptonModifiedModel::SampleSecondaries(), and G4LivermoreComptonModel::SampleSecondaries().

00228 {
00229   G4double value = 0.;
00230   const G4VEMDataSet* profis = Profiles(Z);
00231   value = profis->RandomSelect(shellIndex);
00232   return value;
00233 }


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