NievesQELCCPXSec.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::NievesQELCCPXSec
5 
6 \brief Computes neutrino-nucleon(nucleus) QELCC differential cross section
7  with RPA corrections
8  Is a concrete implementation of the XSecAlgorithmI interface. \n
9 
10 \ref Physical Review C 70, 055503 (2004)
11 
12 \author Joe Johnston, University of Pittsburgh
13  Steven Dytman, University of Pittsburgh
14 
15 \created April 2016
16 
17 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
18  For the full text of the license visit http://copyright.genie-mc.org
19 */
20 //____________________________________________________________________________
21 
22 #ifndef _NIEVES_QELCC_CROSS_SECTION_H_
23 #define _NIEVES_QELCC_CROSS_SECTION_H_
24 
28 #include <complex>
29 #include <Math/IFunction.h>
34 
35 namespace genie {
36 
37 typedef enum EQELRmax {
38  // Use the same maximum radius as VertexGenerator (3*R0*A^(1/3))
40 
41  // Use the method for calculting Rmax from Nieves' Fortran code
44 
46 class XSecIntegratorI;
47 
49 
50 public:
52  NievesQELCCPXSec(string config);
53  virtual ~NievesQELCCPXSec();
54 
55  // XSecAlgorithmI interface implementation
56  double XSec (const Interaction * i, KinePhaseSpace_t k) const;
57  double Integral (const Interaction * i) const;
58  bool ValidProcess (const Interaction * i) const;
59 
60  // Override the Algorithm::Configure methods to load configuration
61  // data to private data members
62  void Configure (const Registry & config);
63  void Configure (string param_set);
64 
65 private:
66  void LoadConfig (void);
67 
71  double fCos8c2; ///< cos^2(cabibbo angle)
72 
73  double fXSecScale; ///< external xsec scaling factor
74  const QvalueShifter * fQvalueShifter ; ///< Optional algorithm to retrieve the qvalue shift for a given target
75 
76  double fhbarc; ///< hbar*c in GeV*fm
77 
78  // mutable for testing purposes only!
79  mutable bool fRPA; ///< use RPA corrections
80  bool fCoulomb; ///< use Coulomb corrections
81 
82  const NuclearModelI* fNuclModel; ///< Nuclear Model for integration
83  // Detect whether the nuclear model is local Fermi gas, and store
84  // the relativistic Fermi momentum table if not
85  bool fLFG;
87  string fKFTableName;
88 
89  /// Enum specifying the method to use when calculating the binding energy of
90  /// the initial hit nucleon during spline generation
92 
93  /// Cutoff lab-frame probe energy above which the effects of Fermi motion and
94  /// binding energy are ignored when computing the total cross section
95  double fEnergyCutOff;
96 
97  /// Whether to apply Pauli blocking in XSec()
99  /// The PauliBlocker instance to use to apply that correction
101 
102  /// Nuclear radius parameter r = R0*A^(1/3) used to compute the
103  /// maximum radius for integration of the Coulomb potential
104  /// when matching the VertexGenerator method
105  double fR0;
106 
107  /// Scaling factor for the Coulomb potential
109 
110  /// Enum variable describing which method of computing Rmax should be used
111  /// for integrating the Coulomb potential
112  Nieves_Coulomb_Rmax_t fCoulombRmaxMode;
113 
114  //Functions needed to calculate XSec:
115 
116  // Calculates values of CN, CT, CL, and imU, and stores them in the provided
117  // variables. If target is not a nucleus, then CN, CN, and CL are all 1.0.
118  // r must be in units of fm.
119  void CNCTCLimUcalc(TLorentzVector qTildeP4, double M, double r,
120  bool is_neutrino, bool tgtIsNucleus, int tgt_pdgc, int A, int Z, int N,
121  bool hitNucIsProton, double & CN, double & CT, double & CL, double & imU,
122  double & t0, double & r00, bool assumeFreeNucleon) const;
123 
124  //Equations to calculate the relativistic Lindhard function for Amunu
125  std::complex<double> relLindhardIm(double q0gev, double dqgev,
126  double kFngev, double kFpgev,
127  double M, bool isNeutrino,
128  double & t0, double & r00) const;
129  std::complex<double> relLindhard(double q0gev, double dqgev,
130  double kFgev, double M,
131  bool isNeutrino,
132  std::complex<double> relLindIm) const;
133  std::complex<double> ruLinRelX(double q0, double qm,
134  double kf, double m) const;
135  std::complex<double> deltaLindhard(double q0gev, double dqgev,
136  double rho, double kFgev) const;
137 
138  // Potential for coulomb correction
139  double vcr(const Target * target, double r) const;
140 
141  //input must be length 4. Returns 1 if input is an even permutation of 0123,
142  //-1 if input is an odd permutation of 0123, and 0 if any two elements
143  //are equal
144  int leviCivita(int input[]) const;
145 
146  double LmunuAnumu(const TLorentzVector neutrinoMom,
147  const TLorentzVector inNucleonMom, const TLorentzVector leptonMom,
148  const TLorentzVector outNucleonMom, double M, bool is_neutrino,
149  const Target& target, bool assumeFreeNucleon) const;
150 
151  // NOTE: THE FOLLOWING CODE IS FOR TESTING PURPOSES ONLY
152  // Used to print tensor elements and various inputs for comparison to Nieves'
153  // fortran code
154  mutable bool fCompareNievesTensors; ///< print tensors
155  mutable TString fTensorsOutFile; ///< file to print tensors to
156  mutable double fVc,fCoulombFactor;
157  void CompareNievesTensors(const Interaction* i) const;
158  // END TESTING CODE
159 };
160 } // genie namespace
161 
162 //____________________________________________________________________________
163 /*!
164 \class genie::utils::gsl::wrap::NievesQELIntegrand
165 
166 \brief Auxiliary scalar function for integration over the nuclear density
167  when calculaing the Coulomb correction in the Nieves QEL xsec model
168 
169 \author Joe Johnston, University of Pittsburgh
170  Steven Dytman, University of Pittsburgh
171 
172 \created June 03, 2016
173 */
174 //____________________________________________________________________________
175 
176 namespace genie {
177  namespace utils {
178  namespace gsl {
179  namespace wrap {
180 
181  class NievesQELvcrIntegrand : public ROOT::Math::IBaseFunctionOneDim
182  {
183  public:
184  NievesQELvcrIntegrand(double Rcurr, int A, int Z);
186  // ROOT::Math::IBaseFunctionOneDim interface
187  unsigned int NDim (void) const;
188  double DoEval (double rin) const;
189  ROOT::Math::IBaseFunctionOneDim * Clone (void) const;
190  private:
191  double fRcurr;
192  double fA;
193  double fZ;
194  };
195 
196  } // wrap namespace
197  } // gsl namespace
198  } // utils namespace
199 } // genie namespace
200 
201 
202 #endif
code to link reconstructed objects back to the MC truth information
Cross Section Calculation Interface.
double XSec(const Interaction *i, KinePhaseSpace_t k) const
Compute the cross section for the input interaction.
const QvalueShifter * fQvalueShifter
Optional algorithm to retrieve the qvalue shift for a given target.
std::complex< double > ruLinRelX(double q0, double qm, double kf, double m) const
bool fRPA
use RPA corrections
A class holding Quasi Elastic (QEL) Form Factors.
void Configure(const Registry &config)
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
Cross Section Integrator Interface.
enum genie::EQELRmax Nieves_Coulomb_Rmax_t
QELEvGen_BindingMode_t fIntegralNucleonBindingMode
const FermiMomentumTable * fKFTable
void CNCTCLimUcalc(TLorentzVector qTildeP4, double M, double r, bool is_neutrino, bool tgtIsNucleus, int tgt_pdgc, int A, int Z, int N, bool hitNucIsProton, double &CN, double &CT, double &CL, double &imU, double &t0, double &r00, bool assumeFreeNucleon) const
Examines whether the generated event should be Pauli blocked. Is a concerete implementation of the Ev...
Definition: PauliBlocker.h:36
const XSecIntegratorI * fXSecIntegrator
Pure abstract base class. Defines the NuclearModelI interface to be implemented by any physics model ...
Definition: NuclearModelI.h:46
A table of Fermi momentum constants.
QELFormFactors fFormFactors
double fCoulombScale
Scaling factor for the Coulomb potential.
bool fCoulomb
use Coulomb corrections
enum genie::EKinePhaseSpace KinePhaseSpace_t
enum genie::EQELEvGenBindingMode QELEvGen_BindingMode_t
Nieves_Coulomb_Rmax_t fCoulombRmaxMode
std::complex< double > deltaLindhard(double q0gev, double dqgev, double rho, double kFgev) const
const QELFormFactorsModelI * fFormFactorsModel
double fhbarc
hbar*c in GeV*fm
double fCos8c2
cos^2(cabibbo angle)
Summary information for an interaction.
Definition: Interaction.h:56
const NuclearModelI * fNuclModel
Nuclear Model for integration.
Pure abstract base class. Defines the QELFormFactorsModelI interface to be implemented by any algorit...
static int input(void)
Definition: code.cpp:15695
static Config * config
Definition: config.cpp:1054
bool fCompareNievesTensors
print tensors
double Integral(const Interaction *i) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
bool fDoPauliBlocking
Whether to apply Pauli blocking in XSec()
double fXSecScale
external xsec scaling factor
Computes neutrino-nucleon(nucleus) QELCC differential cross section with RPA corrections Is a concret...
double vcr(const Target *target, double r) const
TString fTensorsOutFile
file to print tensors to
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
Definition: utils.py:1
int leviCivita(int input[]) const
void CompareNievesTensors(const Interaction *i) const
bool ValidProcess(const Interaction *i) const
Can this cross section algorithm handle the input process?
std::complex< double > relLindhard(double q0gev, double dqgev, double kFgev, double M, bool isNeutrino, std::complex< double > relLindIm) const
double LmunuAnumu(const TLorentzVector neutrinoMom, const TLorentzVector inNucleonMom, const TLorentzVector leptonMom, const TLorentzVector outNucleonMom, double M, bool is_neutrino, const Target &target, bool assumeFreeNucleon) const
const genie::PauliBlocker * fPauliBlocker
The PauliBlocker instance to use to apply that correction.
std::complex< double > relLindhardIm(double q0gev, double dqgev, double kFngev, double kFpgev, double M, bool isNeutrino, double &t0, double &r00) const