GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SmithMonizUtils.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::SmithMonizUtils
5 
6 \brief Contains auxiliary functions for Smith-Moniz model. \n
7 
8 \ref [1] R.A.Smith and E.J.Moniz, Nuclear Physics B43, (1972) 605-622 \n
9  [2] K.S. Kuzmin, V.V. Lyubushkin, V.A.Naumov, Eur. Phys. J. C54, (2008) 517-538 \n
10  [3] K.S.Kuzmin, V.A.Naumov, V.V.Lyubushkin, I.D.Kakorin, Kinematic formulas for GENIE implementation of Smith-Monitz model: \n
11  living document for internal use (http://theor.jinr.ru/NeutrinoOscillations/Papers/GENIE_formulas.pdf)
12 
13 \author Igor Kakorin <kakorin@jinr.ru>
14  Joint Institute for Nuclear Research \n
15 
16  adapted from fortran code provided by: \n
17 
18  Konstantin Kuzmin <kkuzmin@theor.jinr.ru>
19  Joint Institute for Nuclear Research \n
20 
21  Vladimir Lyubushkin
22  Joint Institute for Nuclear Research \n
23 
24  Vadim Naumov <vnaumov@theor.jinr.ru>
25  Joint Institute for Nuclear Research \n
26 
27  based on code of: \n
28  Costas Andreopoulos <constantinos.andreopoulos@cern.ch>
29  University of Liverpool
30 
31 \created May 05, 2017
32 
33 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
34  For the full text of the license visit http://copyright.genie-mc.org
35 
36 */
37 //____________________________________________________________________________
38 
39 #ifndef _SMITH_MONIZ_UTILS_H_
40 #define _SMITH_MONIZ_UTILS_H_
41 
42 #include <TLorentzVector.h>
43 
46 #include "Framework/Utils/Range1.h"
48 
49 namespace genie {
50 
51 
52 
53 class SmithMonizUtils : public Algorithm {
54 
55 public:
57  SmithMonizUtils(string config);
58  virtual ~SmithMonizUtils();
59  void SetInteraction(const Interaction * i);
60  double GetBindingEnergy(void) const;
61  double GetFermiMomentum(void) const;
62  double GetTheta_k(double v, double qv) const;
63  double GetTheta_p(double pv, double v, double qv, double &E_p) const;
64  double E_nu_thr_SM(void) const;
65  Range1D_t Q2QES_SM_lim(void) const;
66  Range1D_t vQES_SM_lim(double Q2) const;
67  Range1D_t kFQES_SM_lim(double nu, double Q2) const;
68  static double rho(double P_Fermi, double T_Fermi, double p);
69  double PhaseSpaceVolume(KinePhaseSpace_t ps) const;
70  double vQES_SM_min(double Q2min, double Q2max) const;
71  double vQES_SM_max(double Q2min, double Q2max) const;
72  //! methods overloading the Algorithm() interface implementation
73  //! to build the fragmentation function from configuration data
74  void Configure(const Registry & config);
75  void Configure(string config);
76 
77 double QEL_EnuMin_SM(double E_nu) const;
78 
79 private:
80  class Functor1D
81  {
82  public:
83  virtual ~Functor1D() {}
84  virtual double operator()(double d) = 0;
85  };
86 
87 
88  template <class C>
89  class Func1D : public Functor1D
90  {
91  public:
92  Func1D(const C &obj, double (C::*f)(double) const):obj_(obj), f_(f){}
93  ~Func1D(){}
94  double operator()(double d) {return (obj_.*f_)( d);}
95  private:
96  const C &obj_;
97  double (C::*f_)(double) const;
98  };
99 
100  template <class C>
101  class Func1Dpar : public Functor1D
102  {
103  public:
104  Func1Dpar(const C &obj, double (C::*f)(double,double) const, double par):obj_(obj), f_(f), parameter(par){}
106  double operator()(double d) {return (obj_.*f_)( d, parameter);}
107  private:
108  const C &obj_;
109  double (C::*f_)(double, double) const;
110  double parameter;
111  };
112 
113  void LoadConfig (void);
114  // double QEL_EnuMin_SM(double E_nu) const;
115  double Q2lim1_SM(double Q2, double Enu) const;
116  double Q2lim2_SM(double Q2) const;
117  void DMINFC(Functor1D &F, double A,double B, double EPS, double DELTA, double &X, double &Y, bool &LLM) const;
118  double vlim1_SM(double Q2) const;
119  double vlim2_SM(double Q2) const;
120 
121  map<int, double> fNucRmvE;
122  string fKFTable;
124 
126 
127  // Some often used variables of class.
128  // To not calculate them again and again and for speed increase
129  // they are initialized at once for multiple use
130  double E_nu; ///< Neutrino energy (GeV)
131  double m_lep; ///< Mass of final charged lepton (GeV)
132  double mm_lep; ///< Squared mass of final charged lepton (GeV)
133  double m_ini; ///< Mass of initial hadron or hadron system (GeV)
134  double mm_ini; ///< Sqared mass of initial hadron or hadron system (GeV)
135  double m_fin; ///< Mass of final hadron or hadron system (GeV)
136  double mm_fin; ///< Squared mass of final hadron or hadron system (GeV)
137  double m_tar; ///< Mass of target nucleus (GeV)
138  double mm_tar; ///< Squared mass of target nucleus (GeV)
139  double m_rnu; ///< Mass of residual nucleus (GeV)
140  double mm_rnu; ///< Squared mass of residual nucleus (GeV)
141  double P_Fermi; ///< Maximum value of Fermi momentum of target nucleon (GeV)
142  double E_BIN; ///< Binding energy (GeV)
143 
144 
145 };
146 
147 
148 } // genie namespace
149 #endif // _SMITH_MONIZ_UTILS_H_
void SetInteraction(const Interaction *i)
double(C::* f_)(double) const
Range1D_t Q2QES_SM_lim(void) const
double vQES_SM_max(double Q2min, double Q2max) const
double mm_lep
Squared mass of final charged lepton (GeV)
Func1Dpar(const C &obj, double(C::*f)(double, double) const, double par)
double m_ini
Mass of initial hadron or hadron system (GeV)
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
double E_BIN
Binding energy (GeV)
double E_nu_thr_SM(void) const
A simple [min,max] interval for doubles.
Definition: Range1.h:42
double m_lep
Mass of final charged lepton (GeV)
double mm_fin
Squared mass of final hadron or hadron system (GeV)
double E_nu
Neutrino energy (GeV)
map< int, double > fNucRmvE
Algorithm abstract base class.
Definition: Algorithm.h:54
double mm_ini
Sqared mass of initial hadron or hadron system (GeV)
double GetTheta_k(double v, double qv) const
double(C::* f_)(double, double) const
enum genie::EKinePhaseSpace KinePhaseSpace_t
Range1D_t vQES_SM_lim(double Q2) const
double GetBindingEnergy(void) const
double mm_rnu
Squared mass of residual nucleus (GeV)
Summary information for an interaction.
Definition: Interaction.h:56
const Interaction * fInteraction
Range1D_t kFQES_SM_lim(double nu, double Q2) const
Func1D(const C &obj, double(C::*f)(double) const)
static constexpr double A
Definition: Units.h:74
double Q2lim2_SM(double Q2) const
double P_Fermi
Maximum value of Fermi momentum of target nucleon (GeV)
double m_rnu
Mass of residual nucleus (GeV)
double Q2lim1_SM(double Q2, double Enu) const
double m_tar
Mass of target nucleus (GeV)
static constexpr double ps
Definition: Units.h:99
void DMINFC(Functor1D &F, double A, double B, double EPS, double DELTA, double &X, double &Y, bool &LLM) const
double vlim2_SM(double Q2) const
double QEL_EnuMin_SM(double E_nu) const
double vQES_SM_min(double Q2min, double Q2max) const
virtual double operator()(double d)=0
Contains auxiliary functions for Smith-Moniz model. .
static double rho(double P_Fermi, double T_Fermi, double p)
double PhaseSpaceVolume(KinePhaseSpace_t ps) const
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
double GetTheta_p(double pv, double v, double qv, double &E_p) const
double mm_tar
Squared mass of target nucleus (GeV)
void Configure(const Registry &config)
double m_fin
Mass of final hadron or hadron system (GeV)
double vlim1_SM(double Q2) const
double GetFermiMomentum(void) const