MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Nucleus.hxx
Go to the documentation of this file.
1 #ifndef _NUCLEUS_
2 #define _NUCLEUS_
3 
9 #include <math.h>
10 #include <vector>
11 #include <string>
12 #include <sstream>
13 #include <iostream>
14 #include "MureHeaders.hxx"
15 #include <libValErr/ValErr.hxx>
16 
17 using namespace std;
18 
19 //________________________________________________________________________
20 class Cell;
21 //________________________________________________________________________
22 //
23 
24 class Nucleus;
26 
28 
47 class Nucleus : public TReference
48 {
49  public:
51 
59  Nucleus(int Z, int A, int I=0, bool Moderator=0, bool Evolution=false);
61 
70  Nucleus(int Z, int A, int I, double T, bool Moderator=0, bool Evolution=false);
72 
79  Nucleus(ZAI* zai, double T, bool Moderator=0, bool Evolution=false);
80  //Nucleus(const Nucleus &n); //!< Copy constructor
81  Nucleus(const Nucleus &n, bool clone=false);
82  ~Nucleus();
83 
88  int Z(){return fZAI->Z();}
89  int A(){return fZAI->A();}
90  int I(){return fZAI->I();}
91  ZAI* GetZAI(){return fZAI;}
92  void SetZAI(ZAI *zai);
93  double GetMass(){return fZAI->GetMass();}
94  void SetMass(double m){fZAI->SetMass(m);}
95  double GetTemperature(){return fTemperature;}
96  void SetTemperature(double T){fIdCode=""; fIdCode2=""; fTemperature=T;}
97 
98  bool GetModerator(){return fModerator;}
99  string GetModeratorLine(){return fModeratorLine;}
100  void SetModeratorName(string name){fModeratorName=name;fModerator=true;}
101  void SetModeratorLine(string line){fModeratorLine=line;}
102 
104 
120  void SetModeratorCategory(string ModeratorCatgory){fModeratorCategory=ModeratorCatgory;}
121 
123 
128 
132  string FindMCNPCode();
134 
138  void FindMCNPCode2();
139  //void AddCell(Cell *cell){fCellVector.push_back(cell);} //!< Say that this Nucleus is in cell
140  void SetXSExtension(string code);
141  void SetXSDIRLine(string Line){fBestLine=Line; fUserCode=false;}
142  string GetIdCode(){return fIdCode;}
143  string GetIdCode2();
144  void SetIdCode(string code=""){fIdCode=code;}
145  string GetBestLine(){return fBestLine;}
146  string GetBestLine2();
147  void SetBestLine(string BestLine){fBestLine = BestLine;}
148  void SetGlobalNucleiIndex(int Index) {fGlobalNucleiIndex=Index;}
149  string FindMCNPModeratorName();
150 
152 
158  double FindCode(double Temperature, string Type,bool AllWarning=false);
159 
160  void SetXSCode(vector<int> XSC){fXSCode=XSC;}
161  vector<int> GetXSCode(){return fXSCode;}
162  bool IsUserCode(){return fUserCode;}
163 
164 
169 
175  ValErr_t GetMCNPSigmaPhiFM(int BinNum,int FMBinNum);
177 
182  double GetSigmaPhi(int BinNum,int ReactionCode);
184 
190  double GetSigmaPhi2(int BinNum,int ReactionCode);
192 
197  ValErr_t GetMCNPSigmaPhi(int BinNum,int ReactionCode);
199 
205  ValErr_t GetMCNPSigmaPhi2(int BinNum,int ReactionCode);
207 
212  double GetSigmaPhi(Cell *cell,ZAI *daughter);
214 
219  ValErr_t GetMCNPSigmaPhi(Cell *cell,ZAI *daughter);
221 
226  double GetSigmaPhi(Cell *cell, int ReactionCode);
228 
234  double GetSigmaPhi2(Cell *cell, int ReactionCode);
236 
241  ValErr_t GetMCNPSigmaPhi(Cell *cell, int ReactionCode);
243 
249  ValErr_t GetMCNPSigmaPhi2(Cell *cell, int ReactionCode);
250 
252 
258  void SetMCNPSigmaPhi(int BinNum,int FMBinNum,ValErr_t r);
260 
267  void SetMCNPSigmaPhi2(int BinNum,int FMBinNum,ValErr_t r);
269 
274  void SetMCNPSigma(int BinNum,int FMBinNum,ValErr_t xs);
276 
282  void SetMCNPSigma2(int BinNum,int FMBinNum,ValErr_t xs);
284 
288  double GetSigmaFM(int BinNum,int FMBinNum);
290 
294  ValErr_t GetMCNPSigmaFM(int BinNum,int FMBinNum);
296 
300  ValErr_t GetMCNPSigma(int BinNum,int ReactionCode);
302 
307  ValErr_t GetMCNPSigma2(int BinNum,int ReactionCode);
309 
313  ValErr_t GetMCNPSigma(Cell *cell,ZAI *daughter);
315 
319  ValErr_t GetMCNPSigma(Cell *cell, int ReactionCode);
321 
326  ValErr_t GetMCNPSigma2(Cell *cell, int ReactionCode);
327  void SetTotalSigma(double xs){fTotalSigma=xs;}
328  double GetTotalSigma(){return fTotalSigma;}
329  double GetTotalSigmaPhi(Cell *cell);
330  void SetTotalSigmaPhi(int BinNum,double xs);
331  void SetFMTotalBinNum(int FMbin) {fFMTotalBinNum=FMbin;}
332  int GetFMTotalBinNum(){return fFMTotalBinNum;}
333 
334  void SetTallyNumber(int num){fTallyNum=num;}
335  int GetTallyNumber(){return fTallyNum;}
336  vector<int> GetFMBinNumber(){return fFMBinNum;}
337  vector<int> GetBinNumber(){return fBinNum;}
338  vector<int> GetCellNumber(){return fCellNum;}
339 
345  vector<int> SetFMBinNumber(int &FMBinNum);
346  void SetBinNumber(int BinNum);
347  void SetCellNumber(int CellNum);
348  int FindFMBin(int ReactionCode);
349  void FindSlope(int BinNum,int FMBinNum);
350  void FindSmooth(int BinNum,int FMBinNum);
351 
352 
357  string Print();
359  string PrintPseudoNucleus(double proportion);
360  void SetEvolution(bool Evolution){fEvolution=Evolution;}
361  bool IsEvolutive(){return fEvolution;}
362  int GetGlobalNucleiIndex() {return fGlobalNucleiIndex;}
363  void ResetFirstReaction();
364  bool IsFirstReaction(int ReactionCode);
365  void SetFirstReaction(int ReactionCode);
366 
368 
375  void Duplicate(bool flag){fDuplicate=flag;}
376  bool IsDuplicate(){return fDuplicate;}
377  void SetAlreadyWarn(bool flag=true){fAlreadyWarn=flag;}
378  bool IsAlreadyWarn(){return fAlreadyWarn;}
379 
381 
385  bool IsTemperatureEvolution(){return fTemperatureEvolution;}
386  bool IsPseudoNucleus(){return fPseudoNucleus;}
387  void SetPseudoNucleus(bool flag=true) {fPseudoNucleus=flag;}
388  void SetTemperatureEvolution(bool flag=true){fTemperatureEvolution=flag;}
389  void ClearBinVector() {fBinNum.clear();}
390  void ClearFMBinVector() {fFMBinNum.clear();}
391  void SetNuSigmaFisPhi(int BinNum,double Value);
392  vector<double> GetNuSigmaFisPhi() {return fNuSigmaFisPhi;}
393  double GetNuSigmaFisPhi(int BinNum);
394  double GetNuSigmaFisPhi(Cell *cell);
395 
396 
397 
398  private:
399  void InitSigmaPhi();
400  int FindReactionCode(ZAI *daughter);
401  int FindCellBin(Cell *cell);
402 
403  int NumberOfReaction();
404  bool IsModeratorCategoryOk(string Code);
405 
407  bool fModerator;
408  bool fEvolution;
409  bool fUserCode;
411  string fModeratorName;
412  string fModeratorLine;
414  string fIdCode;
415  string fIdCode2;
416  double fTemperature;
420  string fBestLine;
421  string fBestLine2;
422  int fTallyNum;
423  vector<int> fFMBinNum;
424  vector<int> fBinNum;
425  vector<int> fCellNum;
426 
428 
432  vector<vector<vector<ValErr_t> > > fSigmaPhi;
434 
439  vector<vector<vector<ValErr_t> > > fSigmaPhi2;
441 
445  vector<vector<ValErr_t> > fMCNPSigmaPhi;
447 
452  vector<vector<ValErr_t> > fMCNPSigmaPhi2;
454 
460  vector<vector<ValErr_t> > fMCNPSigmaPhi3;
462 
466  vector<vector<ValErr_t> > fMCNPSigma;
468 
473  vector<vector<ValErr_t> > fMCNPSigma2;
474  vector<double> fTotalSigmaPhi;
476  double fTotalSigma;
478  map<int,bool> fFirstReaction;
479  vector<double> fMCNPTime;
480  vector<vector<double> > fFitSlope;
481  vector<vector<double> > fIntersept;
482  vector<vector<double> > fFitSlope2;
483  vector<vector<double> > fIntersept2;
484  bool fDuplicate;
487  bool **fASK;
488  vector<int> fXSCode;
489  vector<double> fNuSigmaFisPhi;
490 };
491 #endif
vector< double > GetNuSigmaFisPhi()
Get Nu tot sigma phi vector.
Definition: Nucleus.hxx:392
bool IsEvolutive()
Returns the Evolution state (Evolutive or not)
Definition: Nucleus.hxx:361
void SetTemperatureEvolution(bool flag=true)
Set that this nuc is a pseudo nuc.
Definition: Nucleus.hxx:388
double GetMass()
Returns the mass of this nucleus.
Definition: Nucleus.hxx:93
A Cell is a MCNP cell.
Definition: Cell.hxx:48
A real Nucleus with a Temperature.
Definition: Nucleus.hxx:47
void SetPseudoNucleus(bool flag=true)
Definition: Nucleus.hxx:387
void SetXSDIRLine(string Line)
If SetXSExtension has been used, this method gives the right XSDIR line.
Definition: Nucleus.hxx:141
vector< double > fNuSigmaFisPhi
Nu tot sigma micro phi.
Definition: Nucleus.hxx:489
int A()
returns the number of nucleons
Definition: Nucleus.hxx:89
vector< vector< double > > fIntersept2
intersept to find the sigma*phi extrapolation
Definition: Nucleus.hxx:483
vector< double > fTotalSigmaPhi
Total sigma phi in each Tally bin.
Definition: Nucleus.hxx:474
int fFMTotalBinNum
FM Tally bin Number for total reaction rate.
Definition: Nucleus.hxx:475
vector< int > fXSCode
array of reaction codes in tally multiplier bins
Definition: Nucleus.hxx:488
ZAI * fZAI
Pointer on the ZAI.
Definition: Nucleus.hxx:406
bool fUserCode
whether or not the user has given the extension, by a SetXSExtension()
Definition: Nucleus.hxx:409
int Z()
returns the number of protons
Definition: Nucleus.hxx:88
void SetModeratorName(string name)
Set the name of the moderator MT card.
Definition: Nucleus.hxx:100
bool GetModerator()
returns wether or not the nucleus is a Moderator
Definition: Nucleus.hxx:98
void SetModeratorCategory(string ModeratorCatgory)
Set the moderator category.
Definition: Nucleus.hxx:120
Handle dynamical object creation and pointer affectation.
Definition: TReference.hxx:40
void SetMass(double m)
Set the mass of this nucleus.
Definition: Nucleus.hxx:94
string GetBestLine()
Gives the best BaseSummary line for this nucleus.
Definition: Nucleus.hxx:145
string fBestLine
Best line of the BaseSummary.dat for this Nucleus.
Definition: Nucleus.hxx:420
vector< vector< double > > fFitSlope2
slope to find the sigma*phi extrapolation
Definition: Nucleus.hxx:482
bool fDuplicate
True for duplicate nucleus in composition.
Definition: Nucleus.hxx:484
void SetModeratorLine(string line)
Set the XSDIR line of the moderator MT card.
Definition: Nucleus.hxx:101
string GetIdCode()
Returns the Extension of this nucleus.
Definition: Nucleus.hxx:142
vector< int > GetXSCode()
return the array of reaction codes in tally multiplier bins
Definition: Nucleus.hxx:161
void Duplicate(bool flag)
Say that a nucleus is duplicate in a material.
Definition: Nucleus.hxx:375
vector< vector< double > > fFitSlope
slope to find the sigma*phi extrapolation
Definition: Nucleus.hxx:480
vector< vector< ValErr_t > > fMCNPSigma
Cross-sections.
Definition: Nucleus.hxx:466
string fBestLine2
Second best line of the BaseSummary.dat for this Nucleus.
Definition: Nucleus.hxx:421
double fBaseTemperature2
Second closest Base temperature to fTemperature.
Definition: Nucleus.hxx:418
void SetXSCode(vector< int > XSC)
Set the array of reaction codes in tally multiplier bins.
Definition: Nucleus.hxx:160
vector< vector< vector< ValErr_t > > > fSigmaPhi2
Reaction rates.
Definition: Nucleus.hxx:439
string fModeratorName
MCNP moderator name (e.g. grph.01t)
Definition: Nucleus.hxx:411
bool fPseudoNucleus
whether or not nucleus is a pseudo nucleus
Definition: Nucleus.hxx:410
void SetTallyNumber(int num)
Set Tally Number for reaction rates.
Definition: Nucleus.hxx:334
vector< vector< ValErr_t > > fMCNPSigmaPhi2
MCNP Reaction rates.
Definition: Nucleus.hxx:452
void ClearFMBinVector()
erase the vector containg Tally multiplicator bins
Definition: Nucleus.hxx:390
int fGlobalNucleiIndex
Index of this nucleus in the Global nuclei vector.
Definition: Nucleus.hxx:419
vector< int > fFMBinNum
FM Tally bin Number for reaction rate.
Definition: Nucleus.hxx:423
int GetGlobalNucleiIndex()
get index of this nucleus in the Global Nuclei vector of MURE.
Definition: Nucleus.hxx:362
int GetFMTotalBinNum()
returns total sigma*phi bin in a tally
Definition: Nucleus.hxx:332
bool IsDuplicate()
whether or not a nucleus is duplicate
Definition: Nucleus.hxx:376
vector< int > GetFMBinNumber()
returns FM Tally bin Number VECTOR for reaction rates
Definition: Nucleus.hxx:336
Reference_ptr< Nucleus > Nucleus_ptr
Definition: Nucleus.hxx:24
vector< vector< ValErr_t > > fMCNPSigmaPhi
MCNP Reaction rates.
Definition: Nucleus.hxx:445
File including all headers.
double fTotalSigma
Total cross section.
Definition: Nucleus.hxx:476
double fBaseTemperature1
Closest Base temperature to fTemperature.
Definition: Nucleus.hxx:417
void SetAlreadyWarn(bool flag=true)
true when a 1st warning occur in Material::print()
Definition: Nucleus.hxx:377
string fModeratorLine
XSDIR moderator line.
Definition: Nucleus.hxx:412
void SetFMTotalBinNum(int FMbin)
set total sigma*phi bin in a tally
Definition: Nucleus.hxx:331
void SetTemperature(double T)
set the nucleus temperature (K)
Definition: Nucleus.hxx:96
vector< int > fCellNum
Cell/Surface Number (fBinNum[i]&lt;=&gt;fCellNum[i])
Definition: Nucleus.hxx:425
vector< vector< ValErr_t > > fMCNPSigma2
Cross-sections.
Definition: Nucleus.hxx:473
double GetTemperature()
returns the nucleus temperature (K)
Definition: Nucleus.hxx:95
void SetEvolution(bool Evolution)
Precises the Evolution state (Evolutive or not)
Definition: Nucleus.hxx:360
bool ** fASK
temporary flag....
Definition: Nucleus.hxx:487
int fNReaction
Number of different reactions.
Definition: Nucleus.hxx:477
A ZAI defined a (Z,A,Isomere) for a Nucleus.
Definition: ZAI.hxx:62
double GetTotalSigma()
returns total cross section
Definition: Nucleus.hxx:328
vector< vector< ValErr_t > > fMCNPSigmaPhi3
MCNP Reaction rates for PCE fit in corrector step.
Definition: Nucleus.hxx:460
int fTallyNum
Tally Number for reaction rates.
Definition: Nucleus.hxx:422
string fModeratorCategory
Moderator category for automatic moderator name.
Definition: Nucleus.hxx:413
bool IsTemperatureEvolution()
say if the nucleus temperature is going to evolved.
Definition: Nucleus.hxx:385
vector< double > fMCNPTime
vector of last MCNP run time
Definition: Nucleus.hxx:479
void SetIdCode(string code="")
set the Extension of this nucleus.
Definition: Nucleus.hxx:144
string fIdCode2
MCNP id code for the second closest cross-section (.60c)
Definition: Nucleus.hxx:415
bool fTemperatureEvolution
whether or not temperature will evolve
Definition: Nucleus.hxx:486
bool fAlreadyWarn
true when a 1st warning occur in Material::print()
Definition: Nucleus.hxx:485
bool fModerator
whether or not apply a S(alpha,Beta) thermal treatment
Definition: Nucleus.hxx:407
vector< int > GetBinNumber()
returns Tally bin Number VECTOR (Cells or Surfaces)
Definition: Nucleus.hxx:337
string GetModeratorLine()
returns wether or not the nucleus is a Moderator
Definition: Nucleus.hxx:99
bool IsUserCode()
Points out if the extension has been given by the user.
Definition: Nucleus.hxx:162
int GetTallyNumber()
returns Tally Number for reaction rates
Definition: Nucleus.hxx:335
void SetBestLine(string BestLine)
Changes the best BaseSummary line for this nucleus.
Definition: Nucleus.hxx:147
vector< vector< vector< ValErr_t > > > fSigmaPhi
Reaction rates.
Definition: Nucleus.hxx:432
ZAI * GetZAI()
returns the ZAI* of the Nucleus
Definition: Nucleus.hxx:91
vector< int > fBinNum
Tally bin Number (for reaction rate)
Definition: Nucleus.hxx:424
bool IsPseudoNucleus()
Definition: Nucleus.hxx:386
void SetGlobalNucleiIndex(int Index)
set index of this nucleus in the Global Nuclei vector of MURE.
Definition: Nucleus.hxx:148
vector< vector< double > > fIntersept
intersept to find the sigma*phi extrapolation or the Smooth value if used
Definition: Nucleus.hxx:481
map< int, bool > fFirstReaction
a map of Reaction code to bool
Definition: Nucleus.hxx:478
bool IsAlreadyWarn()
return true when a 1st warning occur in Material::print()
Definition: Nucleus.hxx:378
void SetTotalSigma(double xs)
Set total cross section.
Definition: Nucleus.hxx:327
double fTemperature
The temperature of the nucleus.
Definition: Nucleus.hxx:416
bool fEvolution
whether or not it is an evolutive nucleus
Definition: Nucleus.hxx:408
int I()
returns the Isomeric state (Ground State, ith excited)
Definition: Nucleus.hxx:90
vector< int > GetCellNumber()
Definition: Nucleus.hxx:338
string fIdCode
MCNP id code for the closest cross-section (.60c)
Definition: Nucleus.hxx:414
Base class to reference all Shape objects.
Definition: TReference.hxx:17
void ClearBinVector()
erase the vector containg Tally bins
Definition: Nucleus.hxx:389

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