diff --git a/CMakeLists.txt b/CMakeLists.txt index fa51196..60071c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,9 +202,11 @@ set(BxDecay0_HEADERS bxdecay0/Sb125.h bxdecay0/Sb126.h bxdecay0/Sb133.h - # bxdecay0/Sc44.h # Added from 2025-12-XX + bxdecay0/Sc44.h # Added Sc44 and Sc44m from 2025-12-16 + bxdecay0/Sc44m.h bxdecay0/Sc48.h bxdecay0/Se76low.h + bxdecay0/Se83.h # Added from 2025-12-16 bxdecay0/Sm148low.h bxdecay0/Sm150low.h bxdecay0/Sn114low.h @@ -392,9 +394,11 @@ set(BxDecay0_SOURCES bxdecay0/Sb125.cc bxdecay0/Sb126.cc bxdecay0/Sb133.cc - # bxdecay0/Sc44.cc # Added from 2025-12-XX + bxdecay0/Sc44.cc # Added Sc44 and Sc44m from 2025-12-10 + bxdecay0/Sc44m.cc bxdecay0/Sc48.cc bxdecay0/Se76low.cc + bxdecay0/Se83.cc # Added from 2025-12-16 bxdecay0/Sm148low.cc bxdecay0/Sm150low.cc bxdecay0/Sn114low.cc @@ -563,8 +567,10 @@ if(BUILD_TESTING) bxdecay0/testing/test_bb_utils.cxx bxdecay0/testing/test_bb.cxx bxdecay0/testing/test_genbbsub.cxx - # bxdecay0/testing/test_Sc44.cxx # Added from 2025-12-XX + bxdecay0/testing/test_Sc44.cxx # Added Sc44 and Sc44m from 2025-12-16 + bxdecay0/testing/test_Sc44m.cxx bxdecay0/testing/test_Ga68.cxx # Added from 2025-12-05 + bxdecay0/testing/test_Se83.cxx # Added from 2025-12-16 bxdecay0/testing/test_decay0_generator.cxx bxdecay0/testing/test_event_reader.cxx ) diff --git a/bxdecay0/Ga68.cc b/bxdecay0/Ga68.cc index 4940c30..2dd36a9 100644 --- a/bxdecay0/Ga68.cc +++ b/bxdecay0/Ga68.cc @@ -66,7 +66,7 @@ namespace bxdecay0 { // Three possible β⁺ decay modes if (pbeta <= 0.000285) { - decay0_beta(prng_, event_, 1.8991, -30, 0., 0., t); + decay0_beta(prng_, event_, 0.2432, -30, 0., 0., t); goto label_1656; } if (pbeta <= 1.190) { @@ -74,7 +74,7 @@ namespace bxdecay0 { goto label_1077; } if (pbeta <= 88.9103) { - decay0_beta(prng_, event_, 0.2432, -30, 0., 0., t); + decay0_beta(prng_, event_, 1.8991, -30, 0., 0., t); goto label_10000; } // Six electron-capture processes @@ -98,6 +98,7 @@ namespace bxdecay0 { decay0_gamma(prng_, event_, 0.01, 0., 0., t); goto label_1077; } + decay0_gamma(prng_, event_, 0.01, 0., 0., t); goto label_10000; label_2822: diff --git a/bxdecay0/Sc44.cc b/bxdecay0/Sc44.cc new file mode 100644 index 0000000..8d093c9 --- /dev/null +++ b/bxdecay0/Sc44.cc @@ -0,0 +1,119 @@ +// Copyright 1995-2016 V.I. Tretyak +// Copyright 2011-2017 F. Mauger +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// Ourselves: +#include + +// Standard library: +#include +#include +#include + +// This project: +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace bxdecay0 { + + void Sc44(i_random & prng_, event & event_, const double tcnuc_, double & tdnuc_) + { + double t; + double tdlev; + double p; + double pbeta; + double tclev; + double thlev; + double thnuc; + // Scheme of Sc44 decay (National Nuclear Data Center (NNDC), Brookhaven National Laboratory). + // levels in keV. + // Input : tcnuc_ - time of creation of nucleus (sec) + // Output: tdnuc_ - time of decay of nucleus (sec) + // // common/genevent/tevst,npfull,npgeant(100),pmoment(3,100),// ptime(100). + // VIT, 7.05.1998 + thnuc = 1.45512e+04; + tdnuc_ = tcnuc_ - thnuc / std::log(2.) * std::log(prng_()); + tclev = 0.; + pbeta = 100. * prng_(); + + // One possible β⁺ decay mode + if (pbeta <= 94.27) { + decay0_beta(prng_, event_, 1.4737, -20, 0., 0., t); + goto label_1157; + } + // Three electron-capture processes + if (pbeta <= 94.2744) { + decay0_gamma(prng_, event_, 0.04, 0., 0., t); + goto label_3302; + } + if (pbeta <= 95,293) { + decay0_gamma(prng_, event_, 0.04, 0., 0., t); + goto label_2657; + } + decay0_gamma(prng_, event_, 0.04, 0., 0., t); + goto label_1157; + + label_3302: + thlev = 35e-15; + p = 100. * prng_(); + if (p <= 72.55) { + decay0_nucltransK(prng_, event_, 2.14442, 0.00404, 0.0, 0.0, tclev, thlev, tdlev); + goto label_1157; + } + decay0_nucltransK(prng_, event_, 3.30133, 0.00404, 9.3e-6, 0.0, tclev, thlev, tdlev); + goto label_10000; + + + label_2657: + thlev = 30e-15; + p = 100. * prng_(); + if (p <= 89.0) { + decay0_nucltransK(prng_, event_, 1.4995, 0.00404, 3.1e-5, 0.0, tclev, thlev, tdlev); + goto label_1157; + } + decay0_nucltransK(prng_, event_, 2.6564, 0.00404, 1.34e-5, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_1157: + thlev = 2.95e-12; + decay0_nucltransK(prng_, event_, 1.157, 0.00404, 6.0e-5, 0.0, tclev, thlev, tdlev); + + label_10000: + return; + +} + // end of Sc44.f + +} // end of namespace bxdecay0 + +// end of Sc44.cc +// Local Variables: -- +// mode: c++ -- +// End: -- diff --git a/bxdecay0/Sc44.h b/bxdecay0/Sc44.h new file mode 100644 index 0000000..814847a --- /dev/null +++ b/bxdecay0/Sc44.h @@ -0,0 +1,17 @@ +#ifndef BXDECAY0_SC44_H +#define BXDECAY0_SC44_H + +namespace bxdecay0 { + + class i_random; + class event; + + void Sc44(i_random & prng_, event & event_, const double tcnuc_, double & tdnuc_); + +} // end of namespace bxdecay0 + +#endif // BXDECAY0_SC44_H + +// Local Variables: -- +// mode: c++ -- +// End: -- diff --git a/bxdecay0/Sc44m.cc b/bxdecay0/Sc44m.cc new file mode 100644 index 0000000..7af59ae --- /dev/null +++ b/bxdecay0/Sc44m.cc @@ -0,0 +1,102 @@ +// Copyright 1995-2016 V.I. Tretyak +// Copyright 2011-2017 F. Mauger +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// Ourselves: +#include + +// Standard library: +#include +#include +#include + +// This project: +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace bxdecay0 { + + void Sc44m(i_random & prng_, event & event_, const double tcnuc_, double & tdnuc_) + { + double t; + double tdlev; + double p; + double pbeta; + double tclev; + double thlev; + double thnuc; + // Scheme of Sc44m decay (National Nuclear Data Center (NNDC), Brookhaven National Laboratory). + // levels in keV. + // Input : tcnuc_ - time of creation of nucleus (sec) + // Output: tdnuc_ - time of decay of nucleus (sec) + // // common/genevent/tevst,npfull,npgeant(100),pmoment(3,100),// ptime(100). + // VIT, 7.05.1998 + thnuc = 2.10996e+05; + tdnuc_ = tcnuc_ - thnuc / std::log(2.) * std::log(prng_()); + tclev = 0.; + pbeta = 100. * prng_(); + + // IT to Sc44 + if (pbeta <= 98.77) { + decay0_nucltransK(prng_, event_, 0.271251, 0.005, 0.14, 0., tclev, thlev, tdlev); + return; + } + + // Electron-capture process + decay0_gamma(prng_, event_, 0.04, 0., 0., t); + goto label_3285; + + label_3285: + thlev = 13.3e-12; + decay0_nucltransK(prng_, event_, 1.0019, 0.00404, 9.3e-6, 0.0, tclev, thlev, tdlev); + goto label_10000; + + + label_2283: + thlev = 1.9e-12; + decay0_nucltransK(prng_, event_, 1.1261, 0.00404, 1.34e-5, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_1157: + thlev = 2.95e-12; + decay0_nucltransK(prng_, event_, 1.157, 0.00404, 6.0e-5, 0.0, tclev, thlev, tdlev); + + label_10000: + return; + +} + // end of Sc44m.f + +} // end of namespace bxdecay0 + +// end of Sc44m.cc +// Local Variables: -- +// mode: c++ -- +// End: -- diff --git a/bxdecay0/Sc44m.h b/bxdecay0/Sc44m.h new file mode 100644 index 0000000..bc9dba0 --- /dev/null +++ b/bxdecay0/Sc44m.h @@ -0,0 +1,17 @@ +#ifndef BXDECAY0_SC44M_H +#define BXDECAY0_SC44M_H + +namespace bxdecay0 { + + class i_random; + class event; + + void Sc44m(i_random & prng_, event & event_, const double tcnuc_, double & tdnuc_); + +} // end of namespace bxdecay0 + +#endif // BXDECAY0_SC44M_H + +// Local Variables: -- +// mode: c++ -- +// End: -- diff --git a/bxdecay0/Se83.cc b/bxdecay0/Se83.cc new file mode 100644 index 0000000..e5f02dc --- /dev/null +++ b/bxdecay0/Se83.cc @@ -0,0 +1,249 @@ +// Copyright 1995+3516 V.I. Tretyak +// Copyright 2011+3517 F. Mauger +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +// Ourselves: +#include + +// Standard library: +#include +#include +#include + +// This project: +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace bxdecay0 { + + void Se83(i_random & prng_, event & event_, const double tcnuc_, double & tdnuc_) + { + double t; + double tdlev; + double p; + double pbeta; + double tclev; + double thlev; + double thnuc; + // Scheme of Se83 decay (National Nuclear Data Center (NNDC), Brookhaven National Laboratory). + // levels in keV. + // Input : tcnuc_ - time of creation of nucleus (sec) + // Output: tdnuc_ - time of decay of nucleus (sec) + // // common/genevent/tevst,npfull,npgeant(100),pmoment(3,100),// ptime(100). + // VIT, 7.05.1998 + thnuc = 70.1; + tdnuc_ = tcnuc_ - thnuc / std::log(2.) * std::log(prng_()); + tclev = 0.; + pbeta = 100. * prng_(); + + // 11 possible β⁺ decay modes + if (pbeta <= 0.095) { + decay0_beta(prng_, event_, 0.811, +35, 0., 0., t); + goto label_3091; + } + if (pbeta <= 0.095+0.21) { + decay0_beta(prng_, event_, 1.092, +35, 0., 0., t); + goto label_2810; + } + if (pbeta <= 0.095+0.21+18.6) { + decay0_beta(prng_, event_, 1.850, +35, 0., 0., t); + goto label_2052; + } + if (pbeta <= 0.095+0.21+18.6+2.07) { + decay0_beta(prng_, event_, 1.986, +35, 0., 0., t); + goto label_1916; + } + if (pbeta <= 0.095+0.21+18.6+2.07+2.63) { + decay0_beta(prng_, event_, 2.242, +35, 0., 0., t); + goto label_1660; + } + if (pbeta <= 0.095+0.21+18.6+2.07+2.63+0.36) { + decay0_beta(prng_, event_, 2.848, +35, 0., 0., t); + goto label_1054; + } + if (pbeta <= 0.095+0.21+18.6+2.07+2.63+0.36+33.2) { + decay0_beta(prng_, event_, 2.871, +35, 0., 0., t); + goto label_1031; + } + if (pbeta <= 0.095+0.21+18.6+2.07+2.63+0.36+33.2+12.8) { + decay0_beta(prng_, event_, 2.914, +35, 0., 0., t); + goto label_988; + } + if (pbeta <= 0.095+0.21+18.6+2.07+2.63+0.36+33.2+12.8+0.14) { + decay0_beta(prng_, event_, 3.035, +35, 0., 0., t); + goto label_867; + } + if (pbeta <= 0.095+0.21+18.6+2.07+2.63+0.36+33.2+12.8+0.14+0.1) { + decay0_beta(prng_, event_, 3.103, +35, 0., 0., t); + goto label_799; + } + decay0_beta(prng_, event_, 3.902, +35, 0., 0., t); + goto label_10000; + + label_3091: + thlev = 0.0; + p = 100. * prng_(); + if (p <= 55.0) { + decay0_nucltransK(prng_, event_, 2.7347, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_357; + } + decay0_nucltransK(prng_, event_, 3.0913, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_10000; + + + label_2810: + thlev = 0.0; + p = 100. * prng_(); + if (p <= 68.8) { + decay0_nucltransK(prng_, event_, 1.779, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_1031; + } + if (p <= 62.6) { + decay0_nucltransK(prng_, event_, 2.4532, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_357; + } + decay0_nucltransK(prng_, event_, 2.8099, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_2052: + thlev = 0.0; + p = 100. * prng_(); + if (p <= 0.64) { + decay0_nucltransK(prng_, event_, 0.3915, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_1660; + } + if (p <= 7.1) { + decay0_nucltransK(prng_, event_, 0.9976, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_1054; + } + p = 100. * prng_(); + if (p <= 18.5) { + decay0_nucltransK(prng_, event_, 1.0208, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_1031; + } + if (p <= 37.3) { + decay0_nucltransK(prng_, event_, 1.1163, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_988; + } + p = 100. * prng_(); + if (p <= 41.5) { + decay0_nucltransK(prng_, event_, 1.6947, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_357; + } + decay0_nucltransK(prng_, event_, 2.0515, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_1916: + thlev = 0.0; + if (p <= 9.7) { + decay0_nucltransK(prng_, event_, 0.8845, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_1031; + } + p = 100. * prng_(); + if (p <= 42.5) { + decay0_nucltransK(prng_, event_, 1.1163, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_799; + } + decay0_nucltransK(prng_, event_, 1.5589, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_357; + + label_1660: + thlev = 0.0; + if (p <= 30.9) { + decay0_nucltransK(prng_, event_, 1.3033, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_799; + } + decay0_nucltransK(prng_, event_, 1.6601, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_1054: + thlev = 0.0; + decay0_nucltransK(prng_, event_, 1.0538, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_1031: + thlev = 0.0; + if (p <= 0.88) { + decay0_nucltransK(prng_, event_, 0.2315, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_799; + } + p = 100. * prng_(); + if (p <= 42.3) { + decay0_nucltransK(prng_, event_, 0.674, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_357; + } + decay0_nucltransK(prng_, event_, 1.0306, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_988: + thlev = 0.0; + if (p <= 1.08) { + decay0_nucltransK(prng_, event_, 0.1889, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_799; + } + p = 100. * prng_(); + if (p <= 3.85) { + decay0_nucltransK(prng_, event_, 0.6312, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_357; + } + decay0_nucltransK(prng_, event_, 0.9881, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_867: + thlev = 0.0; + decay0_nucltransK(prng_, event_, 0.5101, 0.01347, 0.00165, 0.0, tclev, thlev, tdlev); + goto label_357; + + label_799: + thlev = 0.0; + if (p <= 4.91) { + decay0_nucltransK(prng_, event_, 0.4424, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_357; + } + decay0_nucltransK(prng_, event_, 0.7991, 0.01347, 0.0, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_357: + thlev = 0.0; + decay0_nucltransK(prng_, event_, 0.3567, 0.01347, 0.00382, 0.0, tclev, thlev, tdlev); + goto label_10000; + + label_10000: + return; + +} + // end of Se83.f + +} // end of namespace bxdecay0 + +// end of Se83.cc +// Local Variables: -- +// mode: c++ -- +// End: -- diff --git a/bxdecay0/Se83.h b/bxdecay0/Se83.h new file mode 100644 index 0000000..4f3ef82 --- /dev/null +++ b/bxdecay0/Se83.h @@ -0,0 +1,17 @@ +#ifndef BXDECAY0_SE83_H +#define BXDECAY0_SE83_H + +namespace bxdecay0 { + + class i_random; + class event; + + void Se83(i_random & prng_, event & event_, const double tcnuc_, double & tdnuc_); + +} // end of namespace bxdecay0 + +#endif // BXDECAY0_SE83_H + +// Local Variables: -- +// mode: c++ -- +// End: -- diff --git a/bxdecay0/genbbsub.cc b/bxdecay0/genbbsub.cc index 24f1dab..75b1c41 100644 --- a/bxdecay0/genbbsub.cc +++ b/bxdecay0/genbbsub.cc @@ -113,9 +113,11 @@ #include #include #include -// #include // Added 2025-12-XX +#include // Added Sc44 and Sc44m on 2025-12-16 +#include #include #include +#include // Added 2025-12-16 #include #include #include @@ -2148,7 +2150,9 @@ namespace bxdecay0 { } else if (name_starts_with(chnuclide_, "Sb125")) { } else if (name_starts_with(chnuclide_, "Sb126")) { } else if (name_starts_with(chnuclide_, "Sb133")) { - // } else if (name_starts_with(chnuclide_, "Sc44")) { // Added 2025-12-1XX + } else if (name_starts_with(chnuclide_, "Sc44")) { // Added Sc44 and Sc44m on 2025-12-16 + } else if (name_starts_with(chnuclide_, "Sc44m")) { + } else if (name_starts_with(chnuclide_, "Se83")) { // Added 2025-12-16 } else if (name_starts_with(chnuclide_, "Sr90")) { } else if (name_starts_with(chnuclide_, "Ta180m")) { // 'Ta180m-B-' and 'Ta180m-EC' } else if (name_starts_with(chnuclide_, "Ta182")) { @@ -2573,9 +2577,15 @@ namespace bxdecay0 { if (name_starts_with(chnuclide_, "Sb133")) { Sb133(prng_, event_, 0., tdnuc); } - // if (name_starts_with(chnuclide_, "Sc44")) { - // Sc44(prng_, event_, 0., tdnuc); // Added 2025-12-XX - // } + if (name_starts_with(chnuclide_, "Sc44")) { + Sc44(prng_, event_, 0., tdnuc); // Added 2025-12-16 + } + if (name_starts_with(chnuclide_, "Sc44m")) { + Sc44m(prng_, event_, 0., tdnuc); // Added 2025-12-16 + } + if (name_starts_with(chnuclide_, "Se83")) { // Added 2025-12-16 + Se83(prng_, event_, 0., tdnuc); + } if (name_starts_with(chnuclide_, "Sr90")) { Sr90(prng_, event_, 0., tdnuc); } diff --git a/bxdecay0/testing/test_Sc44.cxx b/bxdecay0/testing/test_Sc44.cxx new file mode 100644 index 0000000..8507a8b --- /dev/null +++ b/bxdecay0/testing/test_Sc44.cxx @@ -0,0 +1,62 @@ +/** test_Sc44.cxx + * + * This file is part of BxDecay0. + * + * BxDecay0 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * BxDecay0 is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with BxDecay0. If not, see . + * + */ + +// Standard library: +#include +#include +#include +#include +#include +#include + +// This project: +#include +#include +#include +#include +#include + +int main() +{ + int error_code = EXIT_SUCCESS; + try { + + unsigned int seed = 314159; + std::default_random_engine generator(seed); + bxdecay0::std_random prng(generator); + + bxdecay0::event decay; + double t_creation = 0.0; + double t_decay = 0.0; + bxdecay0::Sc44(prng, decay, t_creation, t_decay); + + decay.set_time(t_decay); + decay.print(std::clog, "Sc-44 event:", "[info] "); + decay.store(std::cout); + + } catch (std::exception & error) { + std::cerr << "[error] " << error.what() << std::endl; + error_code = EXIT_FAILURE; + } catch (...) { + std::cerr << "[error] " + << "Unexpected exception!" << std::endl; + error_code = EXIT_FAILURE; + } + return error_code; +} \ No newline at end of file diff --git a/bxdecay0/testing/test_Sc44m.cxx b/bxdecay0/testing/test_Sc44m.cxx new file mode 100644 index 0000000..657b183 --- /dev/null +++ b/bxdecay0/testing/test_Sc44m.cxx @@ -0,0 +1,62 @@ +/** test_Sc44m.cxx + * + * This file is part of BxDecay0. + * + * BxDecay0 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * BxDecay0 is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with BxDecay0. If not, see . + * + */ + +// Standard library: +#include +#include +#include +#include +#include +#include + +// This project: +#include +#include +#include +#include +#include + +int main() +{ + int error_code = EXIT_SUCCESS; + try { + + unsigned int seed = 314159; + std::default_random_engine generator(seed); + bxdecay0::std_random prng(generator); + + bxdecay0::event decay; + double t_creation = 0.0; + double t_decay = 0.0; + bxdecay0::Sc44m(prng, decay, t_creation, t_decay); + + decay.set_time(t_decay); + decay.print(std::clog, "Sc-44m event:", "[info] "); + decay.store(std::cout); + + } catch (std::exception & error) { + std::cerr << "[error] " << error.what() << std::endl; + error_code = EXIT_FAILURE; + } catch (...) { + std::cerr << "[error] " + << "Unexpected exception!" << std::endl; + error_code = EXIT_FAILURE; + } + return error_code; +} \ No newline at end of file diff --git a/bxdecay0/testing/test_Se83.cxx b/bxdecay0/testing/test_Se83.cxx new file mode 100644 index 0000000..7129e6a --- /dev/null +++ b/bxdecay0/testing/test_Se83.cxx @@ -0,0 +1,62 @@ +/** test_Se83.cxx + * + * This file is part of BxDecay0. + * + * BxDecay0 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * BxDecay0 is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with BxDecay0. If not, see . + * + */ + +// Standard library: +#include +#include +#include +#include +#include +#include + +// This project: +#include +#include +#include +#include +#include + +int main() +{ + int error_code = EXIT_SUCCESS; + try { + + unsigned int seed = 314159; + std::default_random_engine generator(seed); + bxdecay0::std_random prng(generator); + + bxdecay0::event decay; + double t_creation = 0.0; + double t_decay = 0.0; + bxdecay0::Se83(prng, decay, t_creation, t_decay); + + decay.set_time(t_decay); + decay.print(std::clog, "Se-83 event:", "[info] "); + decay.store(std::cout); + + } catch (std::exception & error) { + std::cerr << "[error] " << error.what() << std::endl; + error_code = EXIT_FAILURE; + } catch (...) { + std::cerr << "[error] " + << "Unexpected exception!" << std::endl; + error_code = EXIT_FAILURE; + } + return error_code; +} \ No newline at end of file diff --git a/resources/description/background_isotopes.lis b/resources/description/background_isotopes.lis index 0f74e54..cfe701e 100644 --- a/resources/description/background_isotopes.lis +++ b/resources/description/background_isotopes.lis @@ -44,9 +44,12 @@ Ra228 Rb87 Rh106 Rn222 +Sc44 +Sc44m Sb125 Sb126 Sb133 +Se83 Sr90 Ta180m-B- Ta180m-EC