61 for (
typename vector<T *>::iterator it = branchLeaves.begin();
62 it!=branchLeaves.end(); it++) {
63 (*it)->removeBranch();
68 void addLeaf(T *leaf) {
69 branchLeaves.push_back(leaf);
72 void removeLeaf(T *leaf) {
73 branchLeaves.erase(std::remove(branchLeaves.begin(),
75 leaf), branchLeaves.end());
78 vector<T *> getLeaves()
const {
83 bool operator==(
const Branch<T> &rhs)
const {
84 for (
typename vector<T *>::const_iterator it = branchLeaves.begin();
85 it!=branchLeaves.end(); it++) {
87 bool foundLeaf =
false;
88 for (
typename vector<T *>::const_iterator irhs =
89 rhs.branchLeaves.begin();
90 irhs!=rhs.branchLeaves.end(); irhs++) {
92 if (*irhs != 0 && *it != 0) {
107 vector<T *> branchLeaves;
110 template <
class T>
class Leaf {
113 Leaf(T *existingBranch) {
114 branch = existingBranch;
116 branch->addLeaf(
this);
122 branch->removeLeaf(
this);
127 virtual T *getBranch()
const {
131 void removeBranch() {
136 bool operator== (
const T &rhs)
const {
137 if (branch==0 && rhs.branch==0) {
140 else if ((branch==0) && rhs.branch!=0) {
143 else if ((branch!=0) && rhs.branch==0) {
146 else if (branch!=0 && rhs.branch!=0) {
147 return *branch == *(rhs.branch);
159 Record(vector<string> ensdf);
161 vector<string> getRecords()
const;
164 double recordToDouble(
int startPos,
int endPos);
165 string recordToString(
int startPos,
int endPos);
166 double getTag(
string searchString,
string notAfter);
167 double parseHalfLife(
int startPos,
int endPos);
168 unsigned short parseSpin(
int startPos,
int endPos);
169 bool parseParity(
int startPos,
int endPos);
170 double parseStdUncertainty(
string value,
string stdUncertainty);
171 string getStringAfter(
string searchString,
size_t len);
174 vector<string> lines;
181 vector<string> getComments();
184 vector<string> comments;
192 double getHalfLife()
const;
214 double getRelativeMultiplier()
const;
215 double getTransitionMultiplier()
const;
216 double getBranchMultiplier()
const;
217 double getBetaMultiplier()
const;
219 double getBindingEnergy(
int shell)
const;
220 int getNShell()
const;
221 void relax(
int shell,
222 EGS_Float ecut, EGS_Float pcut,
227 double normalizeRelative;
228 double normalizeTransition;
229 double normalizeBeta;
230 double normalizeBranch;
249 void resetDisintegrationIntensity();
250 void cumulDisintegrationIntensity(
double disintIntensity);
251 double getDisintegrationIntensity()
const;
252 void setLevelCanDecay(
bool canDecay);
253 bool levelCanDecay()
const;
254 double getEnergy()
const;
255 double getHalfLife()
const;
256 unsigned short getSpin()
const;
257 bool getParity()
const;
260 double disintegrationIntensity;
284 virtual double getFinalEnergy()
const = 0;
285 virtual double getBetaIntensity()
const = 0;
286 virtual double getPositronIntensity()
const {
289 virtual double getECIntensity()
const {
292 virtual void relax(
int shell,
293 EGS_Float ecut, EGS_Float pcut,
303 virtual void setBetaIntensity(
double newIntensity) = 0;
304 int getCharge()
const;
305 void incrNumSampled();
306 EGS_I64 getNumSampled()
const;
307 unsigned short int getZ()
const;
308 unsigned short int getAtomicWeight()
const;
309 unsigned short int getForbidden()
const;
312 vector<double> ecShellIntensity;
317 double betaIntensity;
319 unsigned short int Z;
320 unsigned short int A;
321 unsigned short int forbidden;
331 double getFinalEnergy()
const;
332 double getBetaIntensity()
const;
333 double getBetaIntensityUnc()
const;
334 void setBetaIntensity(
double newIntensity);
338 double betaIntensityUnc;
347 double getFinalEnergy()
const;
348 double getBetaIntensity()
const;
349 double getPositronIntensity()
const;
350 double getPositronIntensityUnc()
const;
351 double getECIntensityUnc()
const;
352 void setBetaIntensity(
double newIntensity);
353 void setPositronIntensity(
double newIntensity);
354 void relax(
int shell,
355 EGS_Float ecut, EGS_Float pcut,
363 positronIntensityUnc;
378 double getDecayEnergy()
const;
379 double getTransitionIntensity()
const;
380 double getGammaIntensity()
const;
381 double getGammaIntensityUnc()
const;
382 double getICIntensity()
const;
383 double getICIntensityUnc()
const;
384 double getIPIntensity()
const;
385 double getIPIntensityUnc()
const;
386 void setTransitionIntensity(
double newIntensity);
387 void setGammaIntensity(
double newIntensity);
388 void setICIntensity(
double newIntensity);
389 double getMultiTransitionProb()
const;
390 void setMultiTransitionProb(
double newIntensity);
391 int getCharge()
const;
394 void incrGammaSampled();
395 void incrICSampled();
396 void incrIPSampled();
397 EGS_I64 getGammaSampled()
const;
398 EGS_I64 getICSampled()
const;
399 EGS_I64 getIPSampled()
const;
400 vector<double> icIntensity;
401 double getBindingEnergy(
int shell)
const;
402 void relax(
int shell,
403 EGS_Float ecut, EGS_Float pcut,
408 EGS_I64 numGammaSampled, numICSampled, numIPSampled;
410 double transitionIntensity,
411 multipleTransitionProb,
432 double getFinalEnergy()
const;
433 double getAlphaIntensity()
const;
434 double getAlphaIntensityUnc()
const;
435 int getCharge()
const;
436 void setAlphaIntensity(
double newIntensity);
437 void incrNumSampled();
438 EGS_I64 getNumSampled()
const;
512 EGS_Ensdf(
const string nuclide,
const string ensdf_filename=
"",
513 const string relaxType=
"eadl",
const bool allowMultiTrans=
false,
int verbosity=1);
518 vector<Record * > getRecords()
const;
519 vector<BetaRecordLeaf *> getBetaRecords()
const;
520 vector<ParentRecord * > getParentRecords()
const;
521 vector<LevelRecord * > getLevelRecords()
const;
522 vector<AlphaRecord * > getAlphaRecords()
const;
523 vector<GammaRecord * > getGammaRecords()
const;
524 vector<GammaRecord * > getMetastableGammaRecords()
const;
525 vector<GammaRecord * > getUncorrelatedGammaRecords()
const;
526 vector<double > getXRayIntensities()
const;
527 vector<double > getXRayEnergies()
const;
528 vector<double > getAugerIntensities()
const;
529 vector<double > getAugerEnergies()
const;
533 string relaxationType;
534 unsigned short int Z;
535 double decayDiscrepancy;
536 bool allowMultiTransition;
538 void normalizeIntensities();
542 unsigned short int findAtomicWeight(
string element);
543 void parseEnsdf(vector<string> ensdf);
546 void getEmissionsFromComments();
549 unsigned short int A;
551 vector<Record * > myRecords;
552 vector<CommentRecord * > myCommentRecords;
553 vector<ParentRecord * > myParentRecords;
554 vector<NormalizationRecord * > myNormalizationRecords;
555 vector<LevelRecord * > myLevelRecords;
556 vector<BetaRecordLeaf *> myBetaRecords;
557 vector<BetaMinusRecord * > myBetaMinusRecords;
558 vector<BetaPlusRecord * > myBetaPlusRecords;
559 vector<AlphaRecord * > myAlphaRecords;
560 vector<GammaRecord * > myGammaRecords;
561 vector<GammaRecord * > myMetastableGammaRecords;
562 vector<GammaRecord * > myUncorrelatedGammaRecords;
566 vector<vector<string> > recordStack;
567 vector<string> commentLines;
568 vector<double> xrayEnergies,
575 float isomerCutoff = 0.1;
A class for sampling random values from a given probability distribution using the alias table techni...
The ensdf class for reading ensdf format data files.
Base random number generator class. All random number generators should be derived from this class.
EGS_AliasTable class header file.
EGS_AtomicRelaxations class header file.
Global egspp functions header file.
Defines the EGS_EXPORT and EGS_LOCAL macros.
#define EGS_EXPORT
Export symbols from the egspp library.
Attempts to fix broken math header files.