/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/ReacIBDgen.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/gen/include/RAT/ReacIBDgen.hh Source File
Ratpac-two
ReacIBDgen.hh
1 #ifndef __RAT_ReacIBDgen__
2 #define __RAT_ReacIBDgen__
3 
4 #include <CLHEP/Random/Randomize.h>
5 
6 #include <G4LorentzVector.hh>
7 #include <G4ThreeVector.hh>
8 #include <RAT/LinearInterp.hh>
9 
10 namespace RAT {
11 
12 // Initialize class for adding messages to mac files to adjust isotope params
13 class ReacIBDgenMessenger;
14 
15 // Generate inverse beta decay event
16 class ReacIBDgen {
17  public:
18  ReacIBDgen();
19  ~ReacIBDgen();
20 
21  // Resets parameters to all default values
22  void Reset();
23 
24  // Initialization of messenger object that lets user change parameters in mac
25  // files.
26  ReacIBDgenMessenger *messenger;
27 
28  // Generate random event vectors
29  // Pass in the neutrino direction (unit vector)
30  // Returns 4-momentum vectors for neutrino and resulting positron
31  // and neutron. Neutrino energy and positron direction drawn from
32  // GenInteraction() distribution.
33  void GenEvent(const G4ThreeVector &nu_dir, G4LorentzVector &neutrino, G4LorentzVector &positron,
34  G4LorentzVector &neutron);
35 
36  // Generate random inverse beta decay interaction
37  //
38  // Selects neutrino energy and cos(theta) of the produced
39  // positron relative to neutrino direction. They are pulled
40  // from 2D distribution of reactor neutrinos which have interacted
41  // with a proton, so both the incident flux, and the (relative)
42  // differential cross-section are factored in.
43  void GenInteraction(double &E, double &CosThetaLab);
44 
45  void SetU235Amplitude(double U235Am = U235DEFAULT);
46  void SetU238Amplitude(double U238Am = U238DEFAULT);
47  void SetPu239Amplitude(double Pu239Am = Pu239DEFAULT);
48  void SetPu241Amplitude(double Pu241Am = Pu241DEFAULT);
49 
50  // Total cross section for inverse beta decay
51  static double CrossSection(double x);
52 
53  inline double GetU235Amplitude() { return U235Amp; };
54  inline double GetU238Amplitude() { return U238Amp; };
55  inline double GetPu239Amplitude() { return Pu239Amp; };
56  inline double GetPu241Amplitude() { return Pu241Amp; };
57 
58  // Creates a probability density spectrum using the sum of the different
59  // reactor neutrino probability density spectrums as a function of energy.
60  // The function returns a random energy from the PDF based on the weighted
61  // probabilities. This function uses the same method as the CfSource file
62  // to produce a random generator based on a probability density function.
63  double GetNuEnergy();
64 
65  // Probability density functions of reactor neutrinos as a function of
66  // energy. Parametrization of fluxes for neutrinos from each reactor
67  // core isotope from "Determination of the Neutrino Mass Hierarchy at
68  // Intermediate Baseline", arxiv:0807.3203v2
69 
70  // FIXME: Make the leading coefficients of these spectrums adjustable in
71  // the macro file that will call this generator.
72  double U235ReacSpectrum(const double &x);
73  double Pu239ReacSpectrum(const double &x);
74  double U238ReacSpectrum(const double &x);
75  double Pu241ReacSpectrum(const double &x);
76 
77  // Sum of the reactor spectrums defined above. the x value in this case is
78  // the energy of the neutrino, and the function would return the value of the
79  // PDF at that energy.
80  double NuReacSpectrum(const double &x);
81 
82  // IBDEnergy which is a product of the above spectrums, the cross-section, and
83  // a square root factor with the cross section and electron mass.
84  double IBDESpectrum(double x);
85 
86  protected:
87  double Emax;
88  double Emin;
89  double U238Amp;
90  double U235Amp;
91  double Pu239Amp;
92  double Pu241Amp;
93 
94  static const double U235DEFAULT;
95  static const double U238DEFAULT;
96  static const double Pu239DEFAULT;
97  static const double Pu241DEFAULT;
98 };
99 
100 } // namespace RAT
101 
102 #endif
Definition: ReacIBDgenMessenger.hh:22
Definition: ReacIBDgen.hh:16
Definition: CCCrossSecMessenger.hh:29