MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
ZAI.hxx
Go to the documentation of this file.
1 #ifndef _ZAI_
2 #define _ZAI_
3 
9 #include <math.h>
10 #include <vector>
11 #include <iostream>
12 #include <string>
13 using namespace std;
14 
15 #include "MureHeaders.hxx"
16 
18 
25 {
26 public:
27  ZAIReaction(){fCode=0; fWeight=0;}
28  ZAIReaction(int code, double weight){fCode=code; fWeight=weight;}
29  void SetCode(int code){fCode=code;}
30  int GetCode(){return fCode;}
31  void SetWeight(double weight){fWeight=weight;}
32  double GetWeight(){return fWeight;}
33 
40  void SetReaction(int code, double weight){fCode=code; fWeight=weight;}
41 
42 private:
43  int fCode;
44  double fWeight;
45 };
46 
47 
49 
62 class ZAI
63 {
64  public:
66 
73  ZAI(int Z, int A, int I,bool decay=true);
74  ZAI();
75  ZAI(const ZAI &zai);
76  ~ZAI();
77 
82  int Z(){return fZ;}
83  int A(){return fA;}
84  int I(){return fI;}
85  int N(){return fA-fZ;}
86  void SetZ(short Z){fZ=Z;}
87  void SetA(short A){fA=A;}
88  void SetI(short I){fI=I;}
89  void SetMass(double m){fMass=m;}
90  double GetMass();
91  void SetName(string Name){fName=Name;}
92  string GetName(){return fName;}
93  string GetFullName();
94 
95 
100  void SetHalfLifeTime(double T_12){fHalfLifeTime=T_12;}
101  double GetHalfLifeTime(){return fHalfLifeTime;}
102  void SetDecayConstant(double lambda){fHalfLifeTime=log(2.)/lambda;}
103  double GetDecayConstant(){if (fHalfLifeTime)return log(2.)/fHalfLifeTime;return 0.;}
104 
105  int GetDecayDaughterSize(){return fDecayDaughter.size();}
106  ZAI* GetDecayDaughter(int i){return fDecayDaughter[i];}
107  vector<ZAI*> &GetDecayDaughter(){return fDecayDaughter;}
108  int GetDecayParentSize(){return fDecayParent.size();}
109  vector<double> &GetDecayBranchingRatio() {return fDecayBranchingRatio;}
110  double GetDecayBranchingRatio(int i) {return fDecayBranchingRatio[i];}
111  void SetDecayBranchingRatio(int i, double BR) {fDecayBranchingRatio[i]=BR;}
112  ZAI* GetDecayParent(int i){return fDecayParent[i];}
113  vector<ZAI*> &GetDecayParent(){return fDecayParent;}
114  void AddDecayDaughter(ZAI *Daughter,double BR,int DecayMode);
115  void AddDecayParent(ZAI *Parent);
116  void CutFromMammaDecay(ZAI* mamma);
117  string GetAllDecays(){return fAllDecays;}
118  void SetAllDecays(string decays){fAllDecays=decays;}
119  vector<int> &GetDecayMode() {return fDecayMode;}
120  int GetDecayMode(int i) {return fDecayMode[i];}
121  void Stable(){fStable=true;}
122  bool IsStable(){return fStable;}
123 
124 
129  void SetReactionList(ReactionList* l);
130  ReactionList* GetReactionList(){return fAllowedReaction;}
131 
132  int GetReactionDaughterSize(){return fReactionDaughter.size();}
133  int GetReactionParentSize(){return fReactionParent.size();}
134  ZAI* GetReactionParent(int i){return fReactionParent[i];}
135  vector<ZAI*> &GetReactionParent(){return fReactionParent;}
136  ZAI* GetReactionDaughter(int i){return fReactionDaughter[i];}
137  vector<ZAI*> &GetReactionDaughter(){return fReactionDaughter;}
138  void AddReactionDaughter(ZAI *Daughter, int code, double weight);
139  void AddReactionParent(ZAI *Parent);
140  void CutFromMammaReaction(ZAI* mamma);
141  vector<ZAIReaction*> &GetZAIReaction(){return fReactionCode;}
142  int GetReactionCode(int i) {return GetZAIReaction()[i]->GetCode();}
143  double GetReactionWeight(int i) {return GetZAIReaction()[i]->GetWeight();}
144  void RemoveReactionDaugther();
145 
146 
151  void SetCanFission(bool state=true){fCanFission=state;}
152  bool CanFission(){return fCanFission;}
153 
154  void SetIsRealFissile(bool state=true){fIsRealFissile=state;}
155  bool IsRealFissile(){return fIsRealFissile;}
156  double ApproximateNubar(){return fNubar;}
157  void SetApproximateNubar(double nu){fNubar=nu;}
158  void FindApproximateNubar();
159  void FissionProduct(){fFissionProduct=true;}
160  bool IsFissionProduct(){return fFissionProduct;}
161  void SetEnergyReleasedFromFission(double Energy){fEnergyReleasedFromFission=Energy;}
162  double GetEnergyReleasedFromFission(){return fEnergyReleasedFromFission;}
163 
164 
169 
176  string Print(string tab="",bool WithDaughter=true,bool FirtsGeneration=false,double BR=0);
178 
184  string PrintDecay(string tab="",bool WithDaughter=true,bool FirtsGeneration=false,double BR=0);
186 
191  string PrintReaction(string tab="",bool WithDaughter=true,bool FirtsGeneration=false);
192  string PrintParent();
193  string PrintInfo();
194  string PrintName();
195 
196 
201  void ResetDummy();
202 
204 
210  void SetInDataBase(int state){fInbase=state-1;}
211  bool IsInDataBase();
212  XSDIRLine *GetSaveXSDIRLine(){return fSaveXSDIRLine;}
213 
215 
219  XSDIRLine* FindXSDIRLine(int &other_isomer);
221 
226 
235  bool ShowZAI(int Z,int A,int I,ZAI* &TheZai);
236  void Used(){fUsed=true;}
237  void NotUsed(){fUsed=false;}
238  bool IsUsed(){return fUsed;}
239  double BranchingRatioSum();
240  double BranchingRatio(int i){return fDecayBranchingRatio[i];}
241  void Delete(){fDelete=true;}
242  bool IsDelete(){return fDelete;}
243  void AddedToMaterial(){fExploredZAI.push_back(this);fHaveBeenHere=true;}
244  bool IsAddedToMaterial(){return fHaveBeenHere;}
245 
246 
247  void FindMass();
248 
249 
250  void SetCanEmitBeta(){fCanEmitBeta=true;}
251  bool CanEmitBeta(){return fCanEmitBeta;}
252 
253  void SetCanEmitDelayedNeutron(){fCanEmitDelayedNeutron=true;}
254  bool CanEmitDelayedNeutron(){return fCanEmitDelayedNeutron;}
255 
256  void SetHasIsomer(){fHasIsomer=true;}
257  bool HasIsomer(){return fHasIsomer;}
258  void SetAlternateZAI(ZAI* zai){fAlternateZAI=zai;}
259  ZAI* GetAlternateZAI(){return fAlternateZAI;}
260  bool operator==(ZAI zai);
261  void ForceNonEvolvingZai(){fNonEvolvingZai=true;}
262  bool IsForceNonEvolvingZai(){return fNonEvolvingZai;}
263 
264  void SetIsMotherOfCutBetaDecayer(ZAI* daughter,double BR);
265 
266 
267  protected:
269 
275  void IncrementBR(int num,double BR){fDecayBranchingRatio[num]+=BR;}
277 
284  bool PrivateShowZAI(int Z,int A,int I,ZAI* &TheZai);
285 
293  string PrivatePrintReaction(string tab="",bool WithDaughter=true,bool FirtsGeneration=false,bool firstcall=true);
294 
295 
296  string fName;
297  short fZ;
298  short fA;
299  short fI;
300  double fMass;
301  double fHalfLifeTime;
302  string fAllDecays;
304  vector<ZAI *> fDecayDaughter;
305  vector<ZAI *> fDecayParent;
306  vector<double> fDecayBranchingRatio;
307  vector<int> fDecayMode;
308  vector<ZAI *> fReactionDaughter;
309  vector<ZAI *> fReactionParent;
310 
311  vector<ZAIReaction *> fReactionCode;
312  bool fUsed;
313  bool fDelete;
314  bool fStable;
316  int fInbase;
317  bool fHasIsomer;
318  bool fCanFission;
322 
324  static vector<ZAI*> fExploredZAI;
327 
329  vector<ZAI*> fCutBetaDaughters; //<! List of the ZAI that were cut
331  vector<double> fCutBetaBR;
332 
333  public:
335  double fNubar;
336 };
337 #endif
vector< double > fDecayBranchingRatio
vector of decay Branching Ratio.
Definition: ZAI.hxx:306
vector< ZAI * > fReactionParent
vector of reaction Parent
Definition: ZAI.hxx:309
bool fUsed
whether a ZAI is really used in a Material
Definition: ZAI.hxx:312
int fCode
Reaction code (ENDF)
Definition: ZAI.hxx:43
double fMass
Mass of a ZAI.
Definition: ZAI.hxx:300
int GetDecayParentSize()
size of decay Parent vector
Definition: ZAI.hxx:108
int GetReactionParentSize()
size of Reaction Parent vector
Definition: ZAI.hxx:133
ZAIReaction()
Default Constructor.
Definition: ZAI.hxx:27
vector< double > & GetDecayBranchingRatio()
returns branching ratio vector
Definition: ZAI.hxx:109
vector< ZAI * > & GetReactionDaughter()
returns daughter vector
Definition: ZAI.hxx:137
void AddedToMaterial()
Say that a ZAI is added to a Material.
Definition: ZAI.hxx:243
void SetInDataBase(int state)
Set the fInbase attribute to state-1.
Definition: ZAI.hxx:210
ZAI * GetDecayParent(int i)
returns ith parent
Definition: ZAI.hxx:112
void SetIsRealFissile(bool state=true)
Say that ZAI is a real fissile nucleus-only long halflives and high fission xs.
Definition: ZAI.hxx:154
short fZ
number of protons
Definition: ZAI.hxx:297
string fAllDecays
All possible decays string.
Definition: ZAI.hxx:302
void Used()
Say that a ZAI is really used in a Material.
Definition: ZAI.hxx:236
bool IsDelete()
Whether or not a ZAI is deleted.
Definition: ZAI.hxx:242
void FissionProduct()
Set that a ZAI is a fission product.
Definition: ZAI.hxx:159
void SetDecayBranchingRatio(int i, double BR)
sets the ith branching ratio
Definition: ZAI.hxx:111
void SetHalfLifeTime(double T_12)
Set the Decay Half life [s].
Definition: ZAI.hxx:100
vector< ZAI * > & GetDecayDaughter()
returns daughter vector
Definition: ZAI.hxx:107
string GetName()
returns the name of a ZAI
Definition: ZAI.hxx:92
double BranchingRatio(int i)
returns the ith decay branching ratio
Definition: ZAI.hxx:240
bool fIsRealFissile
flag to show if it is a REAL fissile nucleus
Definition: ZAI.hxx:319
void SetCanEmitBeta()
Say that ZAI is Emits a beta-.
Definition: ZAI.hxx:250
bool IsForceNonEvolvingZai()
Force a ZAI to not evolve.
Definition: ZAI.hxx:262
double GetDecayConstant()
returns the Decay Half life
Definition: ZAI.hxx:103
ReactionList * GetReactionList()
Set the allowed Reactions for an ZAI.
Definition: ZAI.hxx:130
void SetWeight(double weight)
set the reaction weight
Definition: ZAI.hxx:31
Extract all parameters from an XSDIR line.
Definition: XSDIRLine.hxx:20
void SetZ(short Z)
Set the proton number.
Definition: ZAI.hxx:86
void SetMass(double m)
set the mass of a ZAI (g/mol)
Definition: ZAI.hxx:89
bool fHasIsomer
flag to show if another state(s) exists
Definition: ZAI.hxx:317
double GetHalfLifeTime()
returns the Decay Half life [s]
Definition: ZAI.hxx:101
ZAI * GetDecayDaughter(int i)
returns the ith daughter
Definition: ZAI.hxx:106
bool fStable
whether a ZAI is stable
Definition: ZAI.hxx:314
void SetHasIsomer()
Say that ZAI has another isomeric state.
Definition: ZAI.hxx:256
int A()
returns the number of nucleons
Definition: ZAI.hxx:83
double fWeight
Cross-section weight.
Definition: ZAI.hxx:44
bool IsFissionProduct()
Return whether a ZAI is a fission product.
Definition: ZAI.hxx:160
void SetAlternateZAI(ZAI *zai)
Set the Alternate ZAI for an isomer nucleus.
Definition: ZAI.hxx:258
short fA
number of nucleons (A=0 means natural isotopes)
Definition: ZAI.hxx:298
void SetCanEmitDelayedNeutron()
Say that ZAI is delayed neutron precursor.
Definition: ZAI.hxx:253
double GetEnergyReleasedFromFission()
Get Energy in eV.
Definition: ZAI.hxx:162
short fI
Isomeric state (Ground State, ith excited)
Definition: ZAI.hxx:299
vector< double > fCutBetaBR
The branching ratios of the cut beta decayers.
Definition: ZAI.hxx:331
vector< ZAI * > & GetReactionParent()
returns reaction parent vector
Definition: ZAI.hxx:135
bool CanFission()
Whether ZAI is fissionable or not.
Definition: ZAI.hxx:152
double fHalfLifeTime
Decay Half life constant.
Definition: ZAI.hxx:301
int GetDecayDaughterSize()
size of decay Daughter vector
Definition: ZAI.hxx:105
bool IsUsed()
Whether or not a ZAI is really used in a Material.
Definition: ZAI.hxx:238
void SetDecayConstant(double lambda)
Set the Decay Constant.
Definition: ZAI.hxx:102
vector< ZAI * > fDecayParent
vector of decay parent
Definition: ZAI.hxx:305
bool CanEmitBeta()
Whether ZAI is Emits a beta-.
Definition: ZAI.hxx:251
bool fIsMotherOfBetaDecayer
Is ZAI a mother of a beta decaying nucleus?
Definition: ZAI.hxx:330
double GetReactionWeight(int i)
returns the ith reaction weight
Definition: ZAI.hxx:143
bool fDelete
whether a ZAI is deleted
Definition: ZAI.hxx:313
vector< ZAIReaction * > & GetZAIReaction()
returns the &quot;reaction code &amp; weight&quot;
Definition: ZAI.hxx:141
int N()
returns the number of neutrons
Definition: ZAI.hxx:85
int GetReactionDaughterSize()
size of Reaction Daughter vector
Definition: ZAI.hxx:132
void SetA(short A)
Set the nucleon number.
Definition: ZAI.hxx:87
bool fCanEmitBeta
flag to show if it can emit a beta-
Definition: ZAI.hxx:320
void SetCode(int code)
Set the reaction code.
Definition: ZAI.hxx:29
string fName
Name of the ZAI.
Definition: ZAI.hxx:296
int Z()
returns the number of protons
Definition: ZAI.hxx:82
void SetCanFission(bool state=true)
Say that ZAI is fissionable nucleus.
Definition: ZAI.hxx:151
ZAI * GetReactionParent(int i)
returns ith reaction parent
Definition: ZAI.hxx:134
ZAI * GetReactionDaughter(int i)
returns the ith daughter
Definition: ZAI.hxx:136
bool IsAddedToMaterial()
Whether or not a ZAI is added to a Material.
Definition: ZAI.hxx:244
vector< ZAIReaction * > fReactionCode
vector of the reaction codes
Definition: ZAI.hxx:311
void IncrementBR(int num, double BR)
Increment a Branching Ratio.
Definition: ZAI.hxx:275
bool fFissionProduct
whether a ZAI is produced directly from ANY fission
Definition: ZAI.hxx:315
File including all headers.
void Stable()
Set that a ZAI is stable to decay.
Definition: ZAI.hxx:121
Reactions to take into account for evolution of a given nucleus.
Definition: ReactionList.hxx:63
void Delete()
Say that a ZAI is deleted.
Definition: ZAI.hxx:241
bool HasIsomer()
Whether or not another ZAI exists which is an isomeric state.
Definition: ZAI.hxx:257
void SetName(string Name)
Set the name of the ZAI (e.g. Pu)
Definition: ZAI.hxx:91
double GetWeight()
Definition: ZAI.hxx:32
void SetEnergyReleasedFromFission(double Energy)
Set Energy in eV.
Definition: ZAI.hxx:161
vector< ZAI * > fCutBetaDaughters
Definition: ZAI.hxx:329
vector< int > fDecayMode
vector of decay modes
Definition: ZAI.hxx:307
XSDIRLine * GetSaveXSDIRLine()
get save XSDIRLine for a ZAI
Definition: ZAI.hxx:212
string GetAllDecays()
Get all possible decay string.
Definition: ZAI.hxx:117
ZAI * GetAlternateZAI()
returns the Alternate ZAI of an isomer nucleus
Definition: ZAI.hxx:259
void SetReaction(int code, double weight)
Set a reaction code &amp; weight.
Definition: ZAI.hxx:40
ReactionList * fAllowedReaction
The allowed reaction list for this ZAI (if fEvolved)
Definition: ZAI.hxx:303
A ZAI defined a (Z,A,Isomere) for a Nucleus.
Definition: ZAI.hxx:62
double fNubar
approximate value for mean number of neutron/fission
Definition: ZAI.hxx:335
vector< ZAI * > fReactionDaughter
vector of reaction Daughter
Definition: ZAI.hxx:308
int GetReactionCode(int i)
returns the ith reaction code
Definition: ZAI.hxx:142
bool IsStable()
Return whether a ZAI is stable.
Definition: ZAI.hxx:122
int fInbase
flag to know IsInDataBase status
Definition: ZAI.hxx:316
vector< ZAI * > fDecayDaughter
vector of decay Daughter
Definition: ZAI.hxx:304
void ForceNonEvolvingZai()
Force a ZAI to not evolve.
Definition: ZAI.hxx:261
bool fCanFission
flag to show if it can fission
Definition: ZAI.hxx:318
static vector< ZAI * > fExploredZAI
Definition: ZAI.hxx:324
bool IsRealFissile()
Whether ZAI is real fissile nucleus.
Definition: ZAI.hxx:155
void SetI(short I)
Set the isomeric state (0=gs,...)
Definition: ZAI.hxx:88
int GetCode()
returns the reaction code
Definition: ZAI.hxx:30
double GetDecayBranchingRatio(int i)
returns ith branching ratio
Definition: ZAI.hxx:110
bool fNonEvolvingZai
to for a zai to not evolve but be present in MCNP composition
Definition: ZAI.hxx:328
void SetApproximateNubar(double nu)
set approximate value for mean number of neutron/fission
Definition: ZAI.hxx:157
int GetDecayMode(int i)
returns ith decay mode code
Definition: ZAI.hxx:120
ZAI * fAlternateZAI
If no XS data, gives alternate ZAI i.e G.S. ZAI if isomer.
Definition: ZAI.hxx:323
A very simple class which contains the Reaction code and its weight for possible nuclear reactions of...
Definition: ZAI.hxx:24
ZAIReaction(int code, double weight)
Normal Constructor.
Definition: ZAI.hxx:28
bool CanEmitDelayedNeutron()
Whether ZAI is delayed neutron precursor.
Definition: ZAI.hxx:254
bool fCanEmitDelayedNeutron
flag to show if it is a delayed neutron precursor
Definition: ZAI.hxx:321
double fEnergyReleasedFromFission
The energy released from the fission of this isotope (default = 200 MeV only makes sense for fissile ...
Definition: ZAI.hxx:326
void NotUsed()
Say that a ZAI is not used in a Material.
Definition: ZAI.hxx:237
void SetAllDecays(string decays)
Set all possible decay string.
Definition: ZAI.hxx:118
vector< int > & GetDecayMode()
returns the decay mode code vector
Definition: ZAI.hxx:119
XSDIRLine * fSaveXSDIRLine
the xsdir line for a given ZAI
Definition: ZAI.hxx:325
vector< ZAI * > & GetDecayParent()
returns parent vector
Definition: ZAI.hxx:113
double ApproximateNubar()
return approximate value for mean number of neutron/fission
Definition: ZAI.hxx:156
int I()
returns the Isomeric state (Ground State, ith excited)
Definition: ZAI.hxx:84
bool fHaveBeenHere
flag used in recursive method to avoid infinit loop.
Definition: ZAI.hxx:334

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014