MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
NeutronSpectrum.hxx
Go to the documentation of this file.
1 #ifndef _NeutronSpectrum_
2 #define _NeutronSpectrum_
3 
8 #include "math.h"
9 #include <cmath>
10 #include <vector>
11 #include <iostream>
12 #include <string>
13 using namespace std;
14 
15 #include "MureHeaders.hxx"
16 
18 
25 {
26  public:
28 
35  AlphaNTabs(int AlphaNumberOfBins=8000,double Alpha_eVPerBin=1e3);
36 
37  ~AlphaNTabs();
38 
40 
45  double GetStopPower(int AlphaBin){return fStopPower[AlphaBin] ;}
46 
48 
54  void SetStopPower(int AlphaBin,double Value){fStopPower[AlphaBin]=Value ;}
55 
57 
63  double GetXSectTot(int target,int AlphaBin){return fXSectTot[target][AlphaBin] ;}
64 
66 
73  void SetXSectTot(int target,int AlphaBin,double value){fXSectTot[target][AlphaBin]=value;}
74 
76 
85  double GetNeutronEmin(int target,int level ,int AlphaBin){return fNeutronEmin[target][level][AlphaBin] ;}
86 
88 
98  void SetNeutronEmin(int target,int level ,int AlphaBin,double value){fNeutronEmin[target][level][AlphaBin]=value;}
99 
101 
110  double GetNeutronEmax(int target,int level ,int AlphaBin){return fNeutronEmax[target][level][AlphaBin] ;}
111 
113 
123  void SetNeutronEmax(int target,int level ,int AlphaBin,double value){fNeutronEmax[target][level][AlphaBin]=value;}
124 
126 
135  double GetBranchingLevel(int target,int level ,int AlphaBin){return fBranchingLevel[target][level][AlphaBin] ;}
136 
138 
148  void SetBranchingLevel(int target,int level ,int AlphaBin,double value){fBranchingLevel[target][level][AlphaBin]=value;}
149 
150  Spectrum* GetSpectrum(int AlphaBin){return fSpectra[AlphaBin] ;}
151  void SetSpectrum(int AlphaBin,Spectrum* spectrum){fSpectra[AlphaBin]=spectrum;}
152 
160  int GetLevelSize(int TargetNumber){return fLevelSize[TargetNumber];}
162  int GetAlphaNumberOfBins(){return fAlphaNumberOfBins;}
163  double GetAlphaCalibration(){return fAlpha_eVperBin;}
164 
165  private:
166  int fAlphaNumberOfBins;
167  double fAlpha_eVperBin;
168  int *fLevelSize;
169  double *fStopPower;
170  double **fXSectTot;
171  double ***fNeutronEmin;
172  double ***fNeutronEmax;
173  double ***fBranchingLevel;
174  Spectrum **fSpectra;
175  void InitAlphaNTabs();
176 
177 };
178 
180 
188 class NeutronSpectrum : public Spectrum
189 {
190  public:
192 
201  NeutronSpectrum(double Emin,double Emax,int NumberOfBins,bool log=false);
202 
204 
211  NeutronSpectrum(vector<double> LowerEnergy);
212 
214 
221  NeutronSpectrum(double* LowerEnergy,int NumberOfBins);
222 
224 
234  NeutronSpectrum(string BinningFileName);
236 
246  NeutronSpectrum(int NumberOfBins,double a, double b,double c);
247 
248  NeutronSpectrum(const NeutronSpectrum &spect);
249 
251 
261  NeutronSpectrum* ReadENSDF(int Z,int A,int I,double NAtoms=1);
262 
264 
274  NeutronSpectrum* ReadSFDATA(int Z,int A,int I,double NAtoms=1);
275 
276  NeutronSpectrum* AddAlphaNSpectra(Material* Waste,double WasteVolume,double UO2Density=-1);
277  NeutronSpectrum* AddAlphaNSpectra(int Z,int A,int I,double NAtoms,double UO2Density=10.4);
278  NeutronSpectrum* AddAlphaNSpectra(int Z,int A,int I,double NAtoms,double *OxygenDensity,double UO2Density=10.4);
280 
288  void SetAlphaNumberOfBins(int nbins){fAlphaNumberOfBins=nbins;}
289 
291 
299  void SetAlpha_eVPerBin(double eV_bin){fAlpha_eVPerBin=eV_bin;}
300 
301  double CalculateSFSpectra(double Param_a,double Param_b,double Energy);
302 
304 
313  NeutronSpectrum* BuildAlphaNSpectra(AlphaSpectrum* AS,double* OxygenDensity,double UO2Density);
314 
315  private:
316 
317  double CalculateNeutronEnergy(string MinOrMax,int level ,int TargetNumber, double EnergyAlpha);
318  double CalculateStoppingPower(double Energy,double UO2Density);
319  double FindSigmaAlphaN(int level, int TargetNumber,double Energy);
320  double ProductNuclideLevelBranchingFraction(int level ,int TargetNumber, double Energy);
321  double LevelBranchingFraction(int level ,int TargetNumber, double Energy);
323 
331  string FindXSFile(int level, int TargetNumber);
332 
334 
342  double EnergyRangeFraction(double NeutronEmin,double NeutronEmax,double LowerBinEnergyBound,double UpperBinEnergyBound);
343 
344  void ExtractDataFromLine(string Line,Material* TheParent,double NAtoms);
345 
346  bool fAllowToAdd;
347  double fDecayConst;
351  double fEnergy;
352  double fIntensity;
354  static AlphaNTabs *fTabs;
355  static int fAlphaNumberOfBins;
356  static double fAlpha_eVPerBin;
357 };
358 
359 #endif
AlphaNTabs contains.
Definition: NeutronSpectrum.hxx:24
NeutronSpectrum contains a histogram of Neutron intensities.
Definition: NeutronSpectrum.hxx:188
double fBranchingRatio
Branching Ratio.
Definition: NeutronSpectrum.hxx:349
double fEofDecayLevel
Definition: NeutronSpectrum.hxx:350
bool fIsomStateIsOk
Definition: NeutronSpectrum.hxx:353
void SetAlpha_eVPerBin(double eV_bin)
Definition: NeutronSpectrum.hxx:299
double fDecayConst
Decay constant.
Definition: NeutronSpectrum.hxx:347
static double fAlpha_eVPerBin
calibration for the fTabs
Definition: NeutronSpectrum.hxx:356
Base class to define spectra.
Definition: Spectrum.hxx:25
double fEnergy
Neutron Energy.
Definition: NeutronSpectrum.hxx:351
double fRelativeIntensity
Relative Intensity of beta.
Definition: NeutronSpectrum.hxx:348
static AlphaNTabs * fTabs
Array for (alpha,n) reactions: the same for all NeutronSpectrum.
Definition: NeutronSpectrum.hxx:354
void SetStopPower(int AlphaBin, double Value)
Set the stopping power in UOx @ energy AlphaBin*evPerChan.
Definition: NeutronSpectrum.hxx:54
double GetStopPower(int AlphaBin)
Set the stopping power for alpha in UOx.
Definition: NeutronSpectrum.hxx:45
double fIntensity
Intensity.
Definition: NeutronSpectrum.hxx:352
void SetAlphaNumberOfBins(int nbins)
set number of bin for (alpha,n) reactions.
Definition: NeutronSpectrum.hxx:288
File including all headers.
static int fAlphaNumberOfBins
bin number of the fTabs
Definition: NeutronSpectrum.hxx:355
A Material constituing a Cell.
Definition: Material.hxx:53
bool fAllowToAdd
Allow a given Neutron from B-N to be included in the spectrum.
Definition: NeutronSpectrum.hxx:346
AlphaSpectrum contains a histogram of Alpha ray intensities.
Definition: AlphaSpectrum.hxx:25

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