MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
Public Member Functions | Private Attributes | List of all members
Tally Class Reference

Define a MCNP Tally. More...

#include <Tally.hxx>

Public Member Functions

 Tally (int type=kCellFlux, const char *particle="N")
 
 Tally (int type, int particle)
 
 Tally (const Tally &t)
 Copy constructor. More...
 
TallyClone ()
 
 ~Tally ()
 Destructor. More...
 
void Add (Cell *C)
 add a simple Cell to Tally bin More...
 
void Add (Shape_ptr S)
 add a surface to Tally bin (F1 and F2 only) More...
 
void Add (TallyBin *theTallyBin)
 add general TallyBin to Tally bin More...
 
void Add (int universe)
 add a universe shorthand (Cell Type only) More...
 
void Add (TallyFM *FM)
 add a Tally Multiplicator More...
 
void AddMultiplicator (Material *M, int reaction, double constant=1)
 add a Tally Multiplicator (see TallyFM) More...
 
void AddMultiplicator (Material *M, Reaction *R, double constant=1)
 add a Tally Multiplicator (see TallyFM) More...
 
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)
 
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 AddFluenceToDoseConversion (bool ELinear=false, bool CFLinear=false)
 
string Print ()
 Print the Tally in MCNP. More...
 
string PrintFM ()
 Print the Tally Multiplicator in MCNP. More...
 
void PrintET (ofstream &Out)
 Print the Tally Energy and/or Time binning in MCNP. More...
 
bool NeedVolume ()
 Whether or not a stochastic volume/surface calculation is needed. More...
 
int GetNumber ()
 returns Tally number (1,11,21,...,4,14...) More...
 
vector< double > GetBinVolume (int i)
 returns the ith bin volume of Tally bin More...
 
double GetBinSurface (int i)
 returns the ith bin surface of Tally bin More...
 
void SetBinSurface (int i, double S)
 set the ith bin surface of Tally bin More...
 
void SetBinVolume (int i, double V, int k=0)
 set the ith bin volume of (the kth partial bin in a LatticeBin) Tally bin More...
 
TallyBinGetBin (int i)
 returns the ith bin of the Tally More...
 
vector< TallyBin * > & GetBin ()
 returns the bin vector More...
 
int GetType ()
 returns the Tally type (1,2 for surface tally, 4,.. for cell tally) More...
 
void SetType (int type)
 returns the Tally type (1,2 for surface tally, 4,.. for cell tally) More...
 
int IsInTallyBin (int num)
 return the Bin number containing the Cell/Surface "num" More...
 
string GetParticle ()
 return particle type (neutron,...) More...
 
void SkipVolumeCalculation ()
 Do not try to calculate Volume/Surface. More...
 
bool IsVolumeCalculationSkept ()
 Whether or not try to calculate Volume/Surface. More...
 
void SetParticleN ()
 Set the particle to Neutron. More...
 
void SetParticleNP ()
 Set the particle to Neutron and Photon. More...
 
void SetParticleNE ()
 Set the particle to Neutron and Electron. More...
 
void SetParticleNPE ()
 Set the particle to Neutron, Photon and Electron. More...
 
void SetComment (string str)
 Set the tally comment (Added by T. Courau) More...
 
void SetParentheses (bool flag=true)
 Put parentheses arround cell/surf bin to obtain 1 result (like GroupBin) More...
 
vector< TallyFM * > & GetMultiplicator ()
 return Multiplicator vector More...
 
vector< double > GetEnergyBinningVector ()
 return the vector of energy bins More...
 
void SetETBinForAllTallies (bool flag=true)
 Set Energy/time binning for all tallies (E0 or T0 in MCNP) More...
 
void SetNotPrintable (bool flag=true)
 True for not printable tallies (private used) More...
 

Private Attributes

int fType
 Tally type. More...
 
int fNumber
 Tally number. More...
 
string fParticle
 Particle Type (N,P,..) More...
 
int fLinearT
 Number of time bins for linear binning (0 when non-linear) More...
 
vector< double > fT
 array of [fNT+1] Time bins More...
 
int fLinearE
 Number of energy bins for linear binning (0 when non-linear) More...
 
vector< double > fE
 vector of Energy bins More...
 
vector< TallyBin * > fBin
 array of Cell/Surface bin More...
 
vector< TallyFM * > fMultiplicator
 array of Multiplicator bin More...
 
bool fSkipVolumeCalc
 flag to know whether or not try to calculate Volume/Surface More...
 
string fComment
 Tally coment (Added by T. Courau) More...
 
bool fParentheses
 Enclose bins in parentheses. More...
 
bool fETBinForAllTallies
 true Energy/time binning for all tallies (E0 or T0 in MCNP) More...
 
bool fNotPrintable
 True for not printable tallies. More...
 
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) More...
 
vector< double > fEnergy
 Energy bin vector. More...
 
vector< double > fConversionFactor
 fluence-to-dose conversion factor (FTD) More...
 
bool fELinearFTD
 whether linear or log interpolation is done on fEnergy for FTD More...
 
bool fCFLinearFTD
 whether linear or log interpolation is done on FTD More...
 

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::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 current 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::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 current 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::Tally ( const Tally t)

Copy constructor.

Tally::~Tally ( )

Destructor.

Member Function Documentation

void Tally::Add ( Cell C)

add a simple Cell to Tally bin

void Tally::Add ( Shape_ptr  S)

add a surface to Tally bin (F1 and F2 only)

void Tally::Add ( TallyBin theTallyBin)

add general TallyBin to Tally bin

void Tally::Add ( int  universe)

add a universe shorthand (Cell Type only)

void Tally::Add ( TallyFM FM)
inline

add a Tally Multiplicator

void Tally::AddEnergy ( int  NE,
double *  E 
)

Add a Energy binning.

Parameters
NE: number of energy bin
E: array of energy bin in eV. WARNING E must be of size NE+1
void Tally::AddEnergy ( vector< double >  E)

Add a Energy binning.

Parameters
E: vector of energy bin in eV.
void Tally::AddEnergy ( int  NE,
double  Emin,
double  Emax,
bool  Linear = false 
)

Add a Energy binning.

Parameters
NE: number of energy bin
Emin: lower energy bin in eV.
Emax: upper energy bin in eV.
Linear: whether the bining is linear or logarithmic. (Default=Log)
void Tally::AddEnergy ( double  Emin,
double  Emax,
int  N_by_Decade = 10 
)

Add a Logaritmic Energy binning.

Parameters
Emin: lower energy bin in eV.
Emax: upper energy bin in eV.
N_by_Decade: number of bin in each decade
void Tally::AddFluenceToDoseConversion ( bool  ELinear = false,
bool  CFLinear = false 
)

Convert flux to dose rate (rem/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)
void Tally::AddMultiGroupEnergy ( double  Emin,
double  Emax,
double  decad_mult = 1 
)

Add a Logaritmic Energy binning for Multigroup run.

Parameters
Emin: lower energy bin in eV.
Emax: upper energy bin in eV.
decad_mult: multiplier of bin/decade in each range.
void Tally::AddMultiplicator ( Material M,
int  reaction,
double  constant = 1 
)

add a Tally Multiplicator (see TallyFM)

void Tally::AddMultiplicator ( Material M,
Reaction R,
double  constant = 1 
)

add a Tally Multiplicator (see TallyFM)

void Tally::AddTime ( int  NT,
double *  T 
)

Add a Time binning.

Parameters
NT: number of time bin
T: array of time bin in s. WARNING T must be of size NT+1
void Tally::AddTime ( int  NT,
double  Tmin,
double  Tmax,
bool  Linear = false 
)

Add a Time binning.

Parameters
NT: number of time bin
Tmin: lower time bin in s.
Tmax: upper time bin in s.
Linear: whether the bining is linear or logarithmic. (Default=Log)
void Tally::AddTime ( double  Tmin,
double  Tmax,
int  N_by_Decade = 10 
)

Add a Logaritmic Time binning.

Parameters
Tmin: lower time bin in s.
Tmax: upper time bin in s.
N_by_Decade: number of bin in each decade
Tally* Tally::Clone ( )
inline
TallyBin* Tally::GetBin ( int  i)
inline

returns the ith bin of the Tally

vector<TallyBin*>& Tally::GetBin ( )
inline

returns the bin vector

double Tally::GetBinSurface ( int  i)

returns the ith bin surface of Tally bin

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

returns the ith bin volume of Tally bin

vector<double> Tally::GetEnergyBinningVector ( )
inline

return the vector of energy bins

vector<TallyFM*>& Tally::GetMultiplicator ( )
inline

return Multiplicator vector

int Tally::GetNumber ( )
inline

returns Tally number (1,11,21,...,4,14...)

string Tally::GetParticle ( )
inline

return particle type (neutron,...)

int Tally::GetType ( )
inline

returns the Tally type (1,2 for surface tally, 4,.. for cell tally)

int Tally::IsInTallyBin ( int  num)

return the Bin number containing the Cell/Surface "num"

bool Tally::IsVolumeCalculationSkept ( )
inline

Whether or not try to calculate Volume/Surface.

bool Tally::NeedVolume ( )

Whether or not a stochastic volume/surface calculation is needed.

string Tally::Print ( )

Print the Tally in MCNP.

void Tally::PrintET ( ofstream &  Out)

Print the Tally Energy and/or Time binning in MCNP.

string Tally::PrintFM ( )

Print the Tally Multiplicator in MCNP.

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

set the ith bin surface of Tally bin

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

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

void Tally::SetComment ( string  str)
inline

Set the tally comment (Added by T. Courau)

void Tally::SetETBinForAllTallies ( bool  flag = true)
inline

Set Energy/time binning for all tallies (E0 or T0 in MCNP)

void Tally::SetNotPrintable ( bool  flag = true)
inline

True for not printable tallies (private used)

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

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

void Tally::SetParticleN ( )
inline

Set the particle to Neutron.

void Tally::SetParticleNE ( )
inline

Set the particle to Neutron and Electron.

void Tally::SetParticleNP ( )
inline

Set the particle to Neutron and Photon.

void Tally::SetParticleNPE ( )
inline

Set the particle to Neutron, Photon and Electron.

void Tally::SetType ( int  type)
inline

returns the Tally type (1,2 for surface tally, 4,.. for cell tally)

void Tally::SkipVolumeCalculation ( )
inline

Do not try to calculate Volume/Surface.

Member Data Documentation

vector<TallyBin*> Tally::fBin
private

array of Cell/Surface bin

bool Tally::fCFLinearFTD
private

whether linear or log interpolation is done on FTD

string Tally::fComment
private

Tally coment (Added by T. Courau)

vector<double> Tally::fConversionFactor
private

fluence-to-dose conversion factor (FTD)

vector<double> Tally::fE
private

vector of Energy bins

bool Tally::fELinearFTD
private

whether linear or log interpolation is done on fEnergy for FTD

vector<double> Tally::fEnergy
private

Energy bin vector.

bool Tally::fETBinForAllTallies
private

true Energy/time binning for all tallies (E0 or T0 in MCNP)

int Tally::fLinearE
private

Number of energy bins for linear binning (0 when non-linear)

int Tally::fLinearT
private

Number of time bins for linear binning (0 when non-linear)

vector<TallyFM*> Tally::fMultiplicator
private

array of Multiplicator bin

bool Tally::fNotPrintable
private

True for not printable tallies.

int Tally::fNumber
private

Tally number.

bool Tally::fParentheses
private

Enclose bins in parentheses.

string Tally::fParticle
private

Particle Type (N,P,..)

bool Tally::fSkipVolumeCalc
private

flag to know whether or not try to calculate Volume/Surface

bool 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)

vector<double> Tally::fT
private

array of [fNT+1] Time bins

int Tally::fType
private

Tally type.


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

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