Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
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::G4ASTARStopping ( )

Definition at line 56 of file G4ASTARStopping.cc.

57{
58 currentMaterial = 0;
59 matIndex = -1;
60
61 name.resize(74,"");
62 effZ.resize(74,0);
63 sdata.resize(74,0);
64
65 Initialise();
66}

◆ ~G4ASTARStopping()

G4ASTARStopping::~G4ASTARStopping ( )

Definition at line 70 of file G4ASTARStopping.cc.

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

Member Function Documentation

◆ GetEffectiveZ()

G4double G4ASTARStopping::GetEffectiveZ ( G4int  idx)
inline

Definition at line 99 of file G4ASTARStopping.hh.

100{
101 return effZ[idx];
102}

◆ GetElectronicDEDX() [1/2]

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

Definition at line 93 of file G4ASTARStopping.hh.

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

◆ GetElectronicDEDX() [2/2]

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

Definition at line 93 of file G4ASTARStopping.cc.

94{
95 G4double res = 0.0;
96 if (i<0 || i>73){
97 G4cout << "### G4ASTARStopping 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:64
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

Referenced by GetElectronicDEDX().

◆ GetIndex()

G4int G4ASTARStopping::GetIndex ( const G4Material mat)

Definition at line 77 of file G4ASTARStopping.cc.

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

Referenced by GetElectronicDEDX().


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