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 auto commentSet = (*comment)->getComments();
1432 for (
auto c = commentSet.begin(); c != commentSet.end(); ++c) {
1436 if (line.find(
"{U Energy (keV)} {U Intensity} {U Line}") != std::string::npos) {
1437 containsEmissions =
true;
1440 if (containsEmissions) {
1443 if (line.length() < 48 ||
1444 ((xrayContinues || augerContinues) && line.at(30) !=
'|')) {
1457 if (countNumAfterTotal > 0) {
1459 if (lineTotalType == 0) {
1460 bool containsZeroIntensity =
false;
1461 for (std::vector<double>::iterator it = xrayIntensities.end()-countNumAfterTotal; it != xrayIntensities.end(); ++it) {
1463 containsZeroIntensity =
true;
1468 if (containsZeroIntensity) {
1469 for (std::vector<double>::iterator it = xrayIntensities.end()-countNumAfterTotal; it != xrayIntensities.end(); ++it) {
1470 *it = lineTotalIntensity / countNumAfterTotal;
1476 else if (lineTotalType == -1) {
1477 bool containsZeroIntensity =
false;
1478 for (std::vector<double>::iterator it = augerIntensities.end()-countNumAfterTotal; it != augerIntensities.end(); ++it) {
1480 containsZeroIntensity =
true;
1485 if (containsZeroIntensity) {
1486 for (std::vector<double>::iterator it = augerIntensities.end()-countNumAfterTotal; it != augerIntensities.end(); ++it) {
1487 *it = lineTotalIntensity / countNumAfterTotal;
1494 countNumAfterTotal = 0;
1495 lineTotalIntensity = 0.;
1498 if ((xrayContinues || augerContinues)
1499 && multilineEnergies.size() > 0) {
1501 double energySum = 0;
1502 double intensitySum = 0;
1503 unsigned int numNonzeroE = 0;
1504 unsigned int numNonzeroI = 0;
1505 for (
unsigned int i=0; i < multilineEnergies.size(); ++i) {
1506 if (multilineEnergies[i] > 0) {
1507 energySum += multilineEnergies[i];
1511 for (
unsigned int i=0; i < multilineIntensities.size(); ++i) {
1512 if (multilineIntensities[i] >
epsilon) {
1513 intensitySum += multilineIntensities[i];
1518 if (numNonzeroE > 0) {
1519 energy = energySum / numNonzeroE;
1522 if (numNonzeroI > 0) {
1523 intensity = intensitySum / numNonzeroI;
1526 if (numNonzeroE > 0 && numNonzeroI > 0) {
1527 if (xrayContinues) {
1528 xrayEnergies.push_back(energy);
1529 xrayIntensities.push_back(intensity);
1532 augerEnergies.push_back(energy);
1533 augerIntensities.push_back(intensity);
1537 multilineEnergies.clear();
1538 multilineIntensities.clear();
1541 xrayContinues =
false;
1542 augerContinues =
false;
1546 if (line.length() > 48) {
1548 string emissionLine = egsTrimString(line.substr(47));
1551 if (emissionLine.length() < 1 || (emissionLine.at(0) !=
'X' && emissionLine.find(
"AUGER") == std::string::npos)) {
1555 string eStr = egsTrimString(line.substr(13, 15));
1559 size_t eDash = eStr.find(
'-');
1561 if (eDash!=std::string::npos) {
1562 if (eStr.length() > eDash+1) {
1563 double e1 = atof(eStr.substr(0, eDash).c_str());
1564 double e2 = atof(eStr.substr(eDash+1).c_str());
1565 energy = (e1 + e2) / 2;
1568 energy = atof(eStr.substr(0, eDash).c_str());
1572 energy = atof(eStr.c_str());
1579 string iStr = egsTrimString(line.substr(32, 9));
1580 double intensity = atof(iStr.c_str());
1586 if (gotTotal && energy >
epsilon) {
1587 countNumAfterTotal++;
1593 if (emissionLine.find(
"(total)") != std::string::npos) {
1595 lineTotalIntensity = intensity;
1596 if (emissionLine.find(
"AUGER") != std::string::npos) {
1607 if (line.at(30) ==
'|') {
1608 if (emissionLine.at(0) ==
'X') {
1609 xrayContinues =
true;
1611 else if (emissionLine.find(
"AUGER") != std::string::npos) {
1612 augerContinues =
true;
1615 multilineEnergies.push_back(energy);
1616 multilineIntensities.push_back(intensity);
1620 if (emissionLine.at(0) ==
'X') {
1622 (gotTotal && energy >
epsilon)) {
1623 xrayEnergies.push_back(energy);
1624 xrayIntensities.push_back(intensity);
1627 else if (emissionLine.find(
"AUGER") != std::string::npos) {
1629 (gotTotal && energy >
epsilon)) {
1630 augerEnergies.push_back(energy);
1631 augerIntensities.push_back(intensity);
1641 vector<double > EGS_Ensdf::getXRayIntensities()
const {
1642 return xrayIntensities;
1645 vector<double > EGS_Ensdf::getXRayEnergies()
const {
1646 return xrayEnergies;
1649 vector<double > EGS_Ensdf::getAugerIntensities()
const {
1650 return augerIntensities;
1653 vector<double > EGS_Ensdf::getAugerEnergies()
const {
1654 return augerEnergies;
1657 vector<ParentRecord * > EGS_Ensdf::getParentRecords()
const {
1658 return myParentRecords;
1661 vector<LevelRecord * > EGS_Ensdf::getLevelRecords()
const {
1662 return myLevelRecords;
1665 vector<BetaRecordLeaf * > EGS_Ensdf::getBetaRecords()
const {
1666 return myBetaRecords;
1669 vector<GammaRecord * > EGS_Ensdf::getGammaRecords()
const {
1670 return myGammaRecords;
1673 vector<GammaRecord * > EGS_Ensdf::getMetastableGammaRecords()
const {
1674 return myMetastableGammaRecords;
1677 vector<GammaRecord * > EGS_Ensdf::getUncorrelatedGammaRecords()
const {
1678 return myUncorrelatedGammaRecords;
1681 vector<AlphaRecord * > EGS_Ensdf::getAlphaRecords()
const {
1682 return myAlphaRecords;
1685 Record::Record() {};
1686 Record::Record(vector<string> ensdf) {
1687 if (!ensdf.empty()) {
1696 vector<string> Record::getRecords()
const {
1703 double Record::recordToDouble(
int startPos,
int endPos) {
1704 if (!lines.empty()) {
1705 if (lines.front().length() < startPos) {
1706 egsWarning(
"Record::recordToDouble: Warning: Record too short to "
1707 "contain desired quantity\n");
1710 string record = lines.front().substr(startPos-1,
1712 return atof(record.c_str());
1715 egsWarning(
"Record::recordToDouble: Error: Record is empty\n");
1722 string Record::recordToString(
int startPos,
int endPos) {
1723 if (!lines.empty()) {
1724 if (lines.front().length() < startPos) {
1725 egsWarning(
"Record::recordToString: Warning: Record too short to "
1726 "contain desired quantity\n");
1730 return egsTrimString(lines.front().substr(startPos-1, endPos-startPos+1));
1733 egsWarning(
"Record::recordToString: Error: Record is empty\n");
1749 double Record::getTag(
string searchString,
string notAfter=
"") {
1750 if (lines.size() > 1) {
1752 for (
int i=1; i<lines.size(); ++i) {
1754 int tagPos = lines[i].find(searchString);
1756 if (tagPos != std::string::npos) {
1759 size_t notAfterPos = std::string::npos;
1760 if (notAfter.length() > 0 && tagPos-notAfter.length() > 0) {
1761 notAfterPos = lines[i].find(notAfter, tagPos-notAfter.length());
1766 if (notAfterPos == std::string::npos || notAfterPos > tagPos) {
1767 tagPos += searchString.length();
1769 string record = lines[i].substr(tagPos, lines[i].find(
" ",tagPos)-tagPos);
1771 return atof(record.c_str());
1778 tagPos = lines[i].find(searchString, tagPos+searchString.length());
1780 if (tagPos != std::string::npos) {
1781 tagPos += searchString.length();
1783 string record = lines[i].substr(tagPos, lines[i].find(
" ",tagPos)-tagPos);
1785 return atof(record.c_str());
1797 double Record::parseStdUncertainty(
string value,
string stdUncertainty) {
1798 if (stdUncertainty.length() < 1) {
1801 if (value.length() < 1) {
1802 egsInformation(
"Record::parseStdUncertainty: Warning: No uncertainty provided! Returning 0 uncertainty for value of %f\n", value.c_str());
1806 if (stdUncertainty.length() > value.length()) {
1807 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());
1812 size_t sciNotLoc = value.find_last_of(
'E');
1813 size_t dotLoc = value.find_last_of(
'.');
1817 if (sciNotLoc != std::string::npos) {
1818 startPos = sciNotLoc-1;
1821 startPos = value.length()-1;
1824 if (stdUncertainty.length() == 2) {
1830 for (
int i = startPos; i >= 0; --i) {
1833 value[i] = stdUncertainty[j--];
1841 return atof(value.c_str());
1844 string Record::getStringAfter(
string searchString,
size_t len) {
1845 if (lines.size() > 1) {
1847 for (
int i=1; i<lines.size(); ++i) {
1849 int tagPos = lines[i].find(searchString);
1851 if (tagPos != std::string::npos) {
1853 tagPos += searchString.length();
1855 string record = lines[i].substr(tagPos, len);
1867 double Record::parseHalfLife(
int startPos,
int endPos) {
1868 if (lines.empty()) {
1869 egsWarning(
"Record::parseHalfLife: Error: Record is empty\n");
1872 if (lines.front().length() < startPos) {
1873 egsWarning(
"Record::parseHalfLife: Warning: Record too short to "
1874 "contain desired quantity\n");
1878 string halfLifeStr = egsTrimString(lines.front().substr(startPos-1,
1879 endPos-startPos+1));
1882 if (halfLifeStr.substr(0,5).compare(
"STABLE") == 0) {
1887 unsigned int numLength;
1888 for (numLength = 0; numLength < halfLifeStr.length(); numLength++) {
1889 if (!isdigit(halfLifeStr[numLength])
1890 && halfLifeStr.at(numLength) !=
'.') {
1897 if (halfLifeStr.size() < numLength+2) {
1902 double hl = atof(halfLifeStr.substr(0, numLength).c_str());
1905 if (halfLifeStr.size()>numLength+2) {
1906 string units = halfLifeStr.substr(numLength+1, 2);
1907 if (units.compare(
"Y ") == 0) {
1910 else if (units.compare(
"D ") == 0) {
1913 else if (units.compare(
"H ") == 0) {
1916 else if (units.compare(
"M ") == 0) {
1919 else if (units.compare(
"S ") == 0) {
1922 else if (units.compare(
"MS") == 0) {
1925 else if (units.compare(
"US") == 0) {
1928 else if (units.compare(
"NS") == 0) {
1931 else if (units.compare(
"PS") == 0) {
1934 else if (units.compare(
"FS") == 0) {
1937 else if (units.compare(
"AS") == 0) {
1944 else if (halfLifeStr.size()>numLength+1) {
1945 string units = halfLifeStr.substr(numLength+1, 1);
1946 if (units.compare(
"Y") == 0) {
1949 else if (units.compare(
"D") == 0) {
1952 else if (units.compare(
"H") == 0) {
1955 else if (units.compare(
"M") == 0) {
1958 else if (units.compare(
"S") == 0) {
1973 CommentRecord::CommentRecord(vector<string> ensdf):
Record(ensdf) {
1977 void CommentRecord::processEnsdf() {
1978 if (!lines.empty()) {
1984 vector<string> CommentRecord::getComments() {
1989 ParentRecord::ParentRecord(vector<string> ensdf):
Record(ensdf) {
1993 void ParentRecord::processEnsdf() {
1994 halfLife = parseHalfLife(40, 49);
2000 Q = recordToDouble(65, 74) / 1000.;
2004 egsWarning(
"ParentRecord::processEnsdf: Warning: No Q-value given, any "
2005 "positron records will give errors\n");
2010 double ParentRecord::getHalfLife()
const {
2014 double ParentRecord::getQ()
const {
2018 ParentRecord *ParentRecordLeaf::getParentRecord()
const {
2028 NormalizationRecord::NormalizationRecord(vector<string> ensdf,
2033 void NormalizationRecord::processEnsdf() {
2034 normalizeRelative = recordToDouble(10, 19);
2035 normalizeTransition = recordToDouble(22, 29);
2036 normalizeBranch = recordToDouble(32, 39);
2037 normalizeBeta = recordToDouble(42, 49);
2041 if (normalizeRelative <
epsilon) {
2042 normalizeRelative = 1;
2044 if (normalizeTransition <
epsilon) {
2045 normalizeTransition = 1;
2047 if (normalizeBranch <
epsilon) {
2048 normalizeBranch = 1;
2050 if (normalizeBeta <
epsilon) {
2055 string element = recordToString(4, 5);
2067 egsInformation(
"NormalizationRecord::processEnsdf(): Z, nshell: %d %d\n",Z,nshell);
2074 int NormalizationRecord::getNShell()
const {
2078 double NormalizationRecord::getBindingEnergy(
int shell)
const {
2082 void NormalizationRecord::relax(
int shell,
2083 EGS_Float ecut, EGS_Float pcut,
2086 relaxations->
relax(Z,shell,ecut,pcut,rndm,edep,particles);
2093 double NormalizationRecord::getRelativeMultiplier()
const {
2094 return normalizeRelative;
2100 double NormalizationRecord::getTransitionMultiplier()
const {
2101 return normalizeTransition;
2106 double NormalizationRecord::getBranchMultiplier()
const {
2107 return normalizeBranch;
2112 double NormalizationRecord::getBetaMultiplier()
const {
2113 return normalizeBeta;
2127 LevelRecord::LevelRecord() {
2130 disintegrationIntensity = 0;
2132 LevelRecord::LevelRecord(vector<string> ensdf):
2135 disintegrationIntensity = 0;
2138 void LevelRecord::processEnsdf() {
2139 energy = recordToDouble(10, 19) / 1000.;
2140 halfLife = parseHalfLife(40, 49);
2143 void LevelRecord::setLevelCanDecay(
bool canDecayTmp) {
2144 canDecay = canDecayTmp;
2147 bool LevelRecord::levelCanDecay()
const {
2151 void LevelRecord::resetDisintegrationIntensity() {
2152 disintegrationIntensity = 0;
2155 void LevelRecord::cumulDisintegrationIntensity(
double disintIntensity) {
2156 disintegrationIntensity += disintIntensity;
2159 double LevelRecord::getDisintegrationIntensity()
const {
2160 return disintegrationIntensity;
2163 double LevelRecord::getEnergy()
const {
2167 double LevelRecord::getHalfLife()
const {
2171 LevelRecord *LevelRecordLeaf::getLevelRecord()
const {
2181 BetaRecordLeaf::BetaRecordLeaf(vector<string> ensdf,
2193 string id = egsRemoveWhite(lines.front().substr(0,5));
2196 string atomicWeight;
2197 for (
unsigned int i=0; i <
id.length(); ++i) {
2198 if (!isdigit(
id[i])) {
2202 atomicWeight.push_back(
id[i]);
2205 A = atoi(atomicWeight.c_str());
2208 if (lines.front().length() > 77) {
2210 lambda.push_back(lines.front().at(77));
2211 forbidden = atoi(lambda.c_str());
2217 int BetaRecordLeaf::getCharge()
const {
2221 void BetaRecordLeaf::incrNumSampled() {
2225 EGS_I64 BetaRecordLeaf::getNumSampled()
const {
2229 unsigned short int BetaRecordLeaf::getZ()
const {
2233 unsigned short int BetaRecordLeaf::getAtomicWeight()
const {
2237 unsigned short int BetaRecordLeaf::getForbidden()
const {
2250 BetaMinusRecord::BetaMinusRecord(vector<string> ensdf,
2255 myNormalization, myLevel) {
2258 myLevel->cumulDisintegrationIntensity(betaIntensity);
2261 void BetaMinusRecord::processEnsdf() {
2262 finalEnergy = recordToDouble(10, 19) / 1000.;
2263 betaIntensity = recordToDouble(22, 29);
2264 string betaIntensityStr = recordToString(22, 29);
2265 string betaIntensityUncStr = recordToString(30, 31);
2267 betaIntensityUnc = parseStdUncertainty(betaIntensityStr, betaIntensityUncStr);
2269 if (betaIntensityUnc == 0) {
2270 betaIntensityUnc = betaIntensity;
2273 if (getNormalizationRecord()) {
2274 double factor = getNormalizationRecord()->getBetaMultiplier() * getNormalizationRecord()->getBranchMultiplier();
2276 betaIntensity *= factor;
2277 betaIntensityUnc *= factor;
2281 double BetaMinusRecord::getFinalEnergy()
const {
2285 double BetaMinusRecord::getBetaIntensity()
const {
2286 return betaIntensity;
2289 double BetaMinusRecord::getBetaIntensityUnc()
const {
2290 return betaIntensityUnc;
2293 void BetaMinusRecord::setBetaIntensity(
double newIntensity) {
2294 betaIntensity = newIntensity;
2298 BetaPlusRecord::BetaPlusRecord(vector<string> ensdf,
2303 myNormalization, myLevel) {
2306 myLevel->cumulDisintegrationIntensity(betaIntensity);
2309 void BetaPlusRecord::processEnsdf() {
2310 finalEnergy = recordToDouble(10, 19) / 1000.;
2311 positronIntensity = recordToDouble(22, 29);
2312 string positronIntensityStr = recordToString(22, 29);
2313 string positronIntensityUncStr = recordToString(30, 31);
2314 ecIntensity = recordToDouble(32, 39);
2315 string ecIntensityStr = recordToString(32, 39);
2316 string ecIntensityUncStr = recordToString(40, 41);
2318 positronIntensityUnc = parseStdUncertainty(positronIntensityStr, positronIntensityUncStr);
2320 if (positronIntensityUnc == 0) {
2321 positronIntensityUnc = positronIntensity;
2324 ecIntensityUnc = parseStdUncertainty(ecIntensityStr, ecIntensityUncStr);
2326 if (ecIntensityUnc == 0) {
2327 ecIntensityUnc = ecIntensity;
2330 if (getNormalizationRecord()) {
2331 double factor = getNormalizationRecord()->getBetaMultiplier() * getNormalizationRecord()->getBranchMultiplier();
2333 positronIntensity *= factor;
2334 ecIntensity *= factor;
2335 positronIntensityUnc *= factor;
2336 ecIntensityUnc *= factor;
2341 betaIntensity = positronIntensity + ecIntensity;
2346 positronIntensity = positronIntensity / betaIntensity;
2350 if (finalEnergy == 0 && positronIntensity >
epsilon) {
2351 finalEnergy = getParentRecord()->getQ()
2352 - getLevelRecord()->getEnergy() - 1.022;
2354 if (finalEnergy < 0.) {
2355 egsWarning(
"BetaPlusRecord::processEnsdf: Error: Final energy of "
2356 "positron could not be calculated. Setting energy to zero!\n"
2362 if (ecIntensity > 0 && getNormalizationRecord()) {
2364 int nshell = getNormalizationRecord()->getNShell();
2366 double icK = getTag(
"CK=");
2367 double icL = getTag(
"CL=");
2368 double icM = getTag(
"CM=");
2369 double icN = getTag(
"CN=");
2370 double icO = getTag(
"CO=");
2371 double icP = getTag(
"CP=");
2372 double icQ = getTag(
"CQ=");
2375 ecShellIntensity.push_back(icK);
2380 int numShellsToInclude = min(4,nshell);
2381 for (
unsigned int i=1; i<numShellsToInclude; ++i) {
2382 ecShellIntensity.push_back(ecShellIntensity.back() + icL/(numShellsToInclude-1));
2386 if (numShellsToInclude < 4) {
2394 numShellsToInclude = min(9,nshell);
2395 for (
unsigned int i=4; i<numShellsToInclude; ++i) {
2396 ecShellIntensity.push_back(ecShellIntensity.back() + icM/(numShellsToInclude-4));
2398 if (numShellsToInclude < 9) {
2406 numShellsToInclude = min(16,nshell);
2407 for (
unsigned int i=9; i<numShellsToInclude; ++i) {
2408 ecShellIntensity.push_back(ecShellIntensity.back() + icN/(numShellsToInclude-9));
2410 if (numShellsToInclude < 16) {
2418 numShellsToInclude = min(23,nshell);
2419 for (
unsigned int i=16; i<numShellsToInclude; ++i) {
2420 ecShellIntensity.push_back(ecShellIntensity.back() + icO/(numShellsToInclude-16));
2423 if (numShellsToInclude < 23) {
2431 numShellsToInclude = min(26,nshell);
2432 for (
unsigned int i=23; i<numShellsToInclude; ++i) {
2433 ecShellIntensity.push_back(ecShellIntensity.back() + icP/(numShellsToInclude-23));
2436 if (numShellsToInclude < 26) {
2444 numShellsToInclude = 27;
2445 ecShellIntensity.push_back(ecShellIntensity.back() + icQ/(numShellsToInclude-26));
2454 void BetaPlusRecord::relax(
int shell,
2455 EGS_Float ecut, EGS_Float pcut,
2458 getNormalizationRecord()->relax(shell,ecut,pcut,rndm,edep,particles);
2461 double BetaPlusRecord::getFinalEnergy()
const {
2465 double BetaPlusRecord::getBetaIntensity()
const {
2466 return betaIntensity;
2469 double BetaPlusRecord::getPositronIntensity()
const {
2470 return positronIntensity;
2473 double BetaPlusRecord::getPositronIntensityUnc()
const {
2474 return positronIntensityUnc;
2477 double BetaPlusRecord::getECIntensityUnc()
const {
2478 return ecIntensityUnc;
2481 void BetaPlusRecord::setBetaIntensity(
double newIntensity) {
2482 betaIntensity = newIntensity;
2485 void BetaPlusRecord::setPositronIntensity(
double newIntensity) {
2486 positronIntensity = newIntensity;
2490 GammaRecord::GammaRecord(vector<string> ensdf,
2500 numGammaSampled = 0;
2503 multipleTransitionProb = 0;
2512 numGammaSampled = gamma->numGammaSampled;
2513 numICSampled = gamma->numICSampled;
2514 numIPSampled = gamma->numIPSampled;
2515 decayEnergy = gamma->decayEnergy;
2516 transitionIntensity = gamma->transitionIntensity;
2517 multipleTransitionProb = gamma->multipleTransitionProb;
2518 gammaIntensity = gamma->gammaIntensity;
2519 gammaIntensityUnc = gamma->gammaIntensityUnc;
2520 icCoeff = gamma->icCoeff;
2521 icCoeffUnc = gamma->icCoeffUnc;
2522 ipCoeff = gamma->ipCoeff;
2523 ipCoeffUnc = gamma->ipCoeffUnc;
2525 finalLevel = gamma->finalLevel;
2528 void GammaRecord::processEnsdf() {
2529 decayEnergy = recordToDouble(10, 19) / 1000.;
2530 gammaIntensity = recordToDouble(22, 29);
2531 string gammaIntensityStr = recordToString(22, 29);
2532 string gammaIntensityUncStr = recordToString(30, 31);
2537 icCoeff = recordToDouble(56, 62);
2538 string icCoeffStr = recordToString(56, 62);
2539 string icCoeffUncStr = recordToString(63, 64);
2542 if (gammaIntensity <
epsilon) {
2543 gammaIntensity = getTag(
"RI=");
2546 icCoeffUnc = parseStdUncertainty(icCoeffStr, icCoeffUncStr);
2548 if (icCoeffUnc == 0) {
2549 icCoeffUnc = icCoeff;
2554 string ipCoeffStr_tmp = getStringAfter(
"IPC=", 11);
2555 if (ipCoeffStr_tmp.length() > 0) {
2556 string ipCoeffStr = ipCoeffStr_tmp.substr(0, 9);
2557 string ipCoeffUncStr = ipCoeffStr_tmp.substr(9, 2);
2558 ipCoeff = atof(ipCoeffStr.c_str());
2559 ipCoeffUnc = atof(ipCoeffUncStr.c_str());
2561 if (ipCoeffUnc == 0) {
2562 ipCoeffUnc = ipCoeff;
2571 if (gammaIntensity <
epsilon) {
2572 double ti = getTag(
"TI ");
2574 gammaIntensity = ti / ((1+icCoeff) * (1+ipCoeff));
2578 gammaIntensityUnc = parseStdUncertainty(gammaIntensityStr, gammaIntensityUncStr);
2580 if (gammaIntensityUnc == 0) {
2581 gammaIntensityUnc = gammaIntensity;
2584 if (getNormalizationRecord()) {
2585 double factor = getNormalizationRecord()->getRelativeMultiplier() *
2586 getNormalizationRecord()->getBranchMultiplier();
2588 gammaIntensity *= factor;
2589 gammaIntensityUnc *= factor;
2593 transitionIntensity = gammaIntensity * (1+icCoeff) * (1+ipCoeff);
2595 if (icCoeff > 0 && getNormalizationRecord()) {
2597 int nshell = getNormalizationRecord()->getNShell();
2599 double icK = getTag(
"KC=");
2600 double icL = getTag(
"LC=");
2601 double icM = getTag(
"MC=");
2602 double icN = getTag(
"NC=");
2603 double icO = getTag(
"OC=");
2604 double icP = getTag(
"PC=",
"I");
2605 double icQ = getTag(
"QC=");
2608 icIntensity.push_back(icK / icCoeff);
2613 int numShellsToInclude = min(4,nshell);
2614 for (
unsigned int i=1; i<numShellsToInclude; ++i) {
2615 icIntensity.push_back(icIntensity.back() + (icL / icCoeff)/(numShellsToInclude-1));
2619 if (numShellsToInclude < 4) {
2627 numShellsToInclude = min(9,nshell);
2628 for (
unsigned int i=4; i<numShellsToInclude; ++i) {
2629 icIntensity.push_back(icIntensity.back() + (icM / icCoeff)/(numShellsToInclude-4));
2631 if (numShellsToInclude < 9) {
2639 numShellsToInclude = min(16,nshell);
2640 for (
unsigned int i=9; i<numShellsToInclude; ++i) {
2641 icIntensity.push_back(icIntensity.back() + (icN / icCoeff)/(numShellsToInclude-9));
2643 if (numShellsToInclude < 16) {
2651 numShellsToInclude = min(23,nshell);
2652 for (
unsigned int i=16; i<numShellsToInclude; ++i) {
2653 icIntensity.push_back(icIntensity.back() + (icO / icCoeff)/(numShellsToInclude-16));
2656 if (numShellsToInclude < 23) {
2664 numShellsToInclude = min(26,nshell);
2665 for (
unsigned int i=23; i<numShellsToInclude; ++i) {
2666 icIntensity.push_back(icIntensity.back() + (icP / icCoeff)/(numShellsToInclude-23));
2669 if (numShellsToInclude < 26) {
2677 numShellsToInclude = 27;
2678 icIntensity.push_back(icIntensity.back() + (icQ / icCoeff)/(numShellsToInclude-26));
2688 double GammaRecord::getBindingEnergy(
int shell)
const {
2689 return getNormalizationRecord()->getBindingEnergy(shell);
2692 void GammaRecord::relax(
int shell,
2693 EGS_Float ecut, EGS_Float pcut,
2696 getNormalizationRecord()->relax(shell,ecut,pcut,rndm,edep,particles);
2699 double GammaRecord::getDecayEnergy()
const {
2703 double GammaRecord::getMultiTransitionProb()
const {
2704 return multipleTransitionProb;
2707 void GammaRecord::setMultiTransitionProb(
double newIntensity) {
2708 multipleTransitionProb = newIntensity;
2711 double GammaRecord::getTransitionIntensity()
const {
2712 return transitionIntensity;
2715 double GammaRecord::getGammaIntensity()
const {
2716 return gammaIntensity;
2719 double GammaRecord::getGammaIntensityUnc()
const {
2720 return gammaIntensityUnc;
2723 double GammaRecord::getICIntensity()
const {
2727 double GammaRecord::getICIntensityUnc()
const {
2731 double GammaRecord::getIPIntensity()
const {
2735 double GammaRecord::getIPIntensityUnc()
const {
2739 void GammaRecord::setTransitionIntensity(
double newIntensity) {
2740 transitionIntensity = newIntensity;
2743 void GammaRecord::setGammaIntensity(
double newIntensity) {
2744 gammaIntensity = newIntensity;
2747 void GammaRecord::setICIntensity(
double newIntensity) {
2748 icCoeff = newIntensity;
2751 int GammaRecord::getCharge()
const {
2755 void GammaRecord::incrGammaSampled() {
2759 void GammaRecord::incrICSampled() {
2763 void GammaRecord::incrIPSampled() {
2767 EGS_I64 GammaRecord::getGammaSampled()
const {
2768 return numGammaSampled;
2771 EGS_I64 GammaRecord::getICSampled()
const {
2772 return numICSampled;
2775 EGS_I64 GammaRecord::getIPSampled()
const {
2776 return numIPSampled;
2783 void GammaRecord::setFinalLevel(
LevelRecord *newLevel) {
2784 finalLevel = newLevel;
2788 AlphaRecord::AlphaRecord(vector<string> ensdf,
2799 myLevel->cumulDisintegrationIntensity(alphaIntensity);
2802 void AlphaRecord::processEnsdf() {
2803 finalEnergy = recordToDouble(10, 19) / 1000.;
2804 alphaIntensity = recordToDouble(22, 29);
2806 string alphaIntensityStr = recordToString(22, 29);
2807 string alphaIntensityUncStr = recordToString(30, 31);
2809 alphaIntensityUnc = parseStdUncertainty(alphaIntensityStr, alphaIntensityUncStr);
2811 if (alphaIntensityUnc == 0) {
2812 alphaIntensityUnc = alphaIntensity;
2815 if (getNormalizationRecord()) {
2816 alphaIntensity *= getNormalizationRecord()->getBranchMultiplier();
2817 alphaIntensityUnc *= getNormalizationRecord()->getBranchMultiplier();
2821 double AlphaRecord::getFinalEnergy()
const {
2825 double AlphaRecord::getAlphaIntensity()
const {
2826 return alphaIntensity;
2829 double AlphaRecord::getAlphaIntensityUnc()
const {
2830 return alphaIntensityUnc;
2833 void AlphaRecord::setAlphaIntensity(
double newIntensity) {
2834 alphaIntensity = newIntensity;
2837 int AlphaRecord::getCharge()
const {
2841 void AlphaRecord::incrNumSampled() {
2845 EGS_I64 AlphaRecord::getNumSampled()
const {
A class for sampling random values from a given probability distribution using the alias table techni...
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)
EGS_Ensdf(const string nuclide, const string ensdf_filename="", const string relaxType="eadl", const bool allowMultiTrans=false, int verbosity=1)
Construct an ensdf object.
Base random number generator class. All random number generators should be derived from this class.
The ensdf library header file.
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.