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

#include <G4ASTARStopping.hh>

Public Member Functions

 G4ASTARStopping ()
 
 ~G4ASTARStopping ()
 
void Initialise ()
 
G4int GetIndex (const G4Material *) const
 
G4int GetIndex (const G4String &) const
 
G4double GetElectronicDEDX (G4int idx, G4double energy) const
 
G4double GetElectronicDEDX (const G4Material *, G4double energy) const
 

Detailed Description

Definition at line 62 of file G4ASTARStopping.hh.

Constructor & Destructor Documentation

G4ASTARStopping::G4ASTARStopping ( )
explicit

Definition at line 55 of file G4ASTARStopping.cc.

55  : nvectors(0), emin(CLHEP::keV)
56 {
57  // 1st initialisation
58  Initialise();
59 }
static constexpr double keV

Here is the call graph for this function:

G4ASTARStopping::~G4ASTARStopping ( )

Definition at line 63 of file G4ASTARStopping.cc.

64 {
65  if(0 < nvectors) {
66  for(size_t i=0; i<nvectors; ++i) { delete sdata[i]; }
67  }
68 }

Member Function Documentation

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

Definition at line 129 of file G4ASTARStopping.hh.

130 {
131  G4double res = 0.0;
132  if (idx<0 || idx>= G4int(nvectors)) { PrintWarning(idx); }
133  if(energy < emin) { res = (*(sdata[idx]))[0]*std::sqrt(energy/emin); }
134  else { res = sdata[idx]->Value(energy); }
135  return res;
136 }
int G4int
Definition: G4Types.hh:78
G4double energy(const ThreeVector &p, const G4double m)
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

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

Definition at line 141 of file G4ASTARStopping.hh.

142 {
143  return GetElectronicDEDX(GetIndex(mat), energy);
144 }
G4double GetElectronicDEDX(G4int idx, G4double energy) const
G4double energy(const ThreeVector &p, const G4double m)
G4int GetIndex(const G4Material *) const

Here is the call graph for this function:

G4int G4ASTARStopping::GetIndex ( const G4Material mat) const
inline

Definition at line 100 of file G4ASTARStopping.hh.

101 {
102  G4int idx = -1;
103  for (size_t i=0; i<nvectors; ++i){
104  if (mat == materials[i]){
105  idx = i;
106  break;
107  }
108  }
109  return idx;
110 }
int G4int
Definition: G4Types.hh:78

Here is the caller graph for this function:

G4int G4ASTARStopping::GetIndex ( const G4String nam) const
inline

Definition at line 114 of file G4ASTARStopping.hh.

115 {
116  G4int idx = -1;
117  for (size_t i=0; i<nvectors; ++i){
118  if (nam == materials[i]->GetName()){
119  idx = i;
120  break;
121  }
122  }
123  return idx;
124 }
int G4int
Definition: G4Types.hh:78
void G4ASTARStopping::Initialise ( )

Definition at line 82 of file G4ASTARStopping.cc.

83 {
84  // this method may be called several times during initialisation
86  if(nmat == (G4int)nvectors) { return; }
87 
88  // loop via material list to add extra data
89  G4int j;
90  for(G4int i=0; i<nmat; ++i) {
91  const G4Material* mat = (*(G4Material::GetMaterialTable()))[i];
92 
93  G4bool isThere = false;
94  for(j=0; j<(G4int)nvectors; ++j) {
95  if(mat == materials[j]) {
96  isThere = true;
97  break;
98  }
99  }
100  if(!isThere) {
101  // check list of NIST materials
102  G4String mname = mat->GetName();
103  for(j=0; j<74; ++j) {
104  if(mname == nameNIST[j]) {
105  FindData(j, mat);
106  isThere = true;
107  break;
108  }
109  }
110  if(!isThere) {
111  G4String form = mat->GetChemicalFormula();
112  for(j=0; j<numberOfMolecula; ++j) {
113  if(form == molecularName[j]) {
114  FindData(molecularIndex[j], mat);
115  break;
116  }
117  }
118  }
119  }
120  }
121 }
static const G4String molecularName[numberOfMolecula]
static const G4int numberOfMolecula
const G4String & GetChemicalFormula() const
Definition: G4Material.hh:179
const G4String & GetName() const
Definition: G4Material.hh:178
static G4MaterialTable * GetMaterialTable()
Definition: G4Material.cc:587
int G4int
Definition: G4Types.hh:78
static const G4String nameNIST[74]
static const G4int molecularIndex[numberOfMolecula]
bool G4bool
Definition: G4Types.hh:79
static size_t GetNumberOfMaterials()
Definition: G4Material.cc:594

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: