G4ASTARStopping Class Reference

#include <G4ASTARStopping.hh>


Public Member Functions

 G4ASTARStopping ()
 ~G4ASTARStopping ()
G4int GetIndex (const G4Material *)
G4double GetEffectiveZ (G4int idx)
G4double GetElectronicDEDX (G4int idx, G4double energy)
G4double GetElectronicDEDX (const G4Material *, G4double energy)


Detailed Description

Definition at line 61 of file G4ASTARStopping.hh.


Constructor & Destructor Documentation

G4ASTARStopping::G4ASTARStopping (  ) 

Definition at line 56 of file G4ASTARStopping.cc.

00057 {
00058   currentMaterial = 0;
00059   matIndex = -1;
00060 
00061   name.resize(74,"");
00062   effZ.resize(74,0);
00063   sdata.resize(74,0);
00064 
00065   Initialise();
00066 }

G4ASTARStopping::~G4ASTARStopping (  ) 

Definition at line 70 of file G4ASTARStopping.cc.

00071 {
00072   for(size_t i=0; i<74; ++i) { delete sdata[i]; }
00073 }


Member Function Documentation

G4double G4ASTARStopping::GetEffectiveZ ( G4int  idx  )  [inline]

Definition at line 99 of file G4ASTARStopping.hh.

00100 {
00101   return effZ[idx];
00102 } 

G4double G4ASTARStopping::GetElectronicDEDX ( const G4Material ,
G4double  energy 
) [inline]

Definition at line 93 of file G4ASTARStopping.hh.

References GetElectronicDEDX(), and GetIndex().

00095 {
00096   return GetElectronicDEDX(GetIndex(mat), energy);
00097 }

G4double G4ASTARStopping::GetElectronicDEDX ( G4int  idx,
G4double  energy 
)

Definition at line 93 of file G4ASTARStopping.cc.

References G4cout, and G4endl.

Referenced by GetElectronicDEDX().

00094 {
00095   G4double res = 0.0;
00096   if (i<0 || i>73){
00097     G4cout << "### G4ASTARStopping WARNING: index " 
00098            << i << " is out of range!" << G4endl; 
00099     return res;
00100   }
00101   if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); } 
00102   else              { res = sdata[i]->Value(energy); }
00103   return res;
00104 }

G4int G4ASTARStopping::GetIndex ( const G4Material  ) 

Definition at line 77 of file G4ASTARStopping.cc.

References G4Material::GetName().

Referenced by GetElectronicDEDX().

00078 {  
00079   if (mat == currentMaterial) { return matIndex; }
00080   G4String matName = mat->GetName();
00081   for (G4int i=0; i<74; ++i){
00082     if (matName == name[i]){ 
00083       matIndex = i;
00084       currentMaterial = mat;
00085       return i;
00086     }
00087   }
00088   return -1;
00089 }


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