MURE
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BetaSpectrum Class Reference

BetaSpectrum contains a histogram of Beta ray intensities. More...

#include <BetaSpectrum.hxx>

Inheritance diagram for BetaSpectrum:
Spectrum

Public Member Functions

 BetaSpectrum (double Emin, double Emax, int NumberOfBins, bool log=false)
 Standard Constructor of a BetaSpectrum.
 
 BetaSpectrum (vector< double > LowerEnergy)
 User input bining Constructor of a BetaSpectrum.
 
 BetaSpectrum (double *LowerEnergy, int NumberOfBins)
 User input bining Constructor of a BetaSpectrum.
 
 BetaSpectrum (string BinningFileName)
 File User input bining Constructor of a BetaSpectrum.
 
 BetaSpectrum (int NumberOfBins, double a, double b, double c)
 Constructor of a Spectrum with binning build with this calibration law : E(Lowerbin)=a*Lowerbin*Lowerbin + b*Lowerbin + c.
 
 BetaSpectrum (const BetaSpectrum &spect)
 Copy constructor.
 
BetaSpectrumReadENSDF (int Z, int A, int I, double NAtoms=1)
 
- Public Member Functions inherited from Spectrum
 Spectrum (double Emin, double Emax, int NumberOfbins, bool log=false)
 Standard Constructor of a Spectrum.
 
 Spectrum (vector< double > LowerEnergy, bool check=true)
 User input bining Constructor of a Spectrum.
 
 Spectrum (double *LowerEnergy, int NumberOfBins, bool check=true)
 User input bining Constructor of a Spectrum.
 
 Spectrum (string BinningFileName, bool check=true)
 File User input bining Constructor of a Spectrum.
 
 Spectrum (int NumberOfBins, double a, double b, double c, bool check=true)
 Constructor of a Spectrum with binning build with this calibration law : E(Lowerbin)=a*Lowerbin*Lowerbin + b*Lowerbin + c.
 
 Spectrum (const Spectrum &spect)
 Copy constructor.
 
 ~Spectrum ()
 destructor
 
void SetZ (int Z)
 
void SetA (int A)
 
void SetName (string Name)
 
void SetNumberOfbins (int nbins)
 
void SetBin (int i, double intensity)
 
int GetZ ()
 
int GetA ()
 
string GetName ()
 
double GetBin (int i)
 
double * GetBin ()
 
double * GetLowerEnergy ()
 
double GetLowerEnergy (int i)
 
double GetEnergyBinWidth (int i)
 Return the energy width of the bin i ie fLowerEnergy[i+1]-fLowerEnergy[i].
 
double GetMiddleEnergy (int i)
 Return the centered energy of the bin i.
 
int GetBinNumber (double Energy)
 Return the Bin number corresponding on the Energy.
 
int GetNumberOfbins ()
 
bool IsLog ()
 
bool IsAlpha ()
 
bool IsNeutron ()
 
bool IsGamma ()
 
bool IsBeta ()
 
int GetParticleType ()
 get the particle type of this spectrum 1=n 2=g 3=e-
 
bool GotTheSameBinning (Spectrum *aSpectrum)
 True if this and aSpectrum have the same energy binning.
 
bool IsEmpty ()
 True if all intensities are 0.
 
bool IsTheSameSpectrum (Spectrum *SameOrNot)
 True if two spectra are completly identical.
 
void Initialize ()
 Set all Intensities to 0.
 
void CheckBin ()
 Check if Energy definition is correct (monotically increasing)
 
void AddEnergy (double Energy, double Intensity)
 Add Intensity at the bin corresponding to Energy.
 
void Contract (int ContractionFactor)
 Contract the Spectrum 's binning by a factor Contractionfactor.
 
double TotalActivity ()
 Sum of particules emmited at all energies.
 
double GetTotalNumberOfParticlesPerDecay ()
 
double GetTotalBecquerel ()
 
void Fill (Material *material, double volume)
 Fill a Spectrum for a material.
 
void FillFromFile (string filename)
 
void Dump (string filename="Spectrum.dat", bool WithEnergies=false)
 Dump the Neutron Spectrum histogram.
 
void Normalize (double Multiplicateur)
 multiply Intensity by Multiplicateur
 
void AddSpectrum (Spectrum *aSpectrum)
 Add aSpectrum to the current one.
 
void RemoveSpectrum (Spectrum *aSpectrum)
 Remove aSpectrum to the current one.
 
SpectrumNewSpectrumNormalized (Spectrum *UnNormalized, double Norm)
 multiply a UnNormalized spectrum by Norm and put it in a new NeutronSpectrum
 
SpectrumNewSpectrumNormalized2 (Spectrum *UnNormalized, double Norm)
 presque pareil mais pas tout a fait (BBBBBUUUUUG)
 
SpectrumConvertRayToGaussian (Spectrum *Spect_Raie, double FWHM)
 Convert a spectrum of discret rays in to several gaussian of the same Full width at half maximum (FWHM)
 

Protected Member Functions

void ExtractDataFromLine (string Line, Material *TheParent, double NAtoms)
 Extract Energy and Intensity from ENSDF file.
 
double CalculateIntensity (int Zdaughter, double EndPointEnergy, double Energy)
 
void GetSpinParity (string sSpinParity, double &Spin, char &Parity)
 Get the spin and the parity of a given state.
 
complex< double > cgamma (const complex< double > &z, bool LOG=true)
 
- Protected Member Functions inherited from Spectrum
void ElementSymbol (int Zd, char &Z1, char &Z2)
 Convert the Z of a nucleus in its symbol.
 
void CreateBins (double EnergyMin, double EnergyMax, int NumberOfbins)
 generates the bins
 
void CreateBins (vector< double > LowerEnergy)
 generates the bins
 
void CreateBins (double *LowerEnergy)
 generates the bins
 
bool IsDouble (const std::string &s)
 true is a string can be converted in a double
 
void ReadENSDFFile (int Adaughter, vector< string > &Buffer, int &NumOfLine)
 Read each line of the file and store them in buffer.
 
bool FindFirstLinesOfDecayModeCard (vector< string > const &Buffer, char Z1, char Z2, vector< int > &BeginRecordLine, string DecayMode, string DecayModeBis="")
 

Protected Attributes

bool fAllowToAdd
 Allow a given beta to be included in the spectrum.
 
double fDecayConst
 Decay constant.
 
double fRelativeIntensity
 Relative Intensity of beta.
 
double fBranchingRatio
 Branching Ratio.
 
double fNB
 Normalization Factor.
 
double fEofDecayLevel
 Energy of the "decaying level" of the parent nucleus.
 
double fEnergyLevel
 Energy level of the decaying nucleus.
 
double fEndPointEnergy
 Maximum beta spectrum energy.
 
double fQvalue
 Beta Q-value for ground state to ground state transition.
 
double fIntensity
 Intensity.
 
bool fIsomStateIsOk
 True if the isomeric state is the wanted state according to the decay constant.
 
char fParityParent
 The parity of the parent.
 
double fSpinParent
 The spin of the parent.
 
char fParityDaughter
 The parity of the daughter.
 
double fSpinDaughter
 The spin of the daughter.
 
- Protected Attributes inherited from Spectrum
bool fIsLog
 true for Log bining
 
int fNumberOfbins
 Total number of bins.
 
double * fHistogram
 The histogram.
 
double * fLowerEnergy
 array of lower bounds of each bin (except the last value)
 
double fTotalParticlesEmitted
 
double fTotalNumberOfParticlesPerDecay
 
double fTotalBecquerel
 
int fZ
 Z of the mother nucleus.
 
int fA
 A of the mother nucleus.
 
string fName
 isotope Name of the neutron spectrum
 
bool fIsAlpha
 true for Alpha Spectrum
 
bool fIsBeta
 true for Beta Spectrum
 
bool fIsGamma
 true for Gamma Spectrum
 
bool fIsNeutron
 true for neutron Spectrum
 

Detailed Description

BetaSpectrum contains a histogram of Beta ray intensities.

The aim of this class is to provide a Beta spectrum object that is linked to the way a decaying nucleus or combination of nuclei emit Beta rays.

Author
BLG
Version
1.0

Constructor & Destructor Documentation

◆ BetaSpectrum() [1/6]

BetaSpectrum::BetaSpectrum ( double  Emin,
double  Emax,
int  NumberOfBins,
bool  log = false 
)

Standard Constructor of a BetaSpectrum.

Parameters
EminLower Energy bound of the Spectrum
EmaxUpper Energy bound of the Spectrum
NumberOfBinsNumber of bins
logtrue if logaritmic binning is wanted (default=false)

This constructor creates the Energy binnig automatically. The binning is constant for linear bins and with constant log step for log bins

◆ BetaSpectrum() [2/6]

BetaSpectrum::BetaSpectrum ( vector< double >  LowerEnergy)

User input bining Constructor of a BetaSpectrum.

Parameters
LowerEnergyLower energy bounds of each bin vector + upper energy bound of the last bin.

Usefull for non constant binning. Energy range of bin number i is :fLowerEnergy[i] <= Energy < fLowerEnergy[i+1]

◆ BetaSpectrum() [3/6]

BetaSpectrum::BetaSpectrum ( double *  LowerEnergy,
int  NumberOfBins 
)

User input bining Constructor of a BetaSpectrum.

Parameters
LowerEnergyLower energy bounds of each bin array + upper energy bound of the last bin.
NumberOfBinsNumber of Lower energy bounds of each bin (the LowerEnergy array dim is thus NumberOfBins+1

Usefull for non constant binning. Energy range of bin number i is :fLowerEnergy[i] <= Energy < fLowerEnergy[i+1]

◆ BetaSpectrum() [4/6]

BetaSpectrum::BetaSpectrum ( string  BinningFileName)

File User input bining Constructor of a BetaSpectrum.

Parameters
BinningFileNameThe binning file name containing the lower eenrgy bounds of bins.

Usefull for non constant binning. The file must start with N, the number of bins. Then, follow the lower bounds of each bins (N real values) and then the upper bound of the last energy bin (the (N+1) value). Thus the file must contains N+2 line for N lower bin bounds.

◆ BetaSpectrum() [5/6]

BetaSpectrum::BetaSpectrum ( int  NumberOfBins,
double  a,
double  b,
double  c 
)

Constructor of a Spectrum with binning build with this calibration law : E(Lowerbin)=a*Lowerbin*Lowerbin + b*Lowerbin + c.

Parameters
NumberOfBinsNumber of Lower energy bounds of each bin (the LowerEnergy array dim is thus NumberOfBins+1
afirst coefficient of the calibration law (eV)
bsecond coefficient of the calibration law (eV)
cthird coefficient of the calibration law (eV)

Usefull for experimental spectra

◆ BetaSpectrum() [6/6]

BetaSpectrum::BetaSpectrum ( const BetaSpectrum spect)

Copy constructor.

Read ENSDF Data and fill the Beta Spectrum.

Member Function Documentation

◆ CalculateIntensity()

double BetaSpectrum::CalculateIntensity ( int  Zdaughter,
double  EndPointEnergy,
double  Energy 
)
protected

◆ cgamma()

complex< double > BetaSpectrum::cgamma ( const complex< double > &  z,
bool  LOG = true 
)
protected
Parameters
zthe complex number
LOGwhether

Use C.Lanczos expansion (see Abramowitz&Stegun, formula 6.1.41) for calculating the

\[ \Gamma(z)=\int_0^\infty x^t\exp(-x) \frac{dx}{x}\]

◆ ExtractDataFromLine()

void BetaSpectrum::ExtractDataFromLine ( string  Line,
Material TheParent,
double  NAtoms 
)
protected

Extract Energy and Intensity from ENSDF file.

◆ GetSpinParity()

void BetaSpectrum::GetSpinParity ( string  sSpinParity,
double &  Spin,
char &  Parity 
)
protected

Get the spin and the parity of a given state.

Calculate the extended complex Gamma Function.

◆ ReadENSDF()

BetaSpectrum * BetaSpectrum::ReadENSDF ( int  Z,
int  A,
int  I,
double  NAtoms = 1 
)
Parameters
ZZ of the mother nucleus
AA of the mother nucleus
Iisomeric state of the mother nucleus
NAtomsthe number of atoms of the mother nucleus

If you want to know more about the ENSDF format have a look @

See also

Member Data Documentation

◆ fAllowToAdd

bool BetaSpectrum::fAllowToAdd
protected

Allow a given beta to be included in the spectrum.

◆ fBranchingRatio

double BetaSpectrum::fBranchingRatio
protected

Branching Ratio.

◆ fDecayConst

double BetaSpectrum::fDecayConst
protected

Decay constant.

◆ fEndPointEnergy

double BetaSpectrum::fEndPointEnergy
protected

Maximum beta spectrum energy.

◆ fEnergyLevel

double BetaSpectrum::fEnergyLevel
protected

Energy level of the decaying nucleus.

◆ fEofDecayLevel

double BetaSpectrum::fEofDecayLevel
protected

Energy of the "decaying level" of the parent nucleus.

◆ fIntensity

double BetaSpectrum::fIntensity
protected

Intensity.

◆ fIsomStateIsOk

bool BetaSpectrum::fIsomStateIsOk
protected

True if the isomeric state is the wanted state according to the decay constant.

◆ fNB

double BetaSpectrum::fNB
protected

Normalization Factor.

◆ fParityDaughter

char BetaSpectrum::fParityDaughter
protected

The parity of the daughter.

◆ fParityParent

char BetaSpectrum::fParityParent
protected

The parity of the parent.

◆ fQvalue

double BetaSpectrum::fQvalue
protected

Beta Q-value for ground state to ground state transition.

◆ fRelativeIntensity

double BetaSpectrum::fRelativeIntensity
protected

Relative Intensity of beta.

◆ fSpinDaughter

double BetaSpectrum::fSpinDaughter
protected

The spin of the daughter.

◆ fSpinParent

double BetaSpectrum::fSpinParent
protected

The spin of the parent.


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

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