Berkeley Nuclear Data Software
RIPLData.h
Go to the documentation of this file.
1 #ifndef _RIPL_DATA_
2 #define _RIPL_DATA_
3 
4 #include <vector>
5 #include <map>
6 #include <string>
7 #include <cstdint>
9 class riplLevel
10 {
11 public:
13  riplLevel() {;}
15  void prepareLevel();
17  uint16_t getDecayLevel(double a_randNum);
19  void setEnergy(double a_energy) {m_energy = a_energy;}
21  void setENSDFLevel(int a_ensdfLevel) {m_ensdfLevel = a_ensdfLevel;}
22  int getENSDFLevel() {return m_ensdfLevel;}
24  double getEnergy() {return m_energy;};
26  // void addLevelID(uint16_t a_levelIDs) {m_nextLevelID.push_back(a_levelIDs);}
27  void setLevelID(std::vector<uint16_t> a_levelIDS) {m_nextLevelID = a_levelIDS;}
28  std::vector<uint16_t> getLevelIDs() {return m_nextLevelID;}
30  // void addBR(double a_BR) {m_branchRatio.push_back(a_BR);}
31  void setBR(std::vector<double> a_BR) {m_branchRatio = a_BR;}
32  void setSpin(float a_spin) {m_spin = a_spin;}
33  float getSpin() {return m_spin;}
34  void setParity(int a_parity) {m_parity = a_parity;}
35  int getParity() {return m_parity;}
36  int getNumDecayPaths();
37 private:
38 
39  int m_ensdfLevel = 0;
40  double m_energy=0;
41  float m_spin =-1;
42  int m_parity = 0;
43  std::vector<uint16_t> m_nextLevelID;
44  std::vector<double> m_branchRatio;
45 };
46 
49 class RIPL
50 {
51 public:
53  RIPL() {;}
55  int readRIPL(int a_ZID,
56  int a_AID,
57  double BR_cutoff);
59  double getLevelEnergy(uint16_t a_level);
61  uint16_t getLevelNumber(int a_level);
62  float getLevelSpin(uint16_t a_level);
63  int getLevelParity(uint16_t a_level);
65  void setNumLevels(int a_numLevels) {m_numLevels = a_numLevels;}
67  std::vector<double> doCascade(uint16_t a_initLevel);
68 
70  std::map<uint16_t, riplLevel> getLevelMap();
71  std::vector<uint16_t> getTransitionLevelIDs(uint16_t a_initLevel);
72  int getNumLevels();
73 private:
75  std::map<uint16_t, riplLevel> m_data;
77  int m_numLevels =0;
78 };
79 
80 #endif
Definition: RIPLData.h:50
RIPL()
default constructor
Definition: RIPLData.h:53
int getNumLevels()
Definition: RIPLData.cpp:263
int readRIPL(int a_ZID, int a_AID, double BR_cutoff)
read data from file
Definition: RIPLData.cpp:42
int getLevelParity(uint16_t a_level)
Definition: RIPLData.cpp:254
double getLevelEnergy(uint16_t a_level)
returns energy of level a_level
Definition: RIPLData.cpp:246
void setNumLevels(int a_numLevels)
set number of levels read
Definition: RIPLData.h:65
std::map< uint16_t, riplLevel > getLevelMap()
returns RIPL level map
Definition: RIPLData.cpp:258
uint16_t getLevelNumber(int a_level)
return RIPL level number
Definition: RIPLData.cpp:209
std::vector< double > doCascade(uint16_t a_initLevel)
does cascade - returns gammas produced [MeV]
Definition: RIPLData.cpp:185
std::vector< uint16_t > getTransitionLevelIDs(uint16_t a_initLevel)
Definition: RIPLData.cpp:267
float getLevelSpin(uint16_t a_level)
Definition: RIPLData.cpp:250
represents decay gammas from a given level
Definition: RIPLData.h:10
int getParity()
Definition: RIPLData.h:35
riplLevel()
default constructor
Definition: RIPLData.h:13
int getENSDFLevel()
Definition: RIPLData.h:22
void setBR(std::vector< double > a_BR)
add branching ratio of decay gamma
Definition: RIPLData.h:31
void setENSDFLevel(int a_ensdfLevel)
set the RIPL level number
Definition: RIPLData.h:21
void setSpin(float a_spin)
Definition: RIPLData.h:32
float getSpin()
Definition: RIPLData.h:33
uint16_t getDecayLevel(double a_randNum)
returns level ID of next level - randomly samp'd BR's
Definition: RIPLData.cpp:11
int getNumDecayPaths()
Definition: RIPLData.cpp:21
void prepareLevel()
fix branching ratios for random sampling
Definition: RIPLData.cpp:26
void setLevelID(std::vector< uint16_t > a_levelIDS)
add level number of decay path
Definition: RIPLData.h:27
std::vector< uint16_t > getLevelIDs()
Definition: RIPLData.h:28
void setParity(int a_parity)
Definition: RIPLData.h:34
void setEnergy(double a_energy)
set the energy of the level [MeV]
Definition: RIPLData.h:19
double getEnergy()
returns energy of the level [MeV]
Definition: RIPLData.h:24