MURE
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
MCNP::Tally Class Reference

Define a MCNP Tally. More...

#include <MCNPTally.hxx>

Inheritance diagram for MCNP::Tally:
MureTally

Public Member Functions

 Tally (int type=kCellFlux, const char *particle="N")
 
 Tally (int type, int particle)
 
 Tally (const Tally &t)
 Copy constructor.
 
TallyClone () override
 The only good way to call copy constructor.
 
 ~Tally () override=default
 Destructor.
 
void AddFluenceToDoseConversion (bool ELinear=false, bool CFLinear=false)
 
string Print () override
 Print the Tally in MCNP.
 
string PrintMultiplicator () override
 Print the Tally Multiplicator in MCNP.
 
void SetTallySpecialTreatment (string Treatment)
 
vector< double > GetBinVolume (int i) override
 returns the ith bin volume of Tally bin
 
double GetBinSurface (int i)
 returns the ith bin surface of Tally bin
 
void SetBinSurface (int i, double S)
 set the ith bin surface of Tally bin
 
void SetBinVolume (int i, double V, int k=0) override
 set the ith bin volume of (the kth partial bin in a LatticeBin) Tally bin
 
string GetParticle ()
 
void SetParticleN ()
 
void SetParticleP ()
 
void SetParticleNP ()
 
void SetParticleNE ()
 
void SetParticleNPE ()
 
void SetParentheses (bool flag=true)
 
vector< double > GetEnergyBinningVector ()
 
- Public Member Functions inherited from MureTally
 MureTally ()
 
 MureTally (const MureTally &t)
 Copy constructor.
 
virtual MureTallyClone ()=0
 The only good way to call copy constructor.
 
virtual ~MureTally ()
 Destructor.
 
int GetNumber ()
 
void SetNumber (int num)
 
bool NeedVolume ()
 Whether or not a stochastic volume/surface calculation is needed.
 
virtual vector< double > GetBinVolume (int i)=0
 returns the ith bin volume of Tally bin
 
virtual void SetBinVolume (int i, double V, int k=0)=0
 set the ith bin volume of (the kth partial bin in a LatticeBin) Tally bin
 
virtual string Print ()=0
 
virtual string PrintMultiplicator ()=0
 
void SetComment (string str)
 
void AddEnergy (int NE, double *E)
 
void AddEnergy (vector< double > E)
 
void AddEnergy (int NE, double Emin, double Emax, bool Linear=false)
 
void AddEnergy (double Emin, double Emax, int N_by_Decade=10)
 
string PrintDebugET ()
 
void AddMultiGroupEnergy (double Emin, double Emax, double decad_mult=1)
 
void AddTime (int NT, double *T)
 
void AddTime (int NT, double Tmin, double Tmax, bool Linear=false)
 
void AddTime (double Tmin, double Tmax, int N_by_Decade=10)
 
void Add (Cell *C, bool SetCellTally=true)
 Add a cell bin.
 
void Add (PinCell *C, int i, bool SetCellTally=true)
 Add a cell bin using a given layer of PinCell.
 
void Add (Shape_ptr S)
 add a surface bin
 
void Add (int universe)
 add a univers bin
 
void Add (MureTallyBin *theTallyBin)
 add a bin from an existing tally bin
 
void Add (TallyMultiplicator *Multiplicator)
 
void AddMultiplicator (Material *M, int reaction, double constant=1)
 add a Tally Multiplicator
 
void AddMultiplicator (Material *M, Reaction *R, double constant=1)
 add a Tally Multiplicator
 
void AddMultiplicator (int M, int R, double constant)
 add a Tally Multiplicator
 
vector< TallyMultiplicator * > & GetMultiplicator ()
 
MureTallyBinGetBin (int i)
 
vector< MureTallyBin * > & GetBin ()
 
int IsInTallyBin (Cell *C)
 whether or not the cell/suface "num" is in the bin
 
int IsInTallyBin (int num)
 return the Bin number containing the Cell/Surface "num"
 
int IsInTallyBin (Shape_ptr S)
 whether or not the cell/suface "num" is in the bin
 
void SetPrintable (bool flag=true)
 
bool IsPrintable ()
 
int GetType ()
 
void SetType (int type)
 
void SkipVolumeCalculation ()
 
bool IsVolumeCalculationSkept ()
 
void SetPinCellTally (bool flag)
 
bool IsPinCellTally ()
 

Protected Member Functions

TimeEnergyGridGetNewTimeEnergyGrid () override
 return a Time &Energy grid
 
- Protected Member Functions inherited from MureTally
bool IsMaterialUsed (int num)
 
virtual MureTimeEnergyGridGetNewTimeEnergyGrid ()=0
 A time &energy grid.
 

Private Attributes

string fParticle
 Particle Type (N, P, ..)
 
bool fParentheses
 Enclose bins in parentheses.
 
bool fStar
 true if fType < 0 use if you want to print a * before f (for instance *f8:P change the unit of the tally from pulse to MeV see mcnp manuel I (added by Leniau B)
 
vector< double > fEnergy
 Energy bin vector.
 
vector< double > fConversionFactor
 fluence-to-dose conversion factor (FTD)
 
bool fELinearFTD
 whether linear or log interpolation is done on fEnergy for FTD
 
bool fCFLinearFTD
 whether linear or log interpolation is done on FTD
 
string fTallySpecialTreatment
 

Additional Inherited Members

- Public Types inherited from MureTally
typedef MureTimeEnergyGrid::BinRange ETBinRange
 
- Protected Attributes inherited from MureTally
int fType
 Tally type.
 
int fNumber
 Tally number.
 
vector< TallyMultiplicator * > fMultiplicator
 array of Multiplicator bin
 
MureTimeEnergyGridfTimeEnergyGrid
 store time &/or energy grid
 
vector< MureTallyBin * > fBin
 array of Cell/Surface bin
 
bool fIsPrintable
 True for not printable tallies.
 
string fComment
 Tally coment (Added by T. Courau)
 
bool fSkipVolumeCalc
 flag to know whether or not try to calculate Volume/Surface
 
bool fIsPinCellTally
 flag to know whether the tally is from PinCell
 

Detailed Description

Define a MCNP Tally.

Tallies are needed to stored informations in MCNP.

Default is Cell Flux Tally for neutron (F4:N).

Author
PTO
Version
1.0

Constructor & Destructor Documentation

◆ Tally() [1/3]

MCNP::Tally::Tally ( int  type = kCellFlux,
const char *  particle = "N" 
)

Constructor of a Tally.

Parameters
type: type of the Tally: if type < 0, the units are *F units (have a look in MCNP Manual) kSurfaceCurrent : for current through a surface (F1 type) kSurfaceFlux : for flux through a surface (F2 type) kCellFlux : for flux in a Cell (F4 type). This is the Default kEnergyDeposition : for energy deposition in a Cell (F6 type). kFissionEnergyDeposition : for fission energy deposition in a Cell (F7 type).
particle: 'N' (Default) for neutron, 'E' for electron, and 'P' for photon

◆ Tally() [2/3]

MCNP::Tally::Tally ( int  type,
int  particle 
)

Constructor of a Tally.

Parameters
type: type of the Tally: if type < 0, the units are *F units (have a look in MCNP Manual) kSurfaceCurrent : for current through a surface (F1 type) kSurfaceFlux : for flux through a surface (F2 type) kCellFlux : for flux in a Cell (F4 type). This is the Default kEnergyDeposition : for energy deposition in a Cell (F6 type). kFissionEnergyDeposition : for fission energy deposition in a Cell (F7 type).
particle: 1 (Default) for neutron, 3 for electron, and 2 for photon

◆ Tally() [3/3]

MCNP::Tally::Tally ( const Tally t)

Copy constructor.

◆ ~Tally()

MCNP::Tally::~Tally ( )
overridedefault

Destructor.

Member Function Documentation

◆ AddFluenceToDoseConversion()

void MCNP::Tally::AddFluenceToDoseConversion ( bool  ELinear = false,
bool  CFLinear = false 
)

Convert flux to dose rate.

Conversion factors are read from SMURE/data/XXXFluenceToDose.dat where XXXX stand for Gamma or Neutron. These factors are taken from ICRP 116 (Antero-posterior irradiation). The units for these factors are pSv.cm2.

The MCNP result X of the tally is thus in pSv/source particle. To obtain the effective dose, you have to multiply this value by the source intensity I (in particle/s), e.g.:

  • $ D=X\times I \ pSv/s $
  • $ D=X\times I\times 10^{-9}\times 3600\  mSv/h $
  • $ D=X\times I\times 10^{-9}\times 3600\times 0.01\  mrem/h $
Parameters
ELinear: true if the interpolation in Energy is Linear.Default : false (Log interpolation) .
CFLinear: true if the interpolation in conversion factor is Linear.Default: false (Log interpolation)

◆ Clone()

Tally * MCNP::Tally::Clone ( )
inlineoverridevirtual

The only good way to call copy constructor.

Implements MureTally.

◆ GetBinSurface()

double MCNP::Tally::GetBinSurface ( int  i)

returns the ith bin surface of Tally bin

◆ GetBinVolume()

vector< double > MCNP::Tally::GetBinVolume ( int  i)
overridevirtual

returns the ith bin volume of Tally bin

Implements MureTally.

◆ GetEnergyBinningVector()

vector< double > MCNP::Tally::GetEnergyBinningVector ( )
inline

< return the vector of energy bins

◆ GetNewTimeEnergyGrid()

TimeEnergyGrid * MCNP::Tally::GetNewTimeEnergyGrid ( )
overrideprotectedvirtual

return a Time &Energy grid

Implements MureTally.

◆ GetParticle()

string MCNP::Tally::GetParticle ( )
inline

< return particle type (neutron, ...)

◆ Print()

string MCNP::Tally::Print ( )
overridevirtual

Print the Tally in MCNP.

Implements MureTally.

◆ PrintMultiplicator()

string MCNP::Tally::PrintMultiplicator ( )
overridevirtual

Print the Tally Multiplicator in MCNP.

Implements MureTally.

◆ SetBinSurface()

void MCNP::Tally::SetBinSurface ( int  i,
double  S 
)

set the ith bin surface of Tally bin

◆ SetBinVolume()

void MCNP::Tally::SetBinVolume ( int  i,
double  V,
int  k = 0 
)
overridevirtual

set the ith bin volume of (the kth partial bin in a LatticeBin) Tally bin

Implements MureTally.

◆ SetParentheses()

void MCNP::Tally::SetParentheses ( bool  flag = true)
inline

< Put parentheses arround cell/surf bin to obtain 1 result (like GroupBin)

◆ SetParticleN()

void MCNP::Tally::SetParticleN ( )
inline

< Set the particle to Neutron

◆ SetParticleNE()

void MCNP::Tally::SetParticleNE ( )
inline

< Set the particle to Neutron and Electron

◆ SetParticleNP()

void MCNP::Tally::SetParticleNP ( )
inline

< Set the particle to Neutron and Photon

◆ SetParticleNPE()

void MCNP::Tally::SetParticleNPE ( )
inline

< Set the particle to Neutron, Photon and Electron

◆ SetParticleP()

void MCNP::Tally::SetParticleP ( )
inline

< Set the particle to Photon

◆ SetTallySpecialTreatment()

void MCNP::Tally::SetTallySpecialTreatment ( string  Treatment)
inline

Set Special Treatment for tallies. In MCNP, this is done via the FT card associated to a tally.

For example to add a Gaussian Energy Broadening for a type 8 tally:

Tally *t=new Tally(8);
t->Add(TheCell);
t->SetParticleP(); //tally for photons
t->AddEnergy(8192, 10e3, 3e6, true);
t->SetTallySpecialTreatment("GEB a b c");
Define a MCNP Tally.
Definition MCNPTally.hxx:161
void SetParticleP()
Definition MCNPTally.hxx:249
void SetTallySpecialTreatment(string Treatment)
Definition MCNPTally.hxx:231
void AddEnergy(int NE, double *E)
Definition MureTally.cxx:236
void Add(Cell *C, bool SetCellTally=true)
Add a cell bin.
Definition MureTally.cxx:438

where the FWHM=a+b*sqrt(E+c*E^2) and E is in MeV.

Member Data Documentation

◆ fCFLinearFTD

bool MCNP::Tally::fCFLinearFTD
private

whether linear or log interpolation is done on FTD

◆ fConversionFactor

vector< double > MCNP::Tally::fConversionFactor
private

fluence-to-dose conversion factor (FTD)

◆ fELinearFTD

bool MCNP::Tally::fELinearFTD
private

whether linear or log interpolation is done on fEnergy for FTD

◆ fEnergy

vector< double > MCNP::Tally::fEnergy
private

Energy bin vector.

◆ fParentheses

bool MCNP::Tally::fParentheses
private

Enclose bins in parentheses.

◆ fParticle

string MCNP::Tally::fParticle
private

Particle Type (N, P, ..)

◆ fStar

bool MCNP::Tally::fStar
private

true if fType < 0 use if you want to print a * before f (for instance *f8:P change the unit of the tally from pulse to MeV see mcnp manuel I (added by Leniau B)

◆ fTallySpecialTreatment

string MCNP::Tally::fTallySpecialTreatment
private

The documentation for this class was generated from the following files:

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024