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 double parseStdUncertainty(
string value,
string stdUncertainty);
169 string getStringAfter(
string searchString,
size_t len);
172 vector<string> lines;
190 double getHalfLife()
const;
212 double getRelativeMultiplier()
const;
213 double getTransitionMultiplier()
const;
214 double getBranchMultiplier()
const;
215 double getBetaMultiplier()
const;
217 double getBindingEnergy(
int shell)
const;
218 int getNShell()
const;
219 void relax(
int shell,
220 EGS_Float ecut, EGS_Float pcut,
225 double normalizeRelative;
226 double normalizeTransition;
227 double normalizeBeta;
228 double normalizeBranch;
247 void resetDisintegrationIntensity();
248 void cumulDisintegrationIntensity(
double disintIntensity);
249 double getDisintegrationIntensity()
const;
250 void setLevelCanDecay(
bool canDecay);
251 bool levelCanDecay()
const;
252 double getEnergy()
const;
253 double getHalfLife()
const;
256 double disintegrationIntensity;
278 virtual double getFinalEnergy()
const = 0;
279 virtual double getBetaIntensity()
const = 0;
280 virtual double getPositronIntensity()
const {
283 virtual double getECIntensity()
const {
286 virtual void relax(
int shell,
287 EGS_Float ecut, EGS_Float pcut,
290 virtual void setBetaIntensity(
double newIntensity) = 0;
291 int getCharge()
const;
292 void incrNumSampled();
293 EGS_I64 getNumSampled()
const;
294 unsigned short int getZ()
const;
295 unsigned short int getAtomicWeight()
const;
296 unsigned short int getForbidden()
const;
299 vector<double> ecShellIntensity;
304 double betaIntensity;
306 unsigned short int Z;
307 unsigned short int A;
308 unsigned short int forbidden;
318 double getFinalEnergy()
const;
319 double getBetaIntensity()
const;
320 double getBetaIntensityUnc()
const;
321 void setBetaIntensity(
double newIntensity);
325 double betaIntensityUnc;
334 double getFinalEnergy()
const;
335 double getBetaIntensity()
const;
336 double getPositronIntensity()
const;
337 double getPositronIntensityUnc()
const;
338 double getECIntensityUnc()
const;
339 void setBetaIntensity(
double newIntensity);
340 void setPositronIntensity(
double newIntensity);
341 void relax(
int shell,
342 EGS_Float ecut, EGS_Float pcut,
350 positronIntensityUnc;
365 double getDecayEnergy()
const;
366 double getTransitionIntensity()
const;
367 double getGammaIntensity()
const;
368 double getGammaIntensityUnc()
const;
369 double getICIntensity()
const;
370 double getICIntensityUnc()
const;
371 double getIPIntensity()
const;
372 double getIPIntensityUnc()
const;
373 void setTransitionIntensity(
double newIntensity);
374 void setGammaIntensity(
double newIntensity);
375 void setICIntensity(
double newIntensity);
376 double getMultiTransitionProb()
const;
377 void setMultiTransitionProb(
double newIntensity);
378 int getCharge()
const;
381 void incrGammaSampled();
382 void incrICSampled();
383 void incrIPSampled();
384 EGS_I64 getGammaSampled()
const;
385 EGS_I64 getICSampled()
const;
386 EGS_I64 getIPSampled()
const;
387 vector<double> icIntensity;
388 double getBindingEnergy(
int shell)
const;
389 void relax(
int shell,
390 EGS_Float ecut, EGS_Float pcut,
395 EGS_I64 numGammaSampled, numICSampled, numIPSampled;
397 double transitionIntensity,
398 multipleTransitionProb,
419 double getFinalEnergy()
const;
420 double getAlphaIntensity()
const;
421 double getAlphaIntensityUnc()
const;
422 int getCharge()
const;
423 void setAlphaIntensity(
double newIntensity);
424 void incrNumSampled();
425 EGS_I64 getNumSampled()
const;
499 EGS_Ensdf(
const string nuclide,
const string ensdf_filename=
"",
500 const string relaxType=
"eadl",
const bool allowMultiTrans=
false,
int verbosity=1);
505 vector<Record * > getRecords()
const;
506 vector<BetaRecordLeaf *> getBetaRecords()
const;
507 vector<ParentRecord * > getParentRecords()
const;
508 vector<LevelRecord * > getLevelRecords()
const;
509 vector<AlphaRecord * > getAlphaRecords()
const;
510 vector<GammaRecord * > getGammaRecords()
const;
511 vector<GammaRecord * > getMetastableGammaRecords()
const;
512 vector<GammaRecord * > getUncorrelatedGammaRecords()
const;
513 vector<double > getXRayIntensities()
const;
514 vector<double > getXRayEnergies()
const;
515 vector<double > getAugerIntensities()
const;
516 vector<double > getAugerEnergies()
const;
520 string relaxationType;
521 unsigned short int Z;
522 double decayDiscrepancy;
523 bool allowMultiTransition;
525 void normalizeIntensities();
529 unsigned short int findAtomicWeight(
string element);
530 void parseEnsdf(vector<string> ensdf);
533 void getEmissionsFromComments();
536 unsigned short int A;
538 vector<Record * > myRecords;
539 vector<CommentRecord * > myCommentRecords;
540 vector<ParentRecord * > myParentRecords;
541 vector<NormalizationRecord * > myNormalizationRecords;
542 vector<LevelRecord * > myLevelRecords;
543 vector<BetaRecordLeaf *> myBetaRecords;
544 vector<BetaMinusRecord * > myBetaMinusRecords;
545 vector<BetaPlusRecord * > myBetaPlusRecords;
546 vector<AlphaRecord * > myAlphaRecords;
547 vector<GammaRecord * > myGammaRecords;
548 vector<GammaRecord * > myMetastableGammaRecords;
549 vector<GammaRecord * > myUncorrelatedGammaRecords;
553 vector<vector<string> > recordStack;
554 vector<string> commentLines;
555 vector<double> xrayEnergies,
#define EGS_EXPORT
Export symbols from the egspp library.
EGS_AliasTable class header file.
A class for sampling random values from a given probability distribution using the alias table techni...
EGS_AtomicRelaxations class header file.
Global egspp functions header file.
Base random number generator class. All random number generators should be derived from this class...
The ensdf class for reading ensdf format data files.
Attempts to fix broken math header files.
Defines the EGS_EXPORT and EGS_LOCAL macros.