Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4ESTARStopping Class Reference

#include <G4ESTARStopping.hh>

Public Member Functions

 G4ESTARStopping (const G4String &datatype="")
 
 ~G4ESTARStopping ()
 
G4int GetIndex (const G4Material *)
 
G4double GetElectronicDEDX (G4int idx, G4double energy)
 
G4double GetElectronicDEDX (const G4Material *, G4double energy)
 

Detailed Description

Definition at line 62 of file G4ESTARStopping.hh.

Constructor & Destructor Documentation

G4ESTARStopping::G4ESTARStopping ( const G4String datatype = "")
explicit

Definition at line 53 of file G4ESTARStopping.cc.

54 {
55  currentMaterial = 0;
56  matIndex = -1;
57 
58  name.resize(280,"");
59  sdata.resize(280,0);
60 
61  type = 0;
62  if("basic" == datatype) { type = 1; }
63  else if("long" == datatype) { type = 2; }
64 
65  Initialise();
66 }
const XML_Char * name
Definition: expat.h:151
G4ESTARStopping::~G4ESTARStopping ( )

Definition at line 70 of file G4ESTARStopping.cc.

71 {
72  for(size_t i=1; i<280; ++i) { delete sdata[i]; }
73 }

Member Function Documentation

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

Definition at line 94 of file G4ESTARStopping.cc.

95 {
96  G4double res = 0.0;
97  if (i<1 || i>279){
98  G4cout << "### G4ESTARStopping WARNING: index "
99  << i << " is out of range!" << G4endl;
100  return res;
101  }
102  if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); }
103  else { res = sdata[i]->Value(energy); }
104  return res;
105 }
G4GLOB_DLL std::ostream G4cout
G4double energy(const ThreeVector &p, const G4double m)
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4double G4ESTARStopping::GetElectronicDEDX ( const G4Material mat,
G4double  energy 
)
inline

Definition at line 96 of file G4ESTARStopping.hh.

98 {
99  return GetElectronicDEDX(GetIndex(mat), energy);
100 }
G4int GetIndex(const G4Material *)
G4double energy(const ThreeVector &p, const G4double m)
G4double GetElectronicDEDX(G4int idx, G4double energy)

Here is the call graph for this function:

G4int G4ESTARStopping::GetIndex ( const G4Material mat)

Definition at line 77 of file G4ESTARStopping.cc.

78 {
79  if (mat != currentMaterial) {
80  G4String matName = mat->GetName();
81  for (G4int i=1; i<280; ++i){
82  if (matName == name[i]){
83  matIndex = i;
84  currentMaterial = mat;
85  break;
86  }
87  }
88  }
89  return matIndex;
90 }
const XML_Char * name
Definition: expat.h:151
const G4String & GetName() const
Definition: G4Material.hh:178
int G4int
Definition: G4Types.hh:78

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: