Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 = "")

Definition at line 55 of file G4ESTARStopping.cc.

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

Definition at line 72 of file G4ESTARStopping.cc.

73 {
74  //for(size_t i=1; i<280; ++i) { delete sdata[i]; }
75 }

Member Function Documentation

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

Definition at line 96 of file G4ESTARStopping.cc.

References G4cout, and G4endl.

Referenced by GetElectronicDEDX().

97 {
98  G4double res = 0.0;
99  if (i<1 || i>279){
100  G4cout << "### G4ESTARStopping WARNING: index "
101  << i << " is out of range!" << G4endl;
102  return res;
103  }
104  if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); }
105  else { res = sdata[i]->Value(energy); }
106  return res;
107 }
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double G4ESTARStopping::GetElectronicDEDX ( const G4Material mat,
G4double  energy 
)
inline

Definition at line 96 of file G4ESTARStopping.hh.

References GetElectronicDEDX(), and GetIndex().

98 {
99  return GetElectronicDEDX(GetIndex(mat), energy);
100 }
G4int GetIndex(const G4Material *)
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4double GetElectronicDEDX(G4int idx, G4double energy)
G4int G4ESTARStopping::GetIndex ( const G4Material mat)

Definition at line 79 of file G4ESTARStopping.cc.

References G4Material::GetName().

Referenced by GetElectronicDEDX().

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

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