#include <G4ICRU90StoppingData.hh>
Definition at line 56 of file G4ICRU90StoppingData.hh.
◆ G4ICRU90StoppingData() [1/2]
G4ICRU90StoppingData::G4ICRU90StoppingData |
( |
| ) |
|
|
explicit |
Definition at line 53 of file G4ICRU90StoppingData.cc.
53 : isInitialized(false)
54{
55
56 for(size_t i=0; i<nvectors; ++i) {
57 materials[i] = nullptr;
58 sdata_proton[i] = nullptr;
59 sdata_alpha[i] = nullptr;
60 }
61 FillData();
62
64}
◆ ~G4ICRU90StoppingData()
G4ICRU90StoppingData::~G4ICRU90StoppingData |
( |
| ) |
|
Definition at line 68 of file G4ICRU90StoppingData.cc.
69{
70 for(size_t i=0; i<nvectors; ++i) {
71 delete sdata_proton[i];
72 delete sdata_alpha[i];
73 }
74}
◆ G4ICRU90StoppingData() [2/2]
◆ GetElectronicDEDXforAlpha() [1/2]
◆ GetElectronicDEDXforAlpha() [2/2]
Definition at line 151 of file G4ICRU90StoppingData.hh.
153{
154 return (idx < 0 || idx >= nvectors) ? 0.0
155 : GetDEDX(sdata_alpha[idx], scaledKinEnergy);
156}
◆ GetElectronicDEDXforProton() [1/2]
◆ GetElectronicDEDXforProton() [2/2]
Definition at line 142 of file G4ICRU90StoppingData.hh.
144{
145 return (idx < 0 || idx >= nvectors) ? 0.0
146 : GetDEDX(sdata_proton[idx], kinEnergy);
147}
◆ GetIndex() [1/2]
◆ GetIndex() [2/2]
G4int G4ICRU90StoppingData::GetIndex |
( |
const G4String & |
nam | ) |
const |
|
inline |
Definition at line 122 of file G4ICRU90StoppingData.hh.
123{
125 if (nam == materials[0]->GetName()) { idx = 0; }
126 else if(nam == materials[1]->GetName()) { idx = 1; }
127 else if(nam == materials[2]->GetName()) { idx = 2; }
128 return idx;
129}
◆ Initialise()
void G4ICRU90StoppingData::Initialise |
( |
| ) |
|
Definition at line 78 of file G4ICRU90StoppingData.cc.
79{
80 if(isInitialized) { return; }
81
83 if(nmat == (
G4int)nvectors) {
return; }
84
85 static const G4String nameNIST_ICRU90[3] =
86 {"G4_AIR","G4_WATER","G4_GRAPHITE"};
87
88
89 for(
G4int i=0; i<nmat; ++i) {
91
93 for(auto& material : materials)
94 {
95 if(mat == material)
96 {
97 isThere = true;
98 break;
99 }
100 }
101 if(!isThere) {
102
104 for(
G4int j=0; j<nvectors; ++j) {
105 if(mname == nameNIST_ICRU90[j]) {
106 materials[j] = mat;
107 break;
108 }
109 }
110 }
111 isInitialized = ((materials[0] != nullptr) && (materials[1] != nullptr) &&
112 (materials[2] != nullptr));
113 if(isInitialized) { return; }
114 }
115}
static size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
const G4String & GetName() const
Referenced by G4ICRU90StoppingData(), G4BetheBlochModel::Initialise(), G4BraggIonModel::Initialise(), and G4BraggModel::Initialise().
◆ IsApplicable()
Definition at line 106 of file G4ICRU90StoppingData.hh.
107{
108 return (mat == materials[0] || mat == materials[1] || mat == materials[2]);
109}
◆ operator=()
The documentation for this class was generated from the following files: