1 #ifndef __RAT_BetaFunction__
2 #define __RAT_BetaFunction__
25 enum EBetaFunctionConsts { PartMax = 1000, BrMax = 1000 };
30 BetaFunction(
const std::string Name,
double Z,
double A = 0.,
int reaction = DecayBeta,
double tau = 0.);
36 void SetTarget(
const std::string Name,
double Z,
double A = 0.,
int reaction = DecayBeta,
double tau = 0.);
37 void SetBranches(
double Branch,
int Spin,
double EndPoint);
38 void RemoveBranch(
int iBranch);
39 void SetGammas(
int iBranch,
int pid,
double energy);
40 void SetGammas(
double energy);
41 void SetParticleID(
int iBranch,
int n,
int pid);
42 void SetTargetMass(
double A);
43 void SetNorm(
int iBranch);
45 int GetNParticles(
int iBranch);
46 int GetParticleID(
int iBranch,
int n);
47 int GetSpin(
int iBranch);
49 double GetBranch(
int iBranch);
50 double GetEndPoint(
int iBranch);
51 double GetEnergy(
int iBranch,
int n);
52 double GetValue(
double energy,
int iBranch);
57 int GetEventID(
int n);
58 double GetEventEnergy(
int n);
59 double GetEventTotE();
61 double GetRandomNumber(
double rmin = 0.,
double rmax = 1.);
63 bool ReadInputFile(
const std::string dName);
64 bool ReadInputFile(
const std::string dName,
int iType);
65 bool ReadInputFile(
const std::string dName,
int iZ,
int iA,
int iType = DecayBeta);
67 void ErrorLog(
int iFlag = -1);
69 inline void SetFileName(
const std::string Name) { inputFileName = Name; }
70 inline void SetVerbose(
bool iSet =
true) { isVerbose = iSet; }
71 inline void SetProbabilityCulmulative(
bool iSel =
true) { isCulmulative = iSel; }
73 inline void SetName(
const std::string Name) { TargetName = Name; }
74 inline void SetCharge(
double Z) { TargetCharge = Z; }
75 inline void SetDecayType(
int iType) { TargetDecayType = iType; }
76 inline void SetNeutrinoMass(
double Mass) { MassNu = Mass; }
77 inline void SetLifeTime(
double Tau) { TargetDecayTime = Tau; }
79 inline int GetDecayType() {
return TargetDecayType; }
80 inline int GetNBranches() {
return NumberOfBranches; }
81 inline int GetNGenerated() {
return nGenerated; }
83 inline const std::string GetName() {
return TargetName; }
84 inline const std::string GetFileName() {
return inputFileName; }
86 inline double GetLifeTime() {
return TargetDecayTime; }
87 inline double GetTargetMass() {
return TargetMass; }
88 inline double GetCharge() {
return TargetCharge; }
89 inline double GetNeutrinoMass() {
return MassNu; }
90 inline double GetEventTime() {
return nTime; }
92 inline double GetNorm(
int iBranch) {
93 std::map<size_t, double>::iterator i = DecayNorm.find(iBranch);
94 if (i == DecayNorm.end()) {
95 DecayNorm[iBranch] = 1.;
104 static void ThrowParsingException(std::string filename, std::string decayName);
109 std::string TargetName;
110 std::string inputFileName;
112 int NumberOfBranches;
113 std::map<size_t, int> ParticleSpin;
114 std::map<size_t, double> ParticleEndPoint;
115 std::map<size_t, double> ParticleBranch;
117 std::map<size_t, double> DecayNorm;
118 std::map<size_t, int> NumberOfParticles;
119 std::map<size_t, std::map<size_t, int>> ParticleID;
120 std::map<size_t, std::map<size_t, double>> ParticleEnergy;
125 double TargetDecayTime;
129 std::map<size_t, int> IDn;
130 std::map<size_t, double> En;
Definition: BetaFunction.hh:24
Definition: CCCrossSecMessenger.hh:29