Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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 61 of file G4ESTARStopping.hh.

Constructor & Destructor Documentation

◆ G4ESTARStopping()

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

Definition at line 52 of file G4ESTARStopping.cc.

53{
54 currentMaterial = 0;
55 matIndex = -1;
56
57 name.resize(280,"");
58 sdata.resize(280,0);
59
60 type = 0;
61 if("basic" == datatype) { type = 1; }
62 else if("long" == datatype) { type = 2; }
63
64 Initialise();
65}

◆ ~G4ESTARStopping()

G4ESTARStopping::~G4ESTARStopping ( )

Definition at line 69 of file G4ESTARStopping.cc.

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

Member Function Documentation

◆ GetElectronicDEDX() [1/2]

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

Definition at line 95 of file G4ESTARStopping.hh.

97{
98 return GetElectronicDEDX(GetIndex(mat), energy);
99}
G4double GetElectronicDEDX(G4int idx, G4double energy)
G4int GetIndex(const G4Material *)

◆ GetElectronicDEDX() [2/2]

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

Definition at line 93 of file G4ESTARStopping.cc.

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

Referenced by GetElectronicDEDX().

◆ GetIndex()

G4int G4ESTARStopping::GetIndex ( const G4Material mat)

Definition at line 76 of file G4ESTARStopping.cc.

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

Referenced by GetElectronicDEDX().


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