40 map<string, unsigned short int> getElementMap() {
41 map<string, unsigned short int> elementTable;
42 elementTable[
"H"] = 1;
43 elementTable[
"HE"] = 2;
44 elementTable[
"LI"] = 3;
45 elementTable[
"BE"] = 4;
46 elementTable[
"B"] = 5;
47 elementTable[
"C"] = 6;
48 elementTable[
"N"] = 7;
49 elementTable[
"O"] = 8;
50 elementTable[
"F"] = 9;
51 elementTable[
"NE"] = 10;
52 elementTable[
"NA"] = 11;
53 elementTable[
"MG"] = 12;
54 elementTable[
"AL"] = 13;
55 elementTable[
"SI"] = 14;
56 elementTable[
"P"] = 15;
57 elementTable[
"S"] = 16;
58 elementTable[
"CL"] = 17;
59 elementTable[
"AR"] = 18;
60 elementTable[
"K"] = 19;
61 elementTable[
"CA"] = 20;
62 elementTable[
"SC"] = 21;
63 elementTable[
"TI"] = 22;
64 elementTable[
"V"] = 23;
65 elementTable[
"CR"] = 24;
66 elementTable[
"MN"] = 25;
67 elementTable[
"FE"] = 26;
68 elementTable[
"CO"] = 27;
69 elementTable[
"NI"] = 28;
70 elementTable[
"CU"] = 29;
71 elementTable[
"ZN"] = 30;
72 elementTable[
"GA"] = 31;
73 elementTable[
"GE"] = 32;
74 elementTable[
"AS"] = 33;
75 elementTable[
"SE"] = 34;
76 elementTable[
"BR"] = 35;
77 elementTable[
"KR"] = 36;
78 elementTable[
"RB"] = 37;
79 elementTable[
"SR"] = 38;
80 elementTable[
"Y"] = 39;
81 elementTable[
"ZR"] = 40;
82 elementTable[
"NB"] = 41;
83 elementTable[
"MO"] = 42;
84 elementTable[
"TC"] = 43;
85 elementTable[
"RU"] = 44;
86 elementTable[
"RH"] = 45;
87 elementTable[
"PD"] = 46;
88 elementTable[
"AG"] = 47;
89 elementTable[
"CD"] = 48;
90 elementTable[
"IN"] = 49;
91 elementTable[
"SN"] = 50;
92 elementTable[
"SB"] = 51;
93 elementTable[
"TE"] = 52;
94 elementTable[
"I"] = 53;
95 elementTable[
"XE"] = 54;
96 elementTable[
"CS"] = 55;
97 elementTable[
"BA"] = 56;
98 elementTable[
"LA"] = 57;
99 elementTable[
"CE"] = 58;
100 elementTable[
"PR"] = 59;
101 elementTable[
"ND"] = 60;
102 elementTable[
"PM"] = 61;
103 elementTable[
"SM"] = 62;
104 elementTable[
"EU"] = 63;
105 elementTable[
"GD"] = 64;
106 elementTable[
"TB"] = 65;
107 elementTable[
"DY"] = 66;
108 elementTable[
"HO"] = 67;
109 elementTable[
"ER"] = 68;
110 elementTable[
"TM"] = 69;
111 elementTable[
"YB"] = 70;
112 elementTable[
"LU"] = 71;
113 elementTable[
"HF"] = 72;
114 elementTable[
"TA"] = 73;
115 elementTable[
"W"] = 74;
116 elementTable[
"RE"] = 75;
117 elementTable[
"OS"] = 76;
118 elementTable[
"IR"] = 77;
119 elementTable[
"PT"] = 78;
120 elementTable[
"AU"] = 79;
121 elementTable[
"HG"] = 80;
122 elementTable[
"TL"] = 81;
123 elementTable[
"PB"] = 82;
124 elementTable[
"BI"] = 83;
125 elementTable[
"PO"] = 84;
126 elementTable[
"AT"] = 85;
127 elementTable[
"RN"] = 86;
128 elementTable[
"FR"] = 87;
129 elementTable[
"RA"] = 88;
130 elementTable[
"AC"] = 89;
131 elementTable[
"TH"] = 90;
132 elementTable[
"PA"] = 91;
133 elementTable[
"U"] = 92;
134 elementTable[
"NP"] = 93;
135 elementTable[
"PU"] = 94;
136 elementTable[
"AM"] = 95;
137 elementTable[
"CM"] = 96;
138 elementTable[
"BK"] = 97;
139 elementTable[
"CF"] = 98;
140 elementTable[
"ES"] = 99;
141 elementTable[
"FM"] = 100;
142 elementTable[
"MD"] = 101;
143 elementTable[
"NO"] = 102;
144 elementTable[
"LR"] = 103;
145 elementTable[
"RF"] = 104;
146 elementTable[
"DB"] = 105;
147 elementTable[
"SG"] = 106;
148 elementTable[
"BH"] = 107;
149 elementTable[
"HS"] = 108;
150 elementTable[
"MT"] = 109;
151 elementTable[
"DS"] = 110;
152 elementTable[
"RG"] = 111;
153 elementTable[
"CN"] = 112;
154 elementTable[
"UUT"] = 113;
155 elementTable[
"UUQ"] = 114;
156 elementTable[
"UUP"] = 115;
157 elementTable[
"UUH"] = 116;
158 elementTable[
"UUS"] = 117;
159 elementTable[
"UUO"] = 118;
164 unsigned short int findZ(
string element) {
166 transform(element.begin(), element.end(), element.begin(), ::toupper);
168 map<string, unsigned short int> elementMap = getElementMap();
170 if (elementMap.find(element) != elementMap.end()) {
171 return elementMap[element];
178 unsigned short int setZ(
string id) {
181 for (
unsigned int i=0; i <
id.length(); ++i) {
182 if (!isdigit(
id[i])) {
183 element.push_back(
id[i]);
187 unsigned short int Z = findZ(element);
189 egsWarning(
"setZ: Warning: Element does not exist "
190 "in our data (%s)\n", element.c_str());
196 EGS_Ensdf::EGS_Ensdf(
const string nuclide,
const string ensdf_filename,
const string relaxType,
const bool allowMultiTrans,
int verbosity) {
199 relaxationType = relaxType;
200 allowMultiTransition = allowMultiTrans;
202 if (ensdf_file.is_open()) {
206 radionuclide = nuclide.substr(0, nuclide.find_last_of(
"."));
209 string element = radionuclide.substr(0, radionuclide.find(
"-"));
213 "%s\n",nuclide.c_str());
215 "\"%s\"\n",ensdf_filename.c_str());
217 ensdf_file.open(ensdf_filename.c_str(),ios::in);
218 if (!ensdf_file.is_open()) {
219 egsWarning(
"\nEGS_Ensdf::EGS_Ensdf: failed to open ensdf file %s"
220 " for reading\n\n",ensdf_filename.c_str());
225 vector<string> ensdf;
226 while (getline(ensdf_file, line)) {
227 ensdf.push_back(line);
230 if (ensdf_file.is_open()) {
239 if (ensdf_file.is_open()) {
243 for (vector<ParentRecord * >::iterator it = myParentRecords.begin();
244 it!=myParentRecords.end(); it++) {
248 myParentRecords.clear();
249 for (vector<NormalizationRecord * >::iterator it =
250 myNormalizationRecords.begin();
251 it!=myNormalizationRecords.end(); it++) {
255 myNormalizationRecords.clear();
256 for (vector<LevelRecord * >::iterator it =
257 myLevelRecords.begin();
258 it!=myLevelRecords.end(); it++) {
262 myLevelRecords.clear();
263 for (vector<BetaMinusRecord * >::iterator it =
264 myBetaMinusRecords.begin();
265 it!=myBetaMinusRecords.end(); it++) {
269 myBetaMinusRecords.clear();
270 for (vector<BetaPlusRecord * >::iterator it =
271 myBetaPlusRecords.begin();
272 it!=myBetaPlusRecords.end(); it++) {
276 myBetaPlusRecords.clear();
277 for (vector<GammaRecord * >::iterator it =
278 myGammaRecords.begin();
279 it!=myGammaRecords.end(); it++) {
283 myGammaRecords.clear();
284 for (vector<AlphaRecord * >::iterator it =
285 myAlphaRecords.begin();
286 it!=myAlphaRecords.end(); it++) {
290 myAlphaRecords.clear();
291 for (vector<GammaRecord * >::iterator it =
292 myMetastableGammaRecords.begin();
293 it!=myMetastableGammaRecords.end(); it++) {
297 myMetastableGammaRecords.clear();
298 for (vector<GammaRecord * >::iterator it =
299 myUncorrelatedGammaRecords.begin();
300 it!=myUncorrelatedGammaRecords.end(); it++) {
304 myUncorrelatedGammaRecords.clear();
307 string egsRemoveWhite(
string myString) {
310 for (
unsigned int i = 0; i<myString.size(); i++) {
311 if (!(myString[i]==
' ' || myString[i]==
'\n' || myString[i]==
'\t')) {
312 result += myString[i];
319 string egsTrimString(
string myString) {
321 int end = myString.size();
322 while (myString[++start]==
' ');
323 while (myString[--end]==
' ');
324 return myString.substr(start,end-start+1);
328 void EGS_Ensdf::parseEnsdf(vector<string> ensdf) {
345 for (
int i = 0; i < 14; i++) {
346 recordStack.push_back(vector<string>());
353 for (vector<string>::iterator it = ensdf.begin(); it!=ensdf.end(); it++) {
361 if (line[6]==
' ' && line[7]==
' ' && line[8]==
' ') {
365 else if (line[6]==
' ' && line[7]==
'H' && line[8]==
' ') {
369 else if (line[6]==
' ' && line[7]==
'Q' && line[8]==
' ') {
373 else if (line[6]==
' ' && line[7]==
'X') {
377 else if ((line[6]==
'C' || line[6]==
'D' || line[6]==
'T' ||
378 line[6]==
'c' || line[6]==
'd' || line[6]==
't')) {
382 recordStack[12].push_back(line);
386 recordStack[4].push_back(line);
390 else if (line[6]==
' ' && line[7]==
'P') {
395 recordStack[5].push_back(line);
398 else if (line[6]==
' ' && line[7]==
'N') {
403 recordStack[6].push_back(line);
406 if (line[6]==
' ' && line[7]==
'L' && line[8]==
' ') {
411 recordStack[7].push_back(line);
414 else if (line[6]==
' ' && line[7]==
'B' && line[8]==
' ') {
419 recordStack[8].push_back(line);
422 else if (line[6]==
' ' && line[7]==
'E' && line[8]==
' ') {
427 recordStack[9].push_back(line);
430 else if (line[6]==
' ' && line[7]==
'A' && line[8]==
' ') {
435 recordStack[10].push_back(line);
438 else if (line[6]==
' ' && (line[7]==
'D' || line[7]==
' ') &&
439 (line[8]==
'N' || line[8]==
'P' || line[8]==
'A')) {
444 recordStack[11].push_back(line);
447 else if (line[6]==
' ' && line[7]==
'G' && line[8]==
' ') {
452 recordStack[12].push_back(line);
457 if (!recordStack.empty()) {
462 if (relaxationType ==
"ensdf") {
464 egsInformation(
"EGS_Ensdf::parseEnsdf: Checking for x-rays and Auger...\n");
467 getEmissionsFromComments();
470 egsInformation(
"EGS_Ensdf::parseEnsdf: Done checking for x-rays and Auger.\n");
475 double minimumIntensity = 1e-10;
476 for (vector<BetaMinusRecord * >::iterator it = myBetaMinusRecords.begin();
477 it!=myBetaMinusRecords.end();) {
478 if ((*it)->getBetaIntensity() <= minimumIntensity) {
480 egsInformation(
"EGS_Ensdf::parseEnsdf: Removing beta- due to small intensity (%.1e < %.1e)\n",(*it)->getBetaIntensity(),minimumIntensity);
482 myBetaMinusRecords.erase(it);
488 for (vector<BetaPlusRecord * >::iterator it = myBetaPlusRecords.begin();
489 it!=myBetaPlusRecords.end();) {
490 if ((*it)->getBetaIntensity() <= minimumIntensity) {
492 egsInformation(
"EGS_Ensdf::parseEnsdf: Removing beta+ due to small intensity (%.1e < %.1e)\n",(*it)->getBetaIntensity(),minimumIntensity);
494 myBetaPlusRecords.erase(it);
500 for (vector<AlphaRecord *>::iterator it = myAlphaRecords.begin();
501 it != myAlphaRecords.end();) {
502 if ((*it)->getAlphaIntensity() <= minimumIntensity) {
504 egsInformation(
"EGS_Ensdf::parseEnsdf: Removing alpha due to small intensity (%.1e < %.1e)\n",(*it)->getAlphaIntensity(),minimumIntensity);
506 myAlphaRecords.erase(it);
515 bool printedWarning =
false;
516 for (vector<GammaRecord * >::iterator it = myGammaRecords.begin();
517 it!=myGammaRecords.end();) {
519 if ((*it)->getTransitionIntensity() <= minimumIntensity) {
521 egsInformation(
"EGS_Ensdf::parseEnsdf: Removing gamma due to small intensity (%.1e < %.1e)\n",(*it)->getTransitionIntensity(),minimumIntensity);
525 myGammaRecords.erase(it);
528 else if ((*it)->getLevelRecord()->getEnergy() <
epsilon) {
534 if (!printedWarning) {
535 egsWarning(
"EGS_Ensdf::parseEnsdf: Warning: Switching internal transition with unknown decay level to uncorrelated event (the emissions will still occur, but uncorrelated with disintegrations).\n");
536 printedWarning =
true;
539 myUncorrelatedGammaRecords.push_back(
new GammaRecord(*it));
541 egsInformation(
"EGS_Ensdf::parseEnsdf: Uncorrelated gamma (E,I): %f %f\n", myUncorrelatedGammaRecords.back()->getDecayEnergy(), myUncorrelatedGammaRecords.back()->getTransitionIntensity());
544 myGammaRecords.erase(it);
552 for (vector<BetaMinusRecord * >::iterator it = myBetaMinusRecords.begin();
553 it!=myBetaMinusRecords.end(); it++) {
555 myBetaRecords.push_back(*it);
558 for (vector<BetaPlusRecord * >::iterator it = myBetaPlusRecords.begin();
559 it!=myBetaPlusRecords.end(); it++) {
561 myBetaRecords.push_back(*it);
565 egsInformation(
"\nEGS_Ensdf::parseEnsdf: Summary of %s emissions:\n", radionuclide.c_str());
568 if (myBetaRecords.size()) {
570 for (vector<BetaRecordLeaf *>::iterator beta = myBetaRecords.begin();
571 beta != myBetaRecords.end(); beta++) {
572 egsInformation(
"%f %f\n", (*beta)->getFinalEnergy(), (*beta)->getBetaIntensity());
575 if (myAlphaRecords.size()) {
577 for (vector<AlphaRecord *>::iterator alpha = myAlphaRecords.begin();
578 alpha != myAlphaRecords.end(); alpha++) {
579 egsInformation(
"%f %f\n", (*alpha)->getFinalEnergy(), (*alpha)->getAlphaIntensity());
582 if (myGammaRecords.size()) {
584 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
585 gamma != myGammaRecords.end(); gamma++) {
588 if ((*gamma)->getICIntensity() > 0) {
589 icI = (*gamma)->getGammaIntensity()*(1+(*gamma)->getICIntensity()) - (*gamma)->getGammaIntensity();
591 if ((*gamma)->getIPIntensity() > 0) {
592 ipI = (*gamma)->getTransitionIntensity() - (*gamma)->getGammaIntensity() - icI;
594 egsInformation(
"%f %f %.4e %.4e\n", (*gamma)->getDecayEnergy(), (*gamma)->getGammaIntensity(), icI, ipI);
597 if (myUncorrelatedGammaRecords.size()) {
598 egsInformation(
"Uncorrelated gamma records (E,Igamma,Ice,Ipp):\n");
599 for (vector<GammaRecord *>::iterator gamma = myUncorrelatedGammaRecords.begin();
600 gamma != myUncorrelatedGammaRecords.end(); gamma++) {
603 if ((*gamma)->getICIntensity() > 0) {
604 icI = (*gamma)->getGammaIntensity()*(1+(*gamma)->getICIntensity()) - (*gamma)->getGammaIntensity();
606 if ((*gamma)->getIPIntensity() > 0) {
607 ipI = (*gamma)->getTransitionIntensity() - (*gamma)->getGammaIntensity() - icI;
609 egsInformation(
"%f %f %.4e %.4e\n", (*gamma)->getDecayEnergy(), (*gamma)->getGammaIntensity(), icI, ipI);
612 if (xrayEnergies.size() > 0) {
614 for (
unsigned int i=0; i < xrayEnergies.size(); ++i) {
618 if (augerEnergies.size() > 0) {
620 for (
unsigned int i=0; i < augerEnergies.size(); ++i) {
629 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
630 gamma != myGammaRecords.end(); gamma++) {
632 double energy = (*gamma)->getDecayEnergy();
633 double guessedLevelEnergy =
634 ((*gamma)->getLevelRecord()->getEnergy() - energy);
638 "(LevelE,E,GuessedE): "
639 "%f %f %f\n",(*gamma)->getLevelRecord()->getEnergy(),
640 energy, guessedLevelEnergy);
643 double bestMatch = 1E10;
645 for (vector<LevelRecord * >::iterator it = myLevelRecords.begin();
646 it!=myLevelRecords.end(); it++) {
648 double testMatch = fabs((*it)->getEnergy()-guessedLevelEnergy);
650 if (testMatch < bestMatch &&
651 (testMatch < guessedLevelEnergy*0.3 || testMatch < 20)) {
653 bestMatch = testMatch;
657 if (bestMatch == 1E10) {
658 egsWarning(
"EGS_Ensdf::parseEnsdf: Warning: Could "
659 "not find a level with energy matching decay "
660 "of gamma with energy E=%f; "
661 "assuming final level is ground state\n",energy);
662 (*gamma)->setFinalLevel(myLevelRecords.front());
665 (*gamma)->setFinalLevel(level);
669 egsInformation(
"EGS_Ensdf::parseEnsdf: Gamma (final level E, I, Igamma): "
670 "%f %f %f\n",level->getEnergy(), (*gamma)->getTransitionIntensity(), (*gamma)->getGammaIntensity());
673 (*gamma)->getFinalLevel()->cumulDisintegrationIntensity((*gamma)->getTransitionIntensity());
678 vector<double> totalLevelIntensity;
679 totalLevelIntensity.resize(myLevelRecords.size());
680 for (vector<LevelRecord * >::iterator it = myLevelRecords.begin();
681 it!=myLevelRecords.end(); ++it) {
683 totalLevelIntensity[j] = 0;
684 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
685 gamma != myGammaRecords.end(); gamma++) {
687 if ((*gamma)->getLevelRecord() == (*it)) {
688 totalLevelIntensity[j] += (*gamma)->getTransitionIntensity();
700 egsInformation(
"EGS_Ensdf::parseEnsdf: Checking for metastable radionuclides...\n");
702 for (vector<ParentRecord * >::iterator parent = myParentRecords.begin();
703 parent!=myParentRecords.end(); parent++) {
705 bool gotDisint =
false;
706 for (vector<BetaRecordLeaf *>::iterator beta = myBetaRecords.begin();
707 beta != myBetaRecords.end(); beta++) {
709 if ((*beta)->getParentRecord() == *parent) {
715 for (vector<AlphaRecord *>::iterator alpha = myAlphaRecords.begin();
716 alpha != myAlphaRecords.end(); alpha++) {
718 if ((*alpha)->getParentRecord() == *parent) {
729 for (vector<LevelRecord * >::iterator it = myLevelRecords.begin();
730 it!=myLevelRecords.end(); ++it) {
732 double disintIntensity = (*it)->getDisintegrationIntensity();
733 if (disintIntensity <
epsilon) {
734 bool gotDecayToLevel =
false;
735 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
736 gamma < myGammaRecords.end(); ++gamma) {
739 if ((*gamma)->getParentRecord() == *parent && (*gamma)->getLevelRecord() == (*it)) {
744 if (!gotDecayToLevel) {
745 gotDecayToLevel =
true;
748 myMetastableGammaRecords.push_back(
new GammaRecord(*gamma));
752 myMetastableGammaRecords.back()->setTransitionIntensity(totalLevelIntensity[j]);
757 if (verbose && myMetastableGammaRecords.size() > 0) {
767 if (verbose && myMetastableGammaRecords.size() < 1) {
774 void EGS_Ensdf::buildRecords() {
776 if (!myParentRecords.empty()) {
777 lastParent = myParentRecords.back();
780 if (!myNormalizationRecords.empty()) {
781 lastNormalization = myNormalizationRecords.back();
784 if (!myLevelRecords.empty()) {
785 if (!previousParent || previousParent == lastParent) {
786 lastLevel = myLevelRecords.back();
796 for (
int i = 0; i < recordStack.size(); i++) {
797 if (!recordStack[i].empty() && recordStack[i].front().length() > 5) {
811 myCommentRecords.push_back(
new CommentRecord(recordStack[i]));
814 myParentRecords.push_back(
new ParentRecord(recordStack[i]));
817 myNormalizationRecords.push_back(
new
821 myLevelRecords.push_back(
new LevelRecord(recordStack[i]));
822 previousParent = lastParent;
825 myBetaMinusRecords.push_back(
new
827 lastNormalization, lastLevel));
830 myBetaPlusRecords.push_back(
new
832 lastNormalization, lastLevel));
835 myAlphaRecords.push_back(
new
837 lastNormalization, lastLevel));
840 egsWarning(
"EGS_Ensdf::buildRecords: Warning: Delayed particle not "
841 "supported! Further development required.\n");
844 myGammaRecords.push_back(
new
846 lastNormalization, lastLevel));
849 recordStack[i].clear();
855 void EGS_Ensdf::normalizeIntensities() {
857 egsInformation(
"EGS_Ensdf::normalizeIntensities: Normalizing the "
858 "emission intensities to allow for spectrum sampling "
863 double totalDecayIntensity = 0;
864 double totalDecayIntensityUnc = 0;
865 double lastIntensity = 0;
867 for (vector<BetaMinusRecord * >::iterator it = myBetaMinusRecords.begin();
868 it!=myBetaMinusRecords.end(); it++) {
871 egsInformation(
"EGS_Ensdf::normalizeIntensities: Beta- (E,I): %f %f\n",
872 (*it)->getFinalEnergy(), (*it)->getBetaIntensity());
875 totalDecayIntensity += (*it)->getBetaIntensity();
876 totalDecayIntensityUnc += (*it)->getBetaIntensityUnc();
878 for (vector<BetaPlusRecord * >::iterator it = myBetaPlusRecords.begin();
879 it!=myBetaPlusRecords.end(); it++) {
882 egsInformation(
"EGS_Ensdf::normalizeIntensities: Beta+/EC (E,I): %f %f\n",
883 (*it)->getFinalEnergy(), (*it)->getBetaIntensity());
886 totalDecayIntensity += (*it)->getBetaIntensity();
887 totalDecayIntensityUnc += (*it)->getPositronIntensityUnc() + (*it)->getECIntensityUnc();
889 for (vector<AlphaRecord *>::iterator alpha = myAlphaRecords.begin();
890 alpha != myAlphaRecords.end(); alpha++) {
893 egsInformation(
"EGS_Ensdf::normalizeIntensities: Alpha (E,I): %f %f\n",
894 (*alpha)->getFinalEnergy(), (*alpha)->getAlphaIntensity());
897 totalDecayIntensity += (*alpha)->getAlphaIntensity();
898 totalDecayIntensityUnc += (*alpha)->getAlphaIntensityUnc();
900 for (vector<GammaRecord *>::iterator gamma = myMetastableGammaRecords.begin();
901 gamma != myMetastableGammaRecords.end(); gamma++) {
904 egsInformation(
"EGS_Ensdf::normalizeIntensities: MetastableGamma (I): %f\n",
905 (*gamma)->getTransitionIntensity());
908 totalDecayIntensity += (*gamma)->getTransitionIntensity();
909 totalDecayIntensityUnc += (*gamma)->getGammaIntensityUnc() + (*gamma)->getICIntensityUnc() + (*gamma)->getIPIntensityUnc();
913 double branchSum = 0;
914 for (vector<NormalizationRecord * >::iterator norm =
915 myNormalizationRecords.begin();
916 norm!=myNormalizationRecords.end(); norm++) {
917 branchSum += (*norm)->getBranchMultiplier();
922 egsWarning(
"\nEGS_Ensdf::normalizeIntensities: Warning: The branching ratios of this nuclide add to less than 1 (%f). The leftover probability will be assigned to fission events. These events will return a zero energy particle and be counted as disintegrations. This is expected for Cf-252 in the LNHB collection.\n\n",branchSum);
925 totalDecayIntensity /= branchSum;
927 else if (branchSum > 1+
epsilon) {
928 egsWarning(
"\nEGS_Ensdf::normalizeIntensities: Warning: The branching ratios of this nuclide add to greater than 1 (%f). This will result in overall emission rates being incorrect (e.g. number of emissions per 100 decays) when compared against the input.\n\n",branchSum);
943 if (totalDecayIntensity > 100 +
epsilon || totalDecayIntensity < 100 -
epsilon) {
949 decayDiscrepancy = 100 - totalDecayIntensity;
951 egsInformation(
"EGS_Ensdf::normalizeIntensities: Warning: The sum of the decay probabilities for this nuclide does not equal 100\%! In order for modeling to proceed, this must be accounted for. The discrepancy of %f has been distributed over all decays, proportional to the corresponding uncertainties. Note that this will also change the internal transition intensities, since they depend on the decays.\n", decayDiscrepancy);
956 for (vector<LevelRecord * >::iterator it = myLevelRecords.begin();
957 it!=myLevelRecords.end(); it++) {
958 (*it)->resetDisintegrationIntensity();
961 for (vector<BetaMinusRecord * >::iterator it = myBetaMinusRecords.begin();
962 it!=myBetaMinusRecords.end(); it++) {
964 (*it)->setBetaIntensity((*it)->getBetaIntensity() + (*it)->getBetaIntensityUnc() / totalDecayIntensityUnc * decayDiscrepancy);
967 (*it)->getLevelRecord()->cumulDisintegrationIntensity((*it)->getBetaIntensity());
970 for (vector<BetaPlusRecord * >::iterator it = myBetaPlusRecords.begin();
971 it!=myBetaPlusRecords.end(); it++) {
977 double newPositronIntensity = (*it)->getBetaIntensity() * (*it)->getPositronIntensity() + (*it)->getPositronIntensityUnc() / totalDecayIntensityUnc * decayDiscrepancy;
978 double newECIntensity = (*it)->getBetaIntensity() * (1-(*it)->getPositronIntensity()) + (*it)->getECIntensityUnc() / totalDecayIntensityUnc * decayDiscrepancy;
981 (*it)->setBetaIntensity(newPositronIntensity + newECIntensity);
985 (*it)->setPositronIntensity(newPositronIntensity / (*it)->getBetaIntensity());
988 (*it)->getLevelRecord()->cumulDisintegrationIntensity((*it)->getBetaIntensity());
991 for (vector<AlphaRecord * >::iterator it = myAlphaRecords.begin();
992 it!=myAlphaRecords.end(); it++) {
994 (*it)->setAlphaIntensity((*it)->getAlphaIntensity() + (*it)->getAlphaIntensityUnc() / totalDecayIntensityUnc * decayDiscrepancy);
997 (*it)->getLevelRecord()->cumulDisintegrationIntensity((*it)->getAlphaIntensity());
1000 for (vector<GammaRecord *>::iterator it = myMetastableGammaRecords.begin();
1001 it != myMetastableGammaRecords.end(); it++) {
1005 if ((*it)->getICIntensity() > 0) {
1006 icI = (*it)->getGammaIntensity()*(1+(*it)->getICIntensity()) - (*it)->getGammaIntensity();
1008 if ((*it)->getIPIntensity() > 0) {
1009 ipI = (*it)->getTransitionIntensity() - (*it)->getGammaIntensity() - ((*it)->getGammaIntensity()*(1+(*it)->getICIntensity()) - (*it)->getGammaIntensity());
1014 double newGammaIntensity = (*it)->getGammaIntensity() + (*it)->getGammaIntensityUnc() / totalDecayIntensityUnc * decayDiscrepancy;
1015 double newICIntensity = icI + (*it)->getICIntensityUnc() / totalDecayIntensityUnc * decayDiscrepancy;
1016 double newIPIntensity = ipI + (*it)->getIPIntensityUnc() / totalDecayIntensityUnc * decayDiscrepancy;
1019 (*it)->setTransitionIntensity(newGammaIntensity + newICIntensity + newIPIntensity);
1020 (*it)->setGammaIntensity(newGammaIntensity);
1021 (*it)->setICIntensity((newICIntensity+(*it)->getGammaIntensity()) / (*it)->getGammaIntensity() - 1);
1024 (*it)->getLevelRecord()->cumulDisintegrationIntensity((*it)->getTransitionIntensity());
1028 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
1029 gamma != myGammaRecords.end(); gamma++) {
1032 (*gamma)->getFinalLevel()->cumulDisintegrationIntensity((*gamma)->getTransitionIntensity());
1036 egsInformation(
"\nEGS_Ensdf::normalizeIntensities: Summary of %s decays (adjusted by %f):\n", radionuclide.c_str(), decayDiscrepancy);
1039 if (myBetaRecords.size()) {
1041 for (vector<BetaRecordLeaf *>::iterator beta = myBetaRecords.begin();
1042 beta != myBetaRecords.end(); beta++) {
1043 egsInformation(
"%f %f\n", (*beta)->getFinalEnergy(), (*beta)->getBetaIntensity());
1046 if (myAlphaRecords.size()) {
1048 for (vector<AlphaRecord *>::iterator alpha = myAlphaRecords.begin();
1049 alpha != myAlphaRecords.end(); alpha++) {
1050 egsInformation(
"%f %f\n", (*alpha)->getFinalEnergy(), (*alpha)->getAlphaIntensity());
1053 if (myGammaRecords.size()) {
1055 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
1056 gamma != myGammaRecords.end(); gamma++) {
1059 if ((*gamma)->getICIntensity() > 0) {
1060 icI = (*gamma)->getGammaIntensity()*(1+(*gamma)->getICIntensity()) - (*gamma)->getGammaIntensity();
1062 if ((*gamma)->getIPIntensity() > 0) {
1063 ipI = (*gamma)->getTransitionIntensity() - (*gamma)->getGammaIntensity() - icI;
1065 egsInformation(
"%f %f %.4e %.4e\n", (*gamma)->getDecayEnergy(), (*gamma)->getGammaIntensity(), icI, ipI);
1068 if (myUncorrelatedGammaRecords.size()) {
1069 egsInformation(
"Uncorrelated gamma records (E,Igamma,Ice,Ipp):\n");
1070 for (vector<GammaRecord *>::iterator gamma = myUncorrelatedGammaRecords.begin();
1071 gamma != myUncorrelatedGammaRecords.end(); gamma++) {
1074 if ((*gamma)->getICIntensity() > 0) {
1075 icI = (*gamma)->getGammaIntensity()*(1+(*gamma)->getICIntensity()) - (*gamma)->getGammaIntensity();
1077 if ((*gamma)->getIPIntensity() > 0) {
1078 ipI = (*gamma)->getTransitionIntensity() - (*gamma)->getGammaIntensity() - icI;
1080 egsInformation(
"%f %f %.4e %.4e\n", (*gamma)->getDecayEnergy(), (*gamma)->getGammaIntensity(), icI, ipI);
1083 if (xrayEnergies.size() > 0) {
1085 for (
unsigned int i=0; i < xrayEnergies.size(); ++i) {
1089 if (augerEnergies.size() > 0) {
1091 for (
unsigned int i=0; i < augerEnergies.size(); ++i) {
1092 egsInformation(
"%f %f\n", augerEnergies[i], augerIntensities[i]);
1098 totalDecayIntensity = 100;
1104 if (allowMultiTransition) {
1106 egsInformation(
"EGS_Ensdf::normalizeIntensities: Comparing the cumulative disintegration intensity of each level with the gamma transition intensities... \n");
1111 vector<double> totalLevelIntensity;
1112 totalLevelIntensity.resize(myLevelRecords.size());
1113 for (vector<LevelRecord * >::iterator it = myLevelRecords.begin();
1114 it!=myLevelRecords.end(); ++it) {
1116 totalLevelIntensity[j] = 0;
1117 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
1118 gamma != myGammaRecords.end(); gamma++) {
1120 if ((*gamma)->getLevelRecord() == (*it)) {
1121 totalLevelIntensity[j] += (*gamma)->getTransitionIntensity();
1129 j = myLevelRecords.size()-1;
1130 for (vector<LevelRecord * >::reverse_iterator it = myLevelRecords.rbegin();
1131 it!=myLevelRecords.rend(); ++it) {
1133 double disintIntensity = (*it)->getDisintegrationIntensity();
1136 egsInformation(
"EGS_Ensdf::normalizeIntensities: (Level, ItoLevel, IfromLevel): %d %f %f\n", j, disintIntensity, totalLevelIntensity[j]);
1140 if (disintIntensity >
epsilon && totalLevelIntensity[j] > disintIntensity +
epsilon) {
1141 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
1142 gamma != myGammaRecords.end(); gamma++) {
1144 if ((*gamma)->getLevelRecord() == (*it)) {
1145 double multipleTransitionProb = (1.-disintIntensity/totalLevelIntensity[j]);
1147 (*gamma)->setMultiTransitionProb(multipleTransitionProb);
1150 egsInformation(
"EGS_Ensdf::normalizeIntensities: Multiple gamma transition probability (E,I): %f %f\n",(*gamma)->getDecayEnergy(), multipleTransitionProb);
1154 (*gamma)->setTransitionIntensity(
1155 (*gamma)->getTransitionIntensity() * disintIntensity/totalLevelIntensity[j]
1157 (*gamma)->setGammaIntensity(
1158 (*gamma)->getGammaIntensity() * disintIntensity/totalLevelIntensity[j]
1168 for (vector<GammaRecord *>::iterator gamma = myUncorrelatedGammaRecords.begin();
1169 gamma != myUncorrelatedGammaRecords.end(); gamma++) {
1170 totalDecayIntensity += (*gamma)->getTransitionIntensity();
1177 for (
unsigned int i=0; i < xrayIntensities.size(); ++i) {
1179 egsInformation(
"EGS_Ensdf::normalizeIntensities: XRay (E,I): %f %f\n",
1180 xrayEnergies[i], xrayIntensities[i]);
1183 totalDecayIntensity += xrayIntensities[i];
1185 for (
unsigned int i=0; i < augerIntensities.size(); ++i) {
1187 egsInformation(
"EGS_Ensdf::normalizeIntensities: Auger (E,I): %f %f\n",
1188 augerEnergies[i], augerIntensities[i]);
1191 totalDecayIntensity += augerIntensities[i];
1195 egsInformation(
"EGS_Ensdf::normalizeIntensities: totalDecayIntensity: "
1196 "%f\n\n",totalDecayIntensity);
1198 "Calculating renormalized intensities...\n");
1202 for (vector<BetaRecordLeaf *>::iterator beta = myBetaRecords.begin();
1203 beta != myBetaRecords.end(); beta++) {
1205 (*beta)->setBetaIntensity(
1206 (*beta)->getBetaIntensity() / totalDecayIntensity);
1208 if ((beta - myBetaRecords.begin()) > 0) {
1209 (*beta)->setBetaIntensity(
1210 (*beta)->getBetaIntensity() + (*(beta-1))->getBetaIntensity());
1212 lastIntensity = (*beta)->getBetaIntensity();
1215 egsInformation(
"EGS_Ensdf::normalizeIntensities: Beta (E,I): %f %f\n",
1216 (*beta)->getFinalEnergy(), (*beta)->getBetaIntensity());
1221 for (vector<AlphaRecord *>::iterator alpha = myAlphaRecords.begin();
1222 alpha != myAlphaRecords.end(); alpha++) {
1224 (*alpha)->setAlphaIntensity(
1225 (*alpha)->getAlphaIntensity() / totalDecayIntensity);
1227 if ((alpha - myAlphaRecords.begin()) == 0 && lastIntensity >
epsilon) {
1228 (*alpha)->setAlphaIntensity(
1229 (*alpha)->getAlphaIntensity() + lastIntensity);
1231 else if ((alpha - myAlphaRecords.begin()) > 0) {
1232 (*alpha)->setAlphaIntensity(
1233 (*alpha)->getAlphaIntensity() +
1234 (*(alpha-1))->getAlphaIntensity());
1236 lastIntensity = (*alpha)->getAlphaIntensity();
1239 egsInformation(
"EGS_Ensdf::normalizeIntensities: Alpha (E,I): %f %f\n",
1240 (*alpha)->getFinalEnergy(), (*alpha)->getAlphaIntensity());
1245 for (vector<GammaRecord *>::iterator gamma = myMetastableGammaRecords.begin();
1246 gamma != myMetastableGammaRecords.end(); gamma++) {
1248 (*gamma)->setTransitionIntensity(
1249 (*gamma)->getTransitionIntensity() / totalDecayIntensity);
1251 if ((gamma - myMetastableGammaRecords.begin()) == 0 && lastIntensity >
epsilon) {
1252 (*gamma)->setTransitionIntensity(
1253 (*gamma)->getTransitionIntensity() + lastIntensity);
1255 else if ((gamma - myMetastableGammaRecords.begin()) > 0) {
1256 (*gamma)->setTransitionIntensity(
1257 (*gamma)->getTransitionIntensity() +
1258 (*(gamma-1))->getTransitionIntensity());
1260 lastIntensity = (*gamma)->getTransitionIntensity();
1263 egsInformation(
"EGS_Ensdf::normalizeIntensities: MetastableGamma (I): %f\n",
1264 (*gamma)->getTransitionIntensity());
1269 for (vector<GammaRecord *>::iterator gamma = myUncorrelatedGammaRecords.begin();
1270 gamma != myUncorrelatedGammaRecords.end(); gamma++) {
1271 (*gamma)->setTransitionIntensity(
1272 (*gamma)->getTransitionIntensity() / totalDecayIntensity);
1274 if ((gamma - myUncorrelatedGammaRecords.begin()) == 0 && lastIntensity >
epsilon) {
1275 (*gamma)->setTransitionIntensity(
1276 (*gamma)->getTransitionIntensity() + lastIntensity);
1278 else if ((gamma - myUncorrelatedGammaRecords.begin()) > 0) {
1279 (*gamma)->setTransitionIntensity(
1280 (*gamma)->getTransitionIntensity() +
1281 (*(gamma-1))->getTransitionIntensity());
1283 lastIntensity = (*gamma)->getTransitionIntensity();
1286 egsInformation(
"EGS_Ensdf::normalizeIntensities: UncorrelatedGamma (I): %f\n",
1287 (*gamma)->getTransitionIntensity());
1292 for (
unsigned int i=0; i < xrayIntensities.size(); ++i) {
1294 xrayIntensities[i] /= totalDecayIntensity;
1296 if (i==0 && lastIntensity >
epsilon) {
1297 xrayIntensities[i] += lastIntensity;
1300 xrayIntensities[i] += xrayIntensities[i-1];
1302 lastIntensity = xrayIntensities[i];
1305 egsInformation(
"EGS_Ensdf::normalizeIntensities: XRay (E,I): %f %f\n",
1306 xrayEnergies[i], xrayIntensities[i]);
1311 for (
unsigned int i=0; i < augerIntensities.size(); ++i) {
1313 augerIntensities[i] /= totalDecayIntensity;
1315 if (i==0 && lastIntensity >
epsilon) {
1316 augerIntensities[i] += lastIntensity;
1319 augerIntensities[i] += augerIntensities[i-1];
1321 lastIntensity = augerIntensities[i];
1324 egsInformation(
"EGS_Ensdf::normalizeIntensities: Auger (E,I): %f %f\n",
1325 augerEnergies[i], augerIntensities[i]);
1332 vector<double> totalLevelIntensity;
1333 totalLevelIntensity.resize(myLevelRecords.size());
1334 for (vector<LevelRecord * >::iterator it = myLevelRecords.begin();
1335 it!=myLevelRecords.end(); it++) {
1337 double disintIntensity = (*it)->getDisintegrationIntensity();
1339 totalLevelIntensity[j] = 0;
1340 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
1341 gamma != myGammaRecords.end(); gamma++) {
1343 if ((*gamma)->getLevelRecord() == (*it)) {
1344 totalLevelIntensity[j] += (*gamma)->getTransitionIntensity();
1350 "totalLevelIntensity: %f\n", totalLevelIntensity[j]);
1353 if (disintIntensity >
epsilon && totalLevelIntensity[j] < disintIntensity +
epsilon) {
1354 totalLevelIntensity[j] = disintIntensity;
1361 for (vector<LevelRecord * >::iterator it = myLevelRecords.begin();
1362 it!=myLevelRecords.end(); it++) {
1365 bool levelCanDecay =
false;
1366 for (vector<GammaRecord *>::iterator gamma = myGammaRecords.begin();
1367 gamma != myGammaRecords.end(); gamma++) {
1369 if ((*gamma)->getLevelRecord() == (*it)) {
1370 levelCanDecay =
true;
1372 (*gamma)->setGammaIntensity(
1373 (*gamma)->getGammaIntensity() /
1374 (*gamma)->getTransitionIntensity());
1376 (*gamma)->setICIntensity(
1377 (*gamma)->getGammaIntensity() * (1+(*gamma)->getICIntensity()));
1379 if (totalLevelIntensity[j] >
epsilon) {
1380 (*gamma)->setTransitionIntensity(
1381 (*gamma)->getTransitionIntensity() /
1382 totalLevelIntensity[j]);
1386 (*gamma)->setTransitionIntensity(
1387 (*gamma)->getTransitionIntensity() +
1388 (*(gamma-1))->getTransitionIntensity());
1394 "Gamma (level,E,I,Igamma,Ice): "
1396 j,(*gamma)->getDecayEnergy(), (*gamma)->getTransitionIntensity(),
1397 (*gamma)->getGammaIntensity(), (*gamma)->getICIntensity());
1407 (*it)->setLevelCanDecay(levelCanDecay);
1413 void EGS_Ensdf::getEmissionsFromComments() {
1415 egsInformation(
"EGS_Ensdf::getEmissionsFromComments: Attempting to obtain x-ray and Auger emissions from the ENSDF comments. This assumes a particular comment format...\n");
1418 bool containsEmissions =
false;
1419 bool xrayContinues =
false;
1420 bool augerContinues =
false;
1421 bool gotTotal =
false;
1422 vector<double> multilineEnergies,
1423 multilineIntensities;
1424 double lineTotalIntensity = 0;
1425 unsigned int countNumAfterTotal = 0;
1428 for (vector<CommentRecord *>::iterator comment = myCommentRecords.begin();
1429 comment != myCommentRecords.end(); comment++) {
1431 string line = (*comment)->getComment();
1434 if (line.find(
"{U Energy (keV)} {U Intensity} {U Line}") != std::string::npos) {
1435 containsEmissions =
true;
1438 if (containsEmissions) {
1441 if (line.length() < 48 ||
1442 ((xrayContinues || augerContinues) && line.at(30) !=
'|')) {
1455 if (countNumAfterTotal > 0) {
1457 if (lineTotalType == 0) {
1458 bool containsZeroIntensity =
false;
1459 for (std::vector<double>::iterator it = xrayIntensities.end()-countNumAfterTotal; it != xrayIntensities.end(); ++it) {
1461 containsZeroIntensity =
true;
1466 if (containsZeroIntensity) {
1467 for (std::vector<double>::iterator it = xrayIntensities.end()-countNumAfterTotal; it != xrayIntensities.end(); ++it) {
1468 *it = lineTotalIntensity / countNumAfterTotal;
1474 else if (lineTotalType == -1) {
1475 bool containsZeroIntensity =
false;
1476 for (std::vector<double>::iterator it = augerIntensities.end()-countNumAfterTotal; it != augerIntensities.end(); ++it) {
1478 containsZeroIntensity =
true;
1483 if (containsZeroIntensity) {
1484 for (std::vector<double>::iterator it = augerIntensities.end()-countNumAfterTotal; it != augerIntensities.end(); ++it) {
1485 *it = lineTotalIntensity / countNumAfterTotal;
1492 countNumAfterTotal = 0;
1493 lineTotalIntensity = 0.;
1496 if ((xrayContinues || augerContinues)
1497 && multilineEnergies.size() > 0) {
1499 double energySum = 0;
1500 double intensitySum = 0;
1501 unsigned int numNonzeroE = 0;
1502 unsigned int numNonzeroI = 0;
1503 for (
unsigned int i=0; i < multilineEnergies.size(); ++i) {
1504 if (multilineEnergies[i] > 0) {
1505 energySum += multilineEnergies[i];
1509 for (
unsigned int i=0; i < multilineIntensities.size(); ++i) {
1510 if (multilineIntensities[i] >
epsilon) {
1511 intensitySum += multilineIntensities[i];
1516 if (numNonzeroE > 0) {
1517 energy = energySum / numNonzeroE;
1520 if (numNonzeroI > 0) {
1521 intensity = intensitySum / numNonzeroI;
1524 if (numNonzeroE > 0 && numNonzeroI > 0) {
1525 if (xrayContinues) {
1526 xrayEnergies.push_back(energy);
1527 xrayIntensities.push_back(intensity);
1530 augerEnergies.push_back(energy);
1531 augerIntensities.push_back(intensity);
1535 multilineEnergies.clear();
1536 multilineIntensities.clear();
1539 xrayContinues =
false;
1540 augerContinues =
false;
1544 if (line.length() > 48) {
1546 string emissionLine = egsTrimString(line.substr(47));
1549 if (emissionLine.length() < 1 || (emissionLine.at(0) !=
'X' && emissionLine.find(
"AUGER") == std::string::npos)) {
1553 string eStr = egsTrimString(line.substr(13, 15));
1557 size_t eDash = eStr.find(
'-');
1559 if (eDash!=std::string::npos) {
1560 if (eStr.length() > eDash+1) {
1561 double e1 = atof(eStr.substr(0, eDash).c_str());
1562 double e2 = atof(eStr.substr(eDash+1).c_str());
1563 energy = (e1 + e2) / 2;
1566 energy = atof(eStr.substr(0, eDash).c_str());
1570 energy = atof(eStr.c_str());
1577 string iStr = egsTrimString(line.substr(32, 9));
1578 double intensity = atof(iStr.c_str());
1584 if (gotTotal && energy >
epsilon) {
1585 countNumAfterTotal++;
1591 if (emissionLine.find(
"(total)") != std::string::npos) {
1593 lineTotalIntensity = intensity;
1594 if (emissionLine.find(
"AUGER") != std::string::npos) {
1605 if (line.at(30) ==
'|') {
1606 if (emissionLine.at(0) ==
'X') {
1607 xrayContinues =
true;
1609 else if (emissionLine.find(
"AUGER") != std::string::npos) {
1610 augerContinues =
true;
1613 multilineEnergies.push_back(energy);
1614 multilineIntensities.push_back(intensity);
1618 if (emissionLine.at(0) ==
'X') {
1620 (gotTotal && energy >
epsilon)) {
1621 xrayEnergies.push_back(energy);
1622 xrayIntensities.push_back(intensity);
1625 else if (emissionLine.find(
"AUGER") != std::string::npos) {
1627 (gotTotal && energy >
epsilon)) {
1628 augerEnergies.push_back(energy);
1629 augerIntensities.push_back(intensity);
1638 vector<double > EGS_Ensdf::getXRayIntensities()
const {
1639 return xrayIntensities;
1642 vector<double > EGS_Ensdf::getXRayEnergies()
const {
1643 return xrayEnergies;
1646 vector<double > EGS_Ensdf::getAugerIntensities()
const {
1647 return augerIntensities;
1650 vector<double > EGS_Ensdf::getAugerEnergies()
const {
1651 return augerEnergies;
1654 vector<ParentRecord * > EGS_Ensdf::getParentRecords()
const {
1655 return myParentRecords;
1658 vector<LevelRecord * > EGS_Ensdf::getLevelRecords()
const {
1659 return myLevelRecords;
1662 vector<BetaRecordLeaf * > EGS_Ensdf::getBetaRecords()
const {
1663 return myBetaRecords;
1666 vector<GammaRecord * > EGS_Ensdf::getGammaRecords()
const {
1667 return myGammaRecords;
1670 vector<GammaRecord * > EGS_Ensdf::getMetastableGammaRecords()
const {
1671 return myMetastableGammaRecords;
1674 vector<GammaRecord * > EGS_Ensdf::getUncorrelatedGammaRecords()
const {
1675 return myUncorrelatedGammaRecords;
1678 vector<AlphaRecord * > EGS_Ensdf::getAlphaRecords()
const {
1679 return myAlphaRecords;
1682 Record::Record() {};
1683 Record::Record(vector<string> ensdf) {
1684 if (!ensdf.empty()) {
1693 vector<string> Record::getRecords()
const {
1700 double Record::recordToDouble(
int startPos,
int endPos) {
1701 if (!lines.empty()) {
1702 if (lines.front().length() < startPos) {
1703 egsWarning(
"Record::recordToDouble: Warning: Record too short to "
1704 "contain desired quantity\n");
1707 string record = lines.front().substr(startPos-1,
1709 return atof(record.c_str());
1712 egsWarning(
"Record::recordToDouble: Error: Record is empty\n");
1719 string Record::recordToString(
int startPos,
int endPos) {
1720 if (!lines.empty()) {
1721 if (lines.front().length() < startPos) {
1722 egsWarning(
"Record::recordToString: Warning: Record too short to "
1723 "contain desired quantity\n");
1727 return egsTrimString(lines.front().substr(startPos-1, endPos-startPos+1));
1730 egsWarning(
"Record::recordToString: Error: Record is empty\n");
1746 double Record::getTag(
string searchString,
string notAfter=
"") {
1747 if (lines.size() > 1) {
1749 for (
int i=1; i<lines.size(); ++i) {
1751 int tagPos = lines[i].find(searchString);
1753 if (tagPos != std::string::npos) {
1756 size_t notAfterPos = std::string::npos;
1757 if (notAfter.length() > 0 && tagPos-notAfter.length() > 0) {
1758 notAfterPos = lines[i].find(notAfter, tagPos-notAfter.length());
1763 if (notAfterPos == std::string::npos || notAfterPos > tagPos) {
1764 tagPos += searchString.length();
1766 string record = lines[i].substr(tagPos, lines[i].find(
" ",tagPos)-tagPos);
1768 return atof(record.c_str());
1775 tagPos = lines[i].find(searchString, tagPos+searchString.length());
1777 if (tagPos != std::string::npos) {
1778 tagPos += searchString.length();
1780 string record = lines[i].substr(tagPos, lines[i].find(
" ",tagPos)-tagPos);
1782 return atof(record.c_str());
1794 double Record::parseStdUncertainty(
string value,
string stdUncertainty) {
1795 if (stdUncertainty.length() < 1) {
1798 if (value.length() < 1) {
1799 egsInformation(
"Record::parseStdUncertainty: Warning: No uncertainty provided! Returning 0 uncertainty for value of %f\n", value.c_str());
1803 if (stdUncertainty.length() > value.length()) {
1804 egsInformation(
"Record::parseStdUncertainty: Warning: Number of digits in uncertainty greater than number of digits in value. Returning 0 uncertainty for value of %f\n", value.c_str());
1809 size_t sciNotLoc = value.find_last_of(
'E');
1810 size_t dotLoc = value.find_last_of(
'.');
1814 if (sciNotLoc != std::string::npos) {
1815 startPos = sciNotLoc-1;
1818 startPos = value.length()-1;
1821 if (stdUncertainty.length() == 2) {
1827 for (
int i = startPos; i >= 0; --i) {
1830 value[i] = stdUncertainty[j--];
1838 return atof(value.c_str());
1841 string Record::getStringAfter(
string searchString,
size_t len) {
1842 if (lines.size() > 1) {
1844 for (
int i=1; i<lines.size(); ++i) {
1846 int tagPos = lines[i].find(searchString);
1848 if (tagPos != std::string::npos) {
1850 tagPos += searchString.length();
1852 string record = lines[i].substr(tagPos, len);
1864 double Record::parseHalfLife(
int startPos,
int endPos) {
1865 if (lines.empty()) {
1866 egsWarning(
"Record::parseHalfLife: Error: Record is empty\n");
1869 if (lines.front().length() < startPos) {
1870 egsWarning(
"Record::parseHalfLife: Warning: Record too short to "
1871 "contain desired quantity\n");
1875 string halfLifeStr = egsTrimString(lines.front().substr(startPos-1,
1876 endPos-startPos+1));
1879 if (halfLifeStr.substr(0,5).compare(
"STABLE") == 0) {
1884 unsigned int numLength;
1885 for (numLength = 0; numLength < halfLifeStr.length(); numLength++) {
1886 if (!isdigit(halfLifeStr[numLength])
1887 && halfLifeStr.at(numLength) !=
'.') {
1894 if (halfLifeStr.size() < numLength+2) {
1899 double hl = atof(halfLifeStr.substr(0, numLength).c_str());
1902 if (halfLifeStr.size()>numLength+2) {
1903 string units = halfLifeStr.substr(numLength+1, 2);
1904 if (units.compare(
"Y ") == 0) {
1907 else if (units.compare(
"D ") == 0) {
1910 else if (units.compare(
"H ") == 0) {
1913 else if (units.compare(
"M ") == 0) {
1916 else if (units.compare(
"S ") == 0) {
1919 else if (units.compare(
"MS") == 0) {
1922 else if (units.compare(
"US") == 0) {
1925 else if (units.compare(
"NS") == 0) {
1928 else if (units.compare(
"PS") == 0) {
1931 else if (units.compare(
"FS") == 0) {
1934 else if (units.compare(
"AS") == 0) {
1941 else if (halfLifeStr.size()>numLength+1) {
1942 string units = halfLifeStr.substr(numLength+1, 1);
1943 if (units.compare(
"Y") == 0) {
1946 else if (units.compare(
"D") == 0) {
1949 else if (units.compare(
"H") == 0) {
1952 else if (units.compare(
"M") == 0) {
1955 else if (units.compare(
"S") == 0) {
1970 CommentRecord::CommentRecord(vector<string> ensdf):
Record(ensdf) {
1974 void CommentRecord::processEnsdf() {
1975 if (!lines.empty()) {
1977 comment = lines.front();
1981 string CommentRecord::getComment() {
1986 ParentRecord::ParentRecord(vector<string> ensdf):
Record(ensdf) {
1990 void ParentRecord::processEnsdf() {
1991 halfLife = parseHalfLife(40, 49);
1997 Q = recordToDouble(65, 74) / 1000.;
2001 egsWarning(
"ParentRecord::processEnsdf: Warning: No Q-value given, any "
2002 "positron records will give errors\n");
2007 double ParentRecord::getHalfLife()
const {
2011 double ParentRecord::getQ()
const {
2015 ParentRecord *ParentRecordLeaf::getParentRecord()
const {
2025 NormalizationRecord::NormalizationRecord(vector<string> ensdf,
2030 void NormalizationRecord::processEnsdf() {
2031 normalizeRelative = recordToDouble(10, 19);
2032 normalizeTransition = recordToDouble(22, 29);
2033 normalizeBranch = recordToDouble(32, 39);
2034 normalizeBeta = recordToDouble(42, 49);
2038 if (normalizeRelative <
epsilon) {
2039 normalizeRelative = 1;
2041 if (normalizeTransition <
epsilon) {
2042 normalizeTransition = 1;
2044 if (normalizeBranch <
epsilon) {
2045 normalizeBranch = 1;
2047 if (normalizeBeta <
epsilon) {
2052 string element = recordToString(4, 5);
2064 egsInformation(
"NormalizationRecord::processEnsdf(): Z, nshell: %d %d\n",Z,nshell);
2071 int NormalizationRecord::getNShell()
const {
2075 double NormalizationRecord::getBindingEnergy(
int shell)
const {
2079 void NormalizationRecord::relax(
int shell,
2080 EGS_Float ecut, EGS_Float pcut,
2083 relaxations->
relax(Z,shell,ecut,pcut,rndm,edep,particles);
2090 double NormalizationRecord::getRelativeMultiplier()
const {
2091 return normalizeRelative;
2097 double NormalizationRecord::getTransitionMultiplier()
const {
2098 return normalizeTransition;
2103 double NormalizationRecord::getBranchMultiplier()
const {
2104 return normalizeBranch;
2109 double NormalizationRecord::getBetaMultiplier()
const {
2110 return normalizeBeta;
2124 LevelRecord::LevelRecord() {
2127 disintegrationIntensity = 0;
2129 LevelRecord::LevelRecord(vector<string> ensdf):
2132 disintegrationIntensity = 0;
2135 void LevelRecord::processEnsdf() {
2136 energy = recordToDouble(10, 19) / 1000.;
2137 halfLife = parseHalfLife(40, 49);
2140 void LevelRecord::setLevelCanDecay(
bool canDecayTmp) {
2141 canDecay = canDecayTmp;
2144 bool LevelRecord::levelCanDecay()
const {
2148 void LevelRecord::resetDisintegrationIntensity() {
2149 disintegrationIntensity = 0;
2152 void LevelRecord::cumulDisintegrationIntensity(
double disintIntensity) {
2153 disintegrationIntensity += disintIntensity;
2156 double LevelRecord::getDisintegrationIntensity()
const {
2157 return disintegrationIntensity;
2160 double LevelRecord::getEnergy()
const {
2164 double LevelRecord::getHalfLife()
const {
2168 LevelRecord *LevelRecordLeaf::getLevelRecord()
const {
2178 BetaRecordLeaf::BetaRecordLeaf(vector<string> ensdf,
2190 string id = egsRemoveWhite(lines.front().substr(0,5));
2193 string atomicWeight;
2194 for (
unsigned int i=0; i <
id.length(); ++i) {
2195 if (!isdigit(
id[i])) {
2199 atomicWeight.push_back(
id[i]);
2202 A = atoi(atomicWeight.c_str());
2205 if (lines.front().length() > 77) {
2207 lambda.push_back(lines.front().at(77));
2208 forbidden = atoi(lambda.c_str());
2214 int BetaRecordLeaf::getCharge()
const {
2218 void BetaRecordLeaf::incrNumSampled() {
2222 EGS_I64 BetaRecordLeaf::getNumSampled()
const {
2226 unsigned short int BetaRecordLeaf::getZ()
const {
2230 unsigned short int BetaRecordLeaf::getAtomicWeight()
const {
2234 unsigned short int BetaRecordLeaf::getForbidden()
const {
2247 BetaMinusRecord::BetaMinusRecord(vector<string> ensdf,
2252 myNormalization, myLevel) {
2255 myLevel->cumulDisintegrationIntensity(betaIntensity);
2258 void BetaMinusRecord::processEnsdf() {
2259 finalEnergy = recordToDouble(10, 19) / 1000.;
2260 betaIntensity = recordToDouble(22, 29);
2261 string betaIntensityStr = recordToString(22, 29);
2262 string betaIntensityUncStr = recordToString(30, 31);
2264 betaIntensityUnc = parseStdUncertainty(betaIntensityStr, betaIntensityUncStr);
2266 if (betaIntensityUnc == 0) {
2267 betaIntensityUnc = betaIntensity;
2270 if (getNormalizationRecord()) {
2271 double factor = getNormalizationRecord()->getBetaMultiplier() * getNormalizationRecord()->getBranchMultiplier();
2273 betaIntensity *= factor;
2274 betaIntensityUnc *= factor;
2278 double BetaMinusRecord::getFinalEnergy()
const {
2282 double BetaMinusRecord::getBetaIntensity()
const {
2283 return betaIntensity;
2286 double BetaMinusRecord::getBetaIntensityUnc()
const {
2287 return betaIntensityUnc;
2290 void BetaMinusRecord::setBetaIntensity(
double newIntensity) {
2291 betaIntensity = newIntensity;
2295 BetaPlusRecord::BetaPlusRecord(vector<string> ensdf,
2300 myNormalization, myLevel) {
2303 myLevel->cumulDisintegrationIntensity(betaIntensity);
2306 void BetaPlusRecord::processEnsdf() {
2307 finalEnergy = recordToDouble(10, 19) / 1000.;
2308 positronIntensity = recordToDouble(22, 29);
2309 string positronIntensityStr = recordToString(22, 29);
2310 string positronIntensityUncStr = recordToString(30, 31);
2311 ecIntensity = recordToDouble(32, 39);
2312 string ecIntensityStr = recordToString(32, 39);
2313 string ecIntensityUncStr = recordToString(40, 41);
2315 positronIntensityUnc = parseStdUncertainty(positronIntensityStr, positronIntensityUncStr);
2317 if (positronIntensityUnc == 0) {
2318 positronIntensityUnc = positronIntensity;
2321 ecIntensityUnc = parseStdUncertainty(ecIntensityStr, ecIntensityUncStr);
2323 if (ecIntensityUnc == 0) {
2324 ecIntensityUnc = ecIntensity;
2327 if (getNormalizationRecord()) {
2328 double factor = getNormalizationRecord()->getBetaMultiplier() * getNormalizationRecord()->getBranchMultiplier();
2330 positronIntensity *= factor;
2331 ecIntensity *= factor;
2332 positronIntensityUnc *= factor;
2333 ecIntensityUnc *= factor;
2338 betaIntensity = positronIntensity + ecIntensity;
2343 positronIntensity = positronIntensity / betaIntensity;
2347 if (finalEnergy == 0 && positronIntensity >
epsilon) {
2348 finalEnergy = getParentRecord()->getQ()
2349 - getLevelRecord()->getEnergy() - 1.022;
2351 if (finalEnergy < 0.) {
2352 egsWarning(
"BetaPlusRecord::processEnsdf: Error: Final energy of "
2353 "positron could not be calculated. Setting energy to zero!\n"
2359 if (ecIntensity > 0) {
2361 int nshell = getNormalizationRecord()->getNShell();
2363 double icK = getTag(
"CK=");
2364 double icL = getTag(
"CL=");
2365 double icM = getTag(
"CM=");
2366 double icN = getTag(
"CN=");
2367 double icO = getTag(
"CO=");
2368 double icP = getTag(
"CP=");
2369 double icQ = getTag(
"CQ=");
2372 ecShellIntensity.push_back(icK);
2377 int numShellsToInclude = min(4,nshell);
2378 for (
unsigned int i=1; i<numShellsToInclude; ++i) {
2379 ecShellIntensity.push_back(ecShellIntensity.back() + icL/(numShellsToInclude-1));
2383 if (numShellsToInclude < 4) {
2391 numShellsToInclude = min(9,nshell);
2392 for (
unsigned int i=4; i<numShellsToInclude; ++i) {
2393 ecShellIntensity.push_back(ecShellIntensity.back() + icM/(numShellsToInclude-4));
2395 if (numShellsToInclude < 9) {
2403 numShellsToInclude = min(16,nshell);
2404 for (
unsigned int i=9; i<numShellsToInclude; ++i) {
2405 ecShellIntensity.push_back(ecShellIntensity.back() + icN/(numShellsToInclude-9));
2407 if (numShellsToInclude < 16) {
2415 numShellsToInclude = min(23,nshell);
2416 for (
unsigned int i=16; i<numShellsToInclude; ++i) {
2417 ecShellIntensity.push_back(ecShellIntensity.back() + icO/(numShellsToInclude-16));
2420 if (numShellsToInclude < 23) {
2428 numShellsToInclude = min(26,nshell);
2429 for (
unsigned int i=23; i<numShellsToInclude; ++i) {
2430 ecShellIntensity.push_back(ecShellIntensity.back() + icP/(numShellsToInclude-23));
2433 if (numShellsToInclude < 26) {
2441 numShellsToInclude = 27;
2442 ecShellIntensity.push_back(ecShellIntensity.back() + icQ/(numShellsToInclude-26));
2451 void BetaPlusRecord::relax(
int shell,
2452 EGS_Float ecut, EGS_Float pcut,
2455 getNormalizationRecord()->relax(shell,ecut,pcut,rndm,edep,particles);
2458 double BetaPlusRecord::getFinalEnergy()
const {
2462 double BetaPlusRecord::getBetaIntensity()
const {
2463 return betaIntensity;
2466 double BetaPlusRecord::getPositronIntensity()
const {
2467 return positronIntensity;
2470 double BetaPlusRecord::getPositronIntensityUnc()
const {
2471 return positronIntensityUnc;
2474 double BetaPlusRecord::getECIntensityUnc()
const {
2475 return ecIntensityUnc;
2478 void BetaPlusRecord::setBetaIntensity(
double newIntensity) {
2479 betaIntensity = newIntensity;
2482 void BetaPlusRecord::setPositronIntensity(
double newIntensity) {
2483 positronIntensity = newIntensity;
2487 GammaRecord::GammaRecord(vector<string> ensdf,
2497 numGammaSampled = 0;
2500 multipleTransitionProb = 0;
2509 numGammaSampled = gamma->numGammaSampled;
2510 numICSampled = gamma->numICSampled;
2511 numIPSampled = gamma->numIPSampled;
2512 decayEnergy = gamma->decayEnergy;
2513 transitionIntensity = gamma->transitionIntensity;
2514 multipleTransitionProb = gamma->multipleTransitionProb;
2515 gammaIntensity = gamma->gammaIntensity;
2516 gammaIntensityUnc = gamma->gammaIntensityUnc;
2517 icCoeff = gamma->icCoeff;
2518 icCoeffUnc = gamma->icCoeffUnc;
2519 ipCoeff = gamma->ipCoeff;
2520 ipCoeffUnc = gamma->ipCoeffUnc;
2522 finalLevel = gamma->finalLevel;
2525 void GammaRecord::processEnsdf() {
2526 decayEnergy = recordToDouble(10, 19) / 1000.;
2527 gammaIntensity = recordToDouble(22, 29);
2528 string gammaIntensityStr = recordToString(22, 29);
2529 string gammaIntensityUncStr = recordToString(30, 31);
2534 icCoeff = recordToDouble(56, 62);
2535 string icCoeffStr = recordToString(56, 62);
2536 string icCoeffUncStr = recordToString(63, 64);
2539 if (gammaIntensity <
epsilon) {
2540 gammaIntensity = getTag(
"RI=");
2543 icCoeffUnc = parseStdUncertainty(icCoeffStr, icCoeffUncStr);
2545 if (icCoeffUnc == 0) {
2546 icCoeffUnc = icCoeff;
2551 string ipCoeffStr_tmp = getStringAfter(
"IPC=", 11);
2552 if (ipCoeffStr_tmp.length() > 0) {
2553 string ipCoeffStr = ipCoeffStr_tmp.substr(0, 9);
2554 string ipCoeffUncStr = ipCoeffStr_tmp.substr(9, 2);
2555 ipCoeff = atof(ipCoeffStr.c_str());
2556 ipCoeffUnc = atof(ipCoeffUncStr.c_str());
2558 if (ipCoeffUnc == 0) {
2559 ipCoeffUnc = ipCoeff;
2568 if (gammaIntensity <
epsilon) {
2569 double ti = getTag(
"TI ");
2571 gammaIntensity = ti / ((1+icCoeff) * (1+ipCoeff));
2575 gammaIntensityUnc = parseStdUncertainty(gammaIntensityStr, gammaIntensityUncStr);
2577 if (gammaIntensityUnc == 0) {
2578 gammaIntensityUnc = gammaIntensity;
2581 if (getNormalizationRecord()) {
2582 double factor = getNormalizationRecord()->getRelativeMultiplier() *
2583 getNormalizationRecord()->getBranchMultiplier();
2585 gammaIntensity *= factor;
2586 gammaIntensityUnc *= factor;
2590 transitionIntensity = gammaIntensity * (1+icCoeff) * (1+ipCoeff);
2594 int nshell = getNormalizationRecord()->getNShell();
2596 double icK = getTag(
"KC=");
2597 double icL = getTag(
"LC=");
2598 double icM = getTag(
"MC=");
2599 double icN = getTag(
"NC=");
2600 double icO = getTag(
"OC=");
2601 double icP = getTag(
"PC=",
"I");
2602 double icQ = getTag(
"QC=");
2605 icIntensity.push_back(icK / icCoeff);
2610 int numShellsToInclude = min(4,nshell);
2611 for (
unsigned int i=1; i<numShellsToInclude; ++i) {
2612 icIntensity.push_back(icIntensity.back() + (icL / icCoeff)/(numShellsToInclude-1));
2616 if (numShellsToInclude < 4) {
2624 numShellsToInclude = min(9,nshell);
2625 for (
unsigned int i=4; i<numShellsToInclude; ++i) {
2626 icIntensity.push_back(icIntensity.back() + (icM / icCoeff)/(numShellsToInclude-4));
2628 if (numShellsToInclude < 9) {
2636 numShellsToInclude = min(16,nshell);
2637 for (
unsigned int i=9; i<numShellsToInclude; ++i) {
2638 icIntensity.push_back(icIntensity.back() + (icN / icCoeff)/(numShellsToInclude-9));
2640 if (numShellsToInclude < 16) {
2648 numShellsToInclude = min(23,nshell);
2649 for (
unsigned int i=16; i<numShellsToInclude; ++i) {
2650 icIntensity.push_back(icIntensity.back() + (icO / icCoeff)/(numShellsToInclude-16));
2653 if (numShellsToInclude < 23) {
2661 numShellsToInclude = min(26,nshell);
2662 for (
unsigned int i=23; i<numShellsToInclude; ++i) {
2663 icIntensity.push_back(icIntensity.back() + (icP / icCoeff)/(numShellsToInclude-23));
2666 if (numShellsToInclude < 26) {
2674 numShellsToInclude = 27;
2675 icIntensity.push_back(icIntensity.back() + (icQ / icCoeff)/(numShellsToInclude-26));
2685 double GammaRecord::getBindingEnergy(
int shell)
const {
2686 return getNormalizationRecord()->getBindingEnergy(shell);
2689 void GammaRecord::relax(
int shell,
2690 EGS_Float ecut, EGS_Float pcut,
2693 getNormalizationRecord()->relax(shell,ecut,pcut,rndm,edep,particles);
2696 double GammaRecord::getDecayEnergy()
const {
2700 double GammaRecord::getMultiTransitionProb()
const {
2701 return multipleTransitionProb;
2704 void GammaRecord::setMultiTransitionProb(
double newIntensity) {
2705 multipleTransitionProb = newIntensity;
2708 double GammaRecord::getTransitionIntensity()
const {
2709 return transitionIntensity;
2712 double GammaRecord::getGammaIntensity()
const {
2713 return gammaIntensity;
2716 double GammaRecord::getGammaIntensityUnc()
const {
2717 return gammaIntensityUnc;
2720 double GammaRecord::getICIntensity()
const {
2724 double GammaRecord::getICIntensityUnc()
const {
2728 double GammaRecord::getIPIntensity()
const {
2732 double GammaRecord::getIPIntensityUnc()
const {
2736 void GammaRecord::setTransitionIntensity(
double newIntensity) {
2737 transitionIntensity = newIntensity;
2740 void GammaRecord::setGammaIntensity(
double newIntensity) {
2741 gammaIntensity = newIntensity;
2744 void GammaRecord::setICIntensity(
double newIntensity) {
2745 icCoeff = newIntensity;
2748 int GammaRecord::getCharge()
const {
2752 void GammaRecord::incrGammaSampled() {
2756 void GammaRecord::incrICSampled() {
2760 void GammaRecord::incrIPSampled() {
2764 EGS_I64 GammaRecord::getGammaSampled()
const {
2765 return numGammaSampled;
2768 EGS_I64 GammaRecord::getICSampled()
const {
2769 return numICSampled;
2772 EGS_I64 GammaRecord::getIPSampled()
const {
2773 return numIPSampled;
2780 void GammaRecord::setFinalLevel(
LevelRecord *newLevel) {
2781 finalLevel = newLevel;
2785 AlphaRecord::AlphaRecord(vector<string> ensdf,
2796 myLevel->cumulDisintegrationIntensity(alphaIntensity);
2799 void AlphaRecord::processEnsdf() {
2800 finalEnergy = recordToDouble(10, 19) / 1000.;
2801 alphaIntensity = recordToDouble(22, 29);
2803 string alphaIntensityStr = recordToString(22, 29);
2804 string alphaIntensityUncStr = recordToString(30, 31);
2806 alphaIntensityUnc = parseStdUncertainty(alphaIntensityStr, alphaIntensityUncStr);
2808 if (alphaIntensityUnc == 0) {
2809 alphaIntensityUnc = alphaIntensity;
2812 if (getNormalizationRecord()) {
2813 alphaIntensity *= getNormalizationRecord()->getBranchMultiplier();
2814 alphaIntensityUnc *= getNormalizationRecord()->getBranchMultiplier();
2818 double AlphaRecord::getFinalEnergy()
const {
2822 double AlphaRecord::getAlphaIntensity()
const {
2823 return alphaIntensity;
2826 double AlphaRecord::getAlphaIntensityUnc()
const {
2827 return alphaIntensityUnc;
2830 void AlphaRecord::setAlphaIntensity(
double newIntensity) {
2831 alphaIntensity = newIntensity;
2834 int AlphaRecord::getCharge()
const {
2838 void AlphaRecord::incrNumSampled() {
2842 EGS_I64 AlphaRecord::getNumSampled()
const {
A class for sampling random values from a given probability distribution using the alias table techni...
The ensdf library header file.
EGS_Float getBindingEnergy(int Z, int shell)
void relax(int Z, int sh, EGS_Float ecut, EGS_Float pcut, EGS_RandomGenerator *rndm, double &edep, EGS_SimpleContainer< EGS_RelaxationParticle > &particles)
Base random number generator class. All random number generators should be derived from this class...
EGS_Ensdf(const string nuclide, const string ensdf_filename="", const string relaxType="eadl", const bool allowMultiTrans=false, int verbosity=1)
Construct an ensdf object.
EGS_InfoFunction EGS_EXPORT egsInformation
Always use this function for reporting the progress of a simulation and any other type of information...
const EGS_Float epsilon
The epsilon constant for floating point comparisons.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.