#include <G4ICRU90StoppingData.hh>
Definition at line 54 of file G4ICRU90StoppingData.hh.
◆ G4ICRU90StoppingData() [1/2]
G4ICRU90StoppingData::G4ICRU90StoppingData |
( |
| ) |
|
Definition at line 49 of file G4ICRU90StoppingData.cc.
50{
51
52 for (std::size_t i = 0; i < nvectors; ++i) {
53 materials[i] = nullptr;
54 sdata_proton[i] = nullptr;
55 sdata_alpha[i] = nullptr;
56 }
57 FillData();
58
60}
◆ ~G4ICRU90StoppingData()
G4ICRU90StoppingData::~G4ICRU90StoppingData |
( |
| ) |
|
Definition at line 64 of file G4ICRU90StoppingData.cc.
65{
66 for (std::size_t i = 0; i < nvectors; ++i) {
67 delete sdata_proton[i];
68 delete sdata_alpha[i];
69 }
70}
◆ G4ICRU90StoppingData() [2/2]
◆ GetElectronicDEDXforAlpha() [1/2]
◆ GetElectronicDEDXforAlpha() [2/2]
Definition at line 157 of file G4ICRU90StoppingData.hh.
159{
160 return (idx >= 0 && idx < nvectors) ? GetDEDX(sdata_alpha[idx], scaledKinEnergy) : 0.0;
161}
◆ GetElectronicDEDXforProton() [1/2]
◆ GetElectronicDEDXforProton() [2/2]
Definition at line 149 of file G4ICRU90StoppingData.hh.
151{
152 return (idx >= 0 && idx < nvectors) ? GetDEDX(sdata_proton[idx], kinEnergy) : 0.0;
153}
◆ GetIndex() [1/2]
◆ GetIndex() [2/2]
G4int G4ICRU90StoppingData::GetIndex |
( |
const G4String & | nam | ) |
const |
|
inline |
Definition at line 123 of file G4ICRU90StoppingData.hh.
124{
126 if (nam == materials[1]->GetName()) {
127 idx = 1;
128 }
129 else if (nam == materials[0]->GetName()) {
130 idx = 0;
131 }
132 else if (nam == materials[2]->GetName()) {
133 idx = 2;
134 }
135 return idx;
136}
◆ Initialise()
void G4ICRU90StoppingData::Initialise |
( |
| ) |
|
Definition at line 74 of file G4ICRU90StoppingData.cc.
75{
76 if (isInitialized) {
77 return;
78 }
79
81 if (nmat == (
G4int)nvectors) {
82 return;
83 }
84
85 static const G4String nameNIST_ICRU90[3] = {
"G4_AIR",
"G4_WATER",
"G4_GRAPHITE"};
86
87
88 for (
G4int i = 0; i < nmat; ++i) {
90
92 for (auto const & material : materials) {
93 if (mat == material) {
94 isThere = true;
95 break;
96 }
97 }
98 if (! isThere) {
99
101 for (
G4int j = 0; j < nvectors; ++j) {
102 if (mname == nameNIST_ICRU90[j]) {
103 materials[j] = mat;
104 break;
105 }
106 }
107 }
108 isInitialized =
109 ((materials[0] != nullptr) && (materials[1] != nullptr) && (materials[2] != nullptr));
110 if (isInitialized) {
111 return;
112 }
113 }
114}
static std::size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
const G4String & GetName() const
Referenced by G4ICRU90StoppingData(), G4BetheBlochModel::Initialise(), and G4BraggModel::Initialise().
◆ IsApplicable()
Definition at line 99 of file G4ICRU90StoppingData.hh.
100{
101 return (mat == materials[1] || mat == materials[0] || mat == materials[2]);
102}
◆ operator=()
The documentation for this class was generated from the following files: