MURE
Loading...
Searching...
No Matches
NeutronSpectrum.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef _NeutronSpectrum_
20#define _NeutronSpectrum_
21
26#include <cmath>
27#include <vector>
28#include <iostream>
29#include <string>
30
31using namespace std;
32
33#include "AlphaSpectrum.hxx"
34#include "Spectrum.hxx"
35
36class AlphaSpectrum;
37class Material;
38
39
41
48{
49 public:
51
58 AlphaNTabs(int AlphaNumberOfBins = 8000, double Alpha_eVPerBin = 1e3);
59
60 ~AlphaNTabs();
61
63
68 double GetStopPower(int AlphaBin)
69 {
70 return fStopPower[AlphaBin] ;
71 }
72
74
80 void SetStopPower(int AlphaBin, double Value)
81 {
82 fStopPower[AlphaBin] = Value ;
83 }
84
86
92 double GetXSectTot(int target, int AlphaBin)
93 {
94 return fXSectTot[target][AlphaBin] ;
95 }
96
98
105 void SetXSectTot(int target, int AlphaBin, double value)
106 {
107 fXSectTot[target][AlphaBin] = value;
108 }
109
111
120 double GetNeutronEmin(int target, int level, int AlphaBin)
121 {
122 return fNeutronEmin[target][level][AlphaBin] ;
123 }
124
126
136 void SetNeutronEmin(int target, int level, int AlphaBin, double value)
137 {
138 fNeutronEmin[target][level][AlphaBin] = value;
139 }
140
142
151 double GetNeutronEmax(int target, int level, int AlphaBin)
152 {
153 return fNeutronEmax[target][level][AlphaBin] ;
154 }
155
157
167 void SetNeutronEmax(int target, int level, int AlphaBin, double value)
168 {
169 fNeutronEmax[target][level][AlphaBin] = value;
170 }
171
173
182 double GetBranchingLevel(int target, int level, int AlphaBin)
183 {
184 return fBranchingLevel[target][level][AlphaBin] ;
185 }
186
188
198 void SetBranchingLevel(int target, int level, int AlphaBin, double value)
199 {
200 fBranchingLevel[target][level][AlphaBin] = value;
201 }
202
203 Spectrum *GetSpectrum(int AlphaBin)
204 {
205 return fSpectra[AlphaBin] ;
206 }
207 void SetSpectrum(int AlphaBin, Spectrum *spectrum)
208 {
209 fSpectra[AlphaBin] = spectrum;
210 }
212
219 int GetLevelSize(int TargetNumber)
220 {
221 return fLevelSize[TargetNumber];
222 }
223
225 {
226 return fAlphaNumberOfBins;
227 }
229 {
230 return fAlpha_eVperBin;
231 }
232
233 private:
237 double *fStopPower;
238 double **fXSectTot;
239 double ***fNeutronEmin;
240 double ***fNeutronEmax;
241 double ***fBranchingLevel;
243 void InitAlphaNTabs();
244
245};
246
248
257{
258 public:
260
269 NeutronSpectrum(double Emin, double Emax, int NumberOfBins, bool log = false);
270
272
279 NeutronSpectrum(vector < double > LowerEnergy);
280
282
289 NeutronSpectrum(double *LowerEnergy, int NumberOfBins);
290
292
302 NeutronSpectrum(string BinningFileName);
304
314 NeutronSpectrum(int NumberOfBins, double a, double b, double c);
315
316 NeutronSpectrum(const NeutronSpectrum &spect);
317
319
329 NeutronSpectrum *ReadENSDF(int Z, int A, int I, double NAtoms = 1);
330
332
342 NeutronSpectrum *ReadSFDATA(int Z, int A, int I, double NAtoms = 1);
343
344 NeutronSpectrum *AddAlphaNSpectra(Material *Waste, double WasteVolume, double UO2Density = - 1);
345 NeutronSpectrum *AddAlphaNSpectra(int Z, int A, int I, double NAtoms, double UO2Density = 10.4);
346 NeutronSpectrum *AddAlphaNSpectra(int Z, int A, int I, double NAtoms, double *OxygenDensity, double UO2Density = 10.4);
348
356 void SetAlphaNumberOfBins(int nbins)
357 {
358 fAlphaNumberOfBins = nbins;
359 }
360
362
370 void SetAlpha_eVPerBin(double eV_bin)
371 {
372 fAlpha_eVPerBin = eV_bin;
373 }
374
375 double CalculateSFSpectra(double Param_a, double Param_b, double Energy);
376
378
386 NeutronSpectrum *BuildAlphaNSpectra(AlphaSpectrum *AS, double *OxygenDensity, double UO2Density);
387
388 private:
389
390 double CalculateNeutronEnergy(string MinOrMax, int level, int TargetNumber, double EnergyAlpha);
391 double CalculateStoppingPower(double Energy, double UO2Density);
392 double FindSigmaAlphaN(int level, int TargetNumber, double Energy);
393 double ProductNuclideLevelBranchingFraction(int level, int TargetNumber, double Energy);
394 double LevelBranchingFraction(int level, int TargetNumber, double Energy);
396
404 string FindXSFile(int level, int TargetNumber);
405
407
415 double EnergyRangeFraction(double NeutronEmin, double NeutronEmax, double LowerBinEnergyBound, double UpperBinEnergyBound);
416
417 void ExtractDataFromLine(string Line, Material *TheParent, double NAtoms);
418
420 double fDecayConst;
424 double fEnergy;
425 double fIntensity;
429 static double fAlpha_eVPerBin;
430};
431
432#endif
Header file for AlphaSpectrum class.
Header file for Spectrum class.
AlphaNTabs contains.
Definition NeutronSpectrum.hxx:48
Spectrum ** fSpectra
a neutron spectrum per target, alpha and level of X
Definition NeutronSpectrum.hxx:242
int GetAlphaNumberOfBins()
Definition NeutronSpectrum.hxx:224
void SetSpectrum(int AlphaBin, Spectrum *spectrum)
Get the number of level available.
Definition NeutronSpectrum.hxx:207
double GetNeutronEmax(int target, int level, int AlphaBin)
Set the maximum neutron energy.
Definition NeutronSpectrum.hxx:151
void SetNeutronEmin(int target, int level, int AlphaBin, double value)
Get the maximum neutron energy.
Definition NeutronSpectrum.hxx:136
int * fLevelSize
number of level available for the X daughter of Target(alpha, n)X
Definition NeutronSpectrum.hxx:236
double GetStopPower(int AlphaBin)
Set the stopping power for alpha in UOx.
Definition NeutronSpectrum.hxx:68
double fAlpha_eVperBin
calibration of the energy bins
Definition NeutronSpectrum.hxx:235
double ** fXSectTot
alpha total XS on O-17 and O-18
Definition NeutronSpectrum.hxx:238
double GetAlphaCalibration()
Definition NeutronSpectrum.hxx:228
void SetStopPower(int AlphaBin, double Value)
Get the total (alpha, n) cross section on target.
Definition NeutronSpectrum.hxx:80
Spectrum * GetSpectrum(int AlphaBin)
Definition NeutronSpectrum.hxx:203
void SetBranchingLevel(int target, int level, int AlphaBin, double value)
Definition NeutronSpectrum.hxx:198
double GetBranchingLevel(int target, int level, int AlphaBin)
Set the branching ratio to produce X.
Definition NeutronSpectrum.hxx:182
double *** fBranchingLevel
prodcution ratio for a given level of X divided by the total
Definition NeutronSpectrum.hxx:241
double GetXSectTot(int target, int AlphaBin)
Set the total (alpha, n) cross section on target.
Definition NeutronSpectrum.hxx:92
double * fStopPower
alpha stopping power
Definition NeutronSpectrum.hxx:237
double *** fNeutronEmax
maximum neutron energy produced by (alpha, n) for a given target, Ealpha and X level
Definition NeutronSpectrum.hxx:240
~AlphaNTabs()
destructor
Definition NeutronSpectrum.cxx:1125
double GetNeutronEmin(int target, int level, int AlphaBin)
Set the minimum neutron energy.
Definition NeutronSpectrum.hxx:120
void InitAlphaNTabs()
creates and inits all arrays
Definition NeutronSpectrum.cxx:1150
void SetNeutronEmax(int target, int level, int AlphaBin, double value)
Get the branching ratio to produce X.
Definition NeutronSpectrum.hxx:167
double *** fNeutronEmin
minimum neutron energy produced by (alpha, n) for a given target, Ealpha and X level
Definition NeutronSpectrum.hxx:239
void SetXSectTot(int target, int AlphaBin, double value)
Get the minimum neutron energy.
Definition NeutronSpectrum.hxx:105
int fAlphaNumberOfBins
Number of bin ofthe alpha spectra.
Definition NeutronSpectrum.hxx:234
int GetLevelSize(int TargetNumber)
Definition NeutronSpectrum.hxx:219
AlphaSpectrum contains a histogram of Alpha ray intensities.
Definition AlphaSpectrum.hxx:47
A Material constituing a Cell.
Definition Material.hxx:83
NeutronSpectrum contains a histogram of Neutron intensities.
Definition NeutronSpectrum.hxx:257
string FindXSFile(int level, int TargetNumber)
Retrun the fraction of (NeutronEmax-NeutronEmin) for a energy bin.
Definition NeutronSpectrum.cxx:829
double fEnergy
Neutron Energy.
Definition NeutronSpectrum.hxx:424
double CalculateNeutronEnergy(string MinOrMax, int level, int TargetNumber, double EnergyAlpha)
Definition NeutronSpectrum.cxx:664
NeutronSpectrum * ReadENSDF(int Z, int A, int I, double NAtoms=1)
Read Spontaneous Fission Data and fill the Neutron Spectrum.
Definition NeutronSpectrum.cxx:891
bool fIsomStateIsOk
Definition NeutronSpectrum.hxx:426
double CalculateSFSpectra(double Param_a, double Param_b, double Energy)
With a Watt fission spectrum.
Definition NeutronSpectrum.cxx:192
double FindSigmaAlphaN(int level, int TargetNumber, double Energy)
Definition NeutronSpectrum.cxx:850
NeutronSpectrum * AddAlphaNSpectra(Material *Waste, double WasteVolume, double UO2Density=- 1)
Definition NeutronSpectrum.cxx:371
NeutronSpectrum * BuildAlphaNSpectra(AlphaSpectrum *AS, double *OxygenDensity, double UO2Density)
Definition NeutronSpectrum.cxx:203
double CalculateStoppingPower(double Energy, double UO2Density)
Calculates alpha stopping power @ Energy in UOx.
Definition NeutronSpectrum.cxx:779
bool fAllowToAdd
Allow a given Neutron from B-N to be included in the spectrum.
Definition NeutronSpectrum.hxx:419
static AlphaNTabs * fTabs
Array for (alpha, n) reactions: the same for all NeutronSpectrum.
Definition NeutronSpectrum.hxx:427
static double fAlpha_eVPerBin
calibration for the fTabs
Definition NeutronSpectrum.hxx:429
NeutronSpectrum * ReadSFDATA(int Z, int A, int I, double NAtoms=1)
Definition NeutronSpectrum.cxx:130
void SetAlphaNumberOfBins(int nbins)
set number of bin for (alpha, n) reactions.
Definition NeutronSpectrum.hxx:356
double EnergyRangeFraction(double NeutronEmin, double NeutronEmax, double LowerBinEnergyBound, double UpperBinEnergyBound)
Definition NeutronSpectrum.cxx:486
double LevelBranchingFraction(int level, int TargetNumber, double Energy)
Find XS (alpha, n) file.
Definition NeutronSpectrum.cxx:603
double fIntensity
Intensity.
Definition NeutronSpectrum.hxx:425
double fRelativeIntensity
Relative Intensity of beta.
Definition NeutronSpectrum.hxx:421
double fEofDecayLevel
Definition NeutronSpectrum.hxx:423
double fBranchingRatio
Branching Ratio.
Definition NeutronSpectrum.hxx:422
void SetAlpha_eVPerBin(double eV_bin)
Definition NeutronSpectrum.hxx:370
double ProductNuclideLevelBranchingFraction(int level, int TargetNumber, double Energy)
Definition NeutronSpectrum.cxx:583
void ExtractDataFromLine(string Line, Material *TheParent, double NAtoms)
Extract Energy and Intensity from ENSDF file.
Definition NeutronSpectrum.cxx:1022
double fDecayConst
Decay constant.
Definition NeutronSpectrum.hxx:420
static int fAlphaNumberOfBins
bin number of the fTabs
Definition NeutronSpectrum.hxx:428
Base class to define spectra.
Definition Spectrum.hxx:50
the namespace of the Standard C++

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