Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4PSTARStopping Class Reference

#include <G4PSTARStopping.hh>

Public Member Functions

 G4PSTARStopping ()
 
 ~G4PSTARStopping ()
 
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 63 of file G4PSTARStopping.hh.

Constructor & Destructor Documentation

G4PSTARStopping::G4PSTARStopping ( )
explicit

Definition at line 56 of file G4PSTARStopping.cc.

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

Here is the call graph for this function:

G4PSTARStopping::~G4PSTARStopping ( )

Definition at line 64 of file G4PSTARStopping.cc.

65 {
66  if(0 < nvectors) {
67  for(G4int i=0; i<nvectors; ++i) { delete sdata[i]; }
68  }
69 }
int G4int
Definition: G4Types.hh:78

Member Function Documentation

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

Definition at line 130 of file G4PSTARStopping.hh.

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

Here is the caller graph for this function:

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

Definition at line 142 of file G4PSTARStopping.hh.

143 {
144  return GetElectronicDEDX(GetIndex(mat), energy);
145 }
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 G4PSTARStopping::GetIndex ( const G4Material mat) const
inline

Definition at line 101 of file G4PSTARStopping.hh.

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

Here is the caller graph for this function:

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

Definition at line 115 of file G4PSTARStopping.hh.

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

Definition at line 83 of file G4PSTARStopping.cc.

84 {
85  // this method may be called several times during initialisation
87  if(nmat == nvectors) { return; }
88 
89  // loop via material list to add extra data
90  G4int j;
91  for(G4int i=0; i<nmat; ++i) {
92  const G4Material* mat = (*(G4Material::GetMaterialTable()))[i];
93 
94  G4bool isThere = false;
95  for(j=0; j<nvectors; ++j) {
96  if(mat == materials[j]) {
97  isThere = true;
98  break;
99  }
100  }
101  if(!isThere) {
102  // check list of NIST materials
103  G4String mname = mat->GetName();
104  for(j=0; j<74; ++j) {
105  if(mname == nameNIST[j]) {
106  FindData(j, mat);
107  isThere = true;
108  break;
109  }
110  }
111  if(!isThere) {
112  G4String form = mat->GetChemicalFormula();
113  for(j=0; j<numberOfMolecula; ++j) {
114  if(form == molecularName[j]) {
115  FindData(molecularIndex[j], mat);
116  break;
117  }
118  }
119  }
120  }
121  }
122 }
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: