Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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 58 of file G4ASTARStopping.cc.

59 {
60  currentMaterial = 0;
61  matIndex = -1;
62 
63  name.resize(74,"");
64  effZ.resize(74,0);
65  sdata.resize(74,0);
66 
67  Initialise();
68 }
const XML_Char * name
G4ASTARStopping::~G4ASTARStopping ( )

Definition at line 72 of file G4ASTARStopping.cc.

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

Member Function Documentation

G4double G4ASTARStopping::GetEffectiveZ ( G4int  idx)
inline

Definition at line 99 of file G4ASTARStopping.hh.

100 {
101  return effZ[idx];
102 }
G4double G4ASTARStopping::GetElectronicDEDX ( G4int  idx,
G4double  energy 
)

Definition at line 95 of file G4ASTARStopping.cc.

References G4cout, and G4endl.

Referenced by GetElectronicDEDX().

96 {
97  G4double res = 0.0;
98  if (i<0 || i>73){
99  G4cout << "### G4ASTARStopping WARNING: index "
100  << i << " is out of range!" << G4endl;
101  return res;
102  }
103  if(energy < emin) { res = (*(sdata[i]))[0]*std::sqrt(energy/emin); }
104  else { res = sdata[i]->Value(energy); }
105  return res;
106 }
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 G4ASTARStopping::GetElectronicDEDX ( const G4Material mat,
G4double  energy 
)
inline

Definition at line 93 of file G4ASTARStopping.hh.

References GetElectronicDEDX(), and GetIndex().

95 {
96  return GetElectronicDEDX(GetIndex(mat), energy);
97 }
G4int GetIndex(const G4Material *)
G4double GetElectronicDEDX(G4int idx, G4double energy)
double precision function energy(A, Z)
Definition: dpm25nuc6.f:4106
G4int G4ASTARStopping::GetIndex ( const G4Material mat)

Definition at line 79 of file G4ASTARStopping.cc.

References G4Material::GetName().

Referenced by GetElectronicDEDX().

80 {
81  if (mat == currentMaterial) { return matIndex; }
82  G4String matName = mat->GetName();
83  for (G4int i=0; i<74; ++i){
84  if (matName == name[i]){
85  matIndex = i;
86  currentMaterial = mat;
87  return i;
88  }
89  }
90  return -1;
91 }
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: