MURE
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
NeutronSpectrum Class Reference

NeutronSpectrum contains a histogram of Neutron intensities. More...

#include <NeutronSpectrum.hxx>

Inheritance diagram for NeutronSpectrum:
Spectrum

Public Member Functions

 NeutronSpectrum (double Emin, double Emax, int NumberOfBins, bool log=false)
 Standard Constructor of a NeutronSpectum.
 
 NeutronSpectrum (vector< double > LowerEnergy)
 User input bining Constructor of a NeutronSpectum.
 
 NeutronSpectrum (double *LowerEnergy, int NumberOfBins)
 User input bining Constructor of a NeutronSpectum.
 
 NeutronSpectrum (string BinningFileName)
 File User input bining Constructor of a NeutronSpectum.
 
 NeutronSpectrum (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.
 
 NeutronSpectrum (const NeutronSpectrum &spect)
 Copy constructor.
 
NeutronSpectrumReadENSDF (int Z, int A, int I, double NAtoms=1)
 Read Spontaneous Fission Data and fill the Neutron Spectrum.
 
NeutronSpectrumReadSFDATA (int Z, int A, int I, double NAtoms=1)
 
NeutronSpectrumAddAlphaNSpectra (Material *Waste, double WasteVolume, double UO2Density=- 1)
 
NeutronSpectrumAddAlphaNSpectra (int Z, int A, int I, double NAtoms, double UO2Density=10.4)
 
NeutronSpectrumAddAlphaNSpectra (int Z, int A, int I, double NAtoms, double *OxygenDensity, double UO2Density=10.4)
 set number of bin for (alpha, n) reactions.
 
void SetAlphaNumberOfBins (int nbins)
 set number of bin for (alpha, n) reactions.
 
void SetAlpha_eVPerBin (double eV_bin)
 
double CalculateSFSpectra (double Param_a, double Param_b, double Energy)
 With a Watt fission spectrum.
 
NeutronSpectrumBuildAlphaNSpectra (AlphaSpectrum *AS, double *OxygenDensity, double UO2Density)
 
- 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)
 

Private Member Functions

double CalculateNeutronEnergy (string MinOrMax, int level, int TargetNumber, double EnergyAlpha)
 
double CalculateStoppingPower (double Energy, double UO2Density)
 Calculates alpha stopping power @ Energy in UOx.
 
double FindSigmaAlphaN (int level, int TargetNumber, double Energy)
 
double ProductNuclideLevelBranchingFraction (int level, int TargetNumber, double Energy)
 
double LevelBranchingFraction (int level, int TargetNumber, double Energy)
 Find XS (alpha, n) file.
 
string FindXSFile (int level, int TargetNumber)
 Retrun the fraction of (NeutronEmax-NeutronEmin) for a energy bin.
 
double EnergyRangeFraction (double NeutronEmin, double NeutronEmax, double LowerBinEnergyBound, double UpperBinEnergyBound)
 
void ExtractDataFromLine (string Line, Material *TheParent, double NAtoms)
 Extract Energy and Intensity from ENSDF file.
 

Private Attributes

bool fAllowToAdd
 Allow a given Neutron from B-N to be included in the spectrum.
 
double fDecayConst
 Decay constant.
 
double fRelativeIntensity
 Relative Intensity of beta.
 
double fBranchingRatio
 Branching Ratio.
 
double fEofDecayLevel
 
double fEnergy
 Neutron Energy.
 
double fIntensity
 Intensity.
 
bool fIsomStateIsOk
 

Static Private Attributes

static AlphaNTabsfTabs = nullptr
 Array for (alpha, n) reactions: the same for all NeutronSpectrum.
 
static int fAlphaNumberOfBins = 8000
 bin number of the fTabs
 
static double fAlpha_eVPerBin = 1e3
 calibration for the fTabs
 

Additional Inherited Members

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

NeutronSpectrum contains a histogram of Neutron intensities.

The aim of this class is to provide a Neutron spectrum object that is linked to the Spontaneous Fission, the (alpha, n) process &the Beta-N decay. For (alpha, n), only oxygen O-17 and O-18 are taken into account

Author
BLG
Version
1.0

Constructor & Destructor Documentation

◆ NeutronSpectrum() [1/6]

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

Standard Constructor of a NeutronSpectum.

Parameters
Emin: Lower Energy bound of the Spectrum
Emax: Upper Energy bound of the Spectrum
NumberOfBins: Number of bins
log: true 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

◆ NeutronSpectrum() [2/6]

NeutronSpectrum::NeutronSpectrum ( vector< double >  LowerEnergy)

User input bining Constructor of a NeutronSpectum.

Parameters
LowerEnergy: Lower 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]

◆ NeutronSpectrum() [3/6]

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

User input bining Constructor of a NeutronSpectum.

Parameters
LowerEnergy: Lower energy bounds of each bin array + upper energy bound of the last bin.
NumberOfBins: Number 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]

◆ NeutronSpectrum() [4/6]

NeutronSpectrum::NeutronSpectrum ( string  BinningFileName)

File User input bining Constructor of a NeutronSpectum.

Parameters
BinningFileName: The 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.

◆ NeutronSpectrum() [5/6]

NeutronSpectrum::NeutronSpectrum ( 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
NumberOfBins: Number of Lower energy bounds of each bin (the LowerEnergy array dim is thus NumberOfBins+1
a: first coefficient of the calibration law (eV)
b: second coefficient of the calibration law (eV)
c: third coefficient of the calibration law (eV)

Usefull for experimental spectra

◆ NeutronSpectrum() [6/6]

NeutronSpectrum::NeutronSpectrum ( const NeutronSpectrum spect)

Copy constructor.

Read ENSDF Data and fill the Neutron Spectrum.

Member Function Documentation

◆ AddAlphaNSpectra() [1/3]

NeutronSpectrum * NeutronSpectrum::AddAlphaNSpectra ( int  Z,
int  A,
int  I,
double  NAtoms,
double *  OxygenDensity,
double  UO2Density = 10.4 
)

set number of bin for (alpha, n) reactions.

◆ AddAlphaNSpectra() [2/3]

NeutronSpectrum * NeutronSpectrum::AddAlphaNSpectra ( int  Z,
int  A,
int  I,
double  NAtoms,
double  UO2Density = 10.4 
)

◆ AddAlphaNSpectra() [3/3]

NeutronSpectrum * NeutronSpectrum::AddAlphaNSpectra ( Material Waste,
double  WasteVolume,
double  UO2Density = - 1 
)

◆ BuildAlphaNSpectra()

NeutronSpectrum * NeutronSpectrum::BuildAlphaNSpectra ( AlphaSpectrum AS,
double *  OxygenDensity,
double  UO2Density 
)

Only alpha rays with an intensity > 0.1% are taken into account

Parameters
AS: an (alpha, n) spectrum
OxygenDensity: array of oxygen densities (O-17 &O-18)
UO2Density: density of UOx slowingdown media

◆ CalculateNeutronEnergy()

double NeutronSpectrum::CalculateNeutronEnergy ( string  MinOrMax,
int  level,
int  TargetNumber,
double  EnergyAlpha 
)
private

◆ CalculateSFSpectra()

double NeutronSpectrum::CalculateSFSpectra ( double  Param_a,
double  Param_b,
double  Energy 
)

With a Watt fission spectrum.

Build (alpha, n) Spectra.

◆ CalculateStoppingPower()

double NeutronSpectrum::CalculateStoppingPower ( double  Energy,
double  UO2Density 
)
private

Calculates alpha stopping power @ Energy in UOx.

◆ EnergyRangeFraction()

double NeutronSpectrum::EnergyRangeFraction ( double  NeutronEmin,
double  NeutronEmax,
double  LowerBinEnergyBound,
double  UpperBinEnergyBound 
)
private
Parameters
NeutronEmin: min energy of the neutron for a given alpha, target and level
NeutronEmax: max energy of the neutron for a given alpha, target and level
LowerBinEnergyBound: lower energy bound of a given neutron spectrum bin
UpperBinEnergyBound: upper energy bound of a given neutron spectrum bin

◆ ExtractDataFromLine()

void NeutronSpectrum::ExtractDataFromLine ( string  Line,
Material TheParent,
double  NAtoms 
)
private

Extract Energy and Intensity from ENSDF file.

◆ FindSigmaAlphaN()

double NeutronSpectrum::FindSigmaAlphaN ( int  level,
int  TargetNumber,
double  Energy 
)
private

◆ FindXSFile()

string NeutronSpectrum::FindXSFile ( int  level,
int  TargetNumber 
)
private

Retrun the fraction of (NeutronEmax-NeutronEmin) for a energy bin.

Find for Target(alpha, n)X reaction the total XS file for a given target leading to X in an excited state "level"

Parameters
level: the state level of X
TargetNumber: 0 for O-17 and 1 for O-18

◆ LevelBranchingFraction()

double NeutronSpectrum::LevelBranchingFraction ( int  level,
int  TargetNumber,
double  Energy 
)
private

Find XS (alpha, n) file.

◆ ProductNuclideLevelBranchingFraction()

double NeutronSpectrum::ProductNuclideLevelBranchingFraction ( int  level,
int  TargetNumber,
double  Energy 
)
private

◆ ReadENSDF()

NeutronSpectrum * NeutronSpectrum::ReadENSDF ( int  Z,
int  A,
int  I,
double  NAtoms = 1 
)

Read Spontaneous Fission Data and fill the Neutron Spectrum.

Parameters
Z: Z of the mother nucleus
A: A of the mother nucleus
I: isomeric state of the mother nucleus
NAtoms: the number of atoms of the mother nucleus Search for Neutron from B-N decay (only 6 nuclei in ENSDF in 2012) If you want to know more about the ENSDF format have a look @
See also

◆ ReadSFDATA()

NeutronSpectrum * NeutronSpectrum::ReadSFDATA ( int  Z,
int  A,
int  I,
double  NAtoms = 1 
)

Ref: "A code for calculating (alpha, n), spontaneous fission, and delayed neutron sources and spectra." W.B. WILSON, R.T. Perry, W.S.Charlton, T.A.Parish, Los Alamos.

Parameters
Z: Z of the mother nucleus
A: A of the mother nucleus
I: isomeric state of the mother nucleus
NAtoms: the number of atoms of the mother nucleus

Fill the Histogram

◆ SetAlpha_eVPerBin()

void NeutronSpectrum::SetAlpha_eVPerBin ( double  eV_bin)
inline

This method must be called before any call to NeutronSpectrum::AddAlphaNSpectra because (alpha, n) reactions information are stored statically (1 objet for all NeutronSpectrum)

Parameters
eV_bin: bin calibration (i.e. eV per bin) for (alpha, n) Spectra (fTabs array) [default=40keV/bin]

◆ SetAlphaNumberOfBins()

void NeutronSpectrum::SetAlphaNumberOfBins ( int  nbins)
inline

set number of bin for (alpha, n) reactions.

This method must be called before any call to NeutronSpectrum::AddAlphaNSpectra because (alpha, n) reactions information are stored statically (1 objet for all NeutronSpectrum)

Parameters
nbins: number of bins for (alpha, n) Spectra (fTabs array)[default=200 bins]

Member Data Documentation

◆ fAllowToAdd

bool NeutronSpectrum::fAllowToAdd
private

Allow a given Neutron from B-N to be included in the spectrum.

◆ fAlpha_eVPerBin

double NeutronSpectrum::fAlpha_eVPerBin = 1e3
staticprivate

calibration for the fTabs

◆ fAlphaNumberOfBins

int NeutronSpectrum::fAlphaNumberOfBins = 8000
staticprivate

bin number of the fTabs

◆ fBranchingRatio

double NeutronSpectrum::fBranchingRatio
private

Branching Ratio.

◆ fDecayConst

double NeutronSpectrum::fDecayConst
private

Decay constant.

◆ fEnergy

double NeutronSpectrum::fEnergy
private

Neutron Energy.

◆ fEofDecayLevel

double NeutronSpectrum::fEofDecayLevel
private

◆ fIntensity

double NeutronSpectrum::fIntensity
private

Intensity.

◆ fIsomStateIsOk

bool NeutronSpectrum::fIsomStateIsOk
private

◆ fRelativeIntensity

double NeutronSpectrum::fRelativeIntensity
private

Relative Intensity of beta.

◆ fTabs

AlphaNTabs * NeutronSpectrum::fTabs = nullptr
staticprivate

Array for (alpha, n) reactions: the same for all NeutronSpectrum.


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

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