156{
157
158 if(fDataDirectory.empty()) {
159 std::ostringstream ost;
161 fDataDirectory = ost.str();
162 }
163
165
166
167 if(nmat == fMatIndex.size()) { return; }
168
169
170
171 if(1 < fVerbose) {
172 G4cout <<
"### G4IonICRU73Data::Initialise() for " << nmat
173 <<
" materials" <<
G4endl;
174 }
175 fMatIndex.resize(nmat, -1);
176 for(
G4int j=3; j<=ZPROJMAX; ++j) {
177 fMatData[j]->resize(nmat, nullptr);
178 }
181
186 if(1 < fVerbose) {
187 G4cout << i <<
". material: " << matname
188 << " idx=" << idx << " matIdx=" << fMatIndex[idx]
190 }
191 if(fMatIndex[idx] == -1) {
193
194
195 if(useICRU90) {
196 for(
G4int j=0; j<3; ++j) {
197 if(matname == namesICRU90[j]) {
198 ReadMaterialData(mat, densityCoef[j], true);
199 isOK = true;
200 if(1 < fVerbose) {
202 }
203 break;
204 }
205 }
206 }
207
208 if(!isOK) {
209 for(
G4int j=0; j<31; ++j) {
210 if(matname == namesICRU73[j]) {
211 ReadMaterialData(mat, 1.0, false);
212 isOK = true;
213 if(1 < fVerbose) {
215 }
216 break;
217 }
218 }
219 }
220
221
222 if(!isOK) {
226 for (std::size_t j=0; j<nelm; ++j) {
227 if ((*elmv)[j]->GetZasInt() > ZTARGMAX) {
228 isOut = true;
229 break;
230 }
231 }
232 if (!isOut) {
233 ReadElementData(mat, useICRU90);
234 isOK = true;
235 if(1 < fVerbose) {
236 G4cout <<
"Data via elements for " << matname <<
G4endl;
237 }
238 }
239 }
240 if(isOK) { fMatIndex[idx] = i; }
241 }
242 if(1 < fVerbose) {
244 }
245 }
246}
G4GLOB_DLL std::ostream G4cout
static G4EmParameters * Instance()
G4bool UseICRU90Data() const
const G4String & GetDirLEDATA() const
static std::size_t GetNumberOfMaterials()
static G4MaterialTable * GetMaterialTable()
const G4String & GetName() const