92 if (fUserDefinedList !=
nullptr) {
93 for (
const auto it : *fUserDefinedList) {
94 if (Z == it->GetAtomicNumber() &&
A == it->GetAtomicMass()) {
96 if (levelE - flevelTolerance / 2 <= E && E < levelE + flevelTolerance / 2) {
97 if (flb == it->GetFloatLevelBase()) {
108 G4int ionCode = 1000 * Z +
A;
109 auto itf = map_pre_load_list.find(ionCode);
111 if (itf != map_pre_load_list.cend()) {
112 auto lower_bound_itr = itf->second.lower_bound(E - flevelTolerance / 2);
115 while (lower_bound_itr != itf->second.cend()) {
116 levelE = lower_bound_itr->first;
117 if (levelE - flevelTolerance / 2 <= E && E < levelE + flevelTolerance / 2) {
118 if (flb == (lower_bound_itr->second)->GetFloatLevelBase() || E == 0.0) {
119 return lower_bound_itr->second;
163 if (mean_life_threshold < minimum_mean_life_threshold) {
167 if (path ==
nullptr) {
169 "G4ENSDFSTATEDATA environment variable must be set");
175 filename +=
"/ENSDFSTATE.dat";
177 ifs.open(filename.c_str());
194 ifs >> ionZ >> ionA >> ionE >> ionFL >> ionLife >> ionJ >> ionMu;
198 if (ionCode != 1000 * ionZ + ionA) {
200 ionCode = 1000 * ionZ + ionA;
206 ionMu *= (joule / tesla);
209 || (mean_life_threshold <= ionLife && ionLife < minimum_mean_life_threshold))
211 if (ionE > 0) ++iLevel;
212 if (iLevel > 9) iLevel = 9;
217 fProperty->SetAtomicNumber(ionZ);
218 fProperty->SetAtomicMass(ionA);
219 fProperty->SetIsomerLevel(iLevel);
220 fProperty->SetEnergy(ionE);
221 fProperty->SetiSpin(ionJ);
222 fProperty->SetLifeTime(ionLife);
223 fProperty->SetDecayTable(
nullptr);
224 fProperty->SetMagneticMoment(ionMu);
225 fProperty->SetFloatLevelBase(flb);
227 fIsotopeList->push_back(fProperty);
229 auto itf = map_full_list.find(ionCode);
230 if (itf == map_full_list.cend()) {
231 std::multimap<G4double, G4IsotopeProperty*> aMultiMap;
232 itf = (map_full_list.insert(std::pair<
G4int, std::multimap<G4double, G4IsotopeProperty*>>(
233 ionCode, aMultiMap)))
236 itf->second.insert(std::pair<G4double, G4IsotopeProperty*>(ionE, fProperty));
239 ifs >> ionZ >> ionA >> ionE >> ionFL >> ionLife >> ionJ >> ionMu;
242 minimum_mean_life_threshold = mean_life_threshold;
246 for (
auto& it : map_pre_load_list) {
249 map_pre_load_list.clear();
252 for (
const auto& it : map_full_list) {
253 G4int ionCode = it.first;
254 auto itf = map_pre_load_list.find(ionCode);
255 if (itf == map_pre_load_list.cend()) {
256 std::multimap<G4double, G4IsotopeProperty*> aMultiMap;
257 itf = (map_pre_load_list.insert(
258 std::pair<
G4int, std::multimap<G4double, G4IsotopeProperty*>>(ionCode, aMultiMap)))
263 for (
const auto& itt : it.second) {
265 G4double meanLife = itt.second->GetLifeTime();
266 if (exEnergy == 0.0 || meanLife > mean_life_threshold) {
267 if (itt.first != 0.0) ++iLevel;
268 if (iLevel > 9) iLevel = 9;
269 itt.second->SetIsomerLevel(iLevel);
270 itf->second.insert(std::pair<G4double, G4IsotopeProperty*>(exEnergy, itt.second));
290 if (fUserDefinedList ==
nullptr) fUserDefinedList =
new G4IsotopeList();
295 fProperty->SetAtomicNumber(ionZ);
296 fProperty->SetAtomicMass(ionA);
297 fProperty->SetIsomerLevel(9);
298 fProperty->SetEnergy(ionE);
299 fProperty->SetiSpin(ionJ);
300 fProperty->SetLifeTime(ionLife);
301 fProperty->SetDecayTable(
nullptr);
302 fProperty->SetMagneticMoment(ionMu);
303 fProperty->SetFloatLevelBase(flbIndex);
305 fUserDefinedList->push_back(fProperty);
306 fIsotopeList->push_back(fProperty);
314 if (fUserDefinedList ==
nullptr) fUserDefinedList =
new G4IsotopeList();
319 fProperty->SetAtomicNumber(ionZ);
320 fProperty->SetAtomicMass(ionA);
321 fProperty->SetIsomerLevel(9);
322 fProperty->SetEnergy(ionE);
323 fProperty->SetiSpin(ionJ);
324 fProperty->SetLifeTime(ionLife);
325 fProperty->SetDecayTable(
nullptr);
326 fProperty->SetMagneticMoment(ionMu);
327 fProperty->SetFloatLevelBase(flb);
329 fUserDefinedList->push_back(fProperty);
330 fIsotopeList->push_back(fProperty);