GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
genie::utils::gsl::d2Xsec_dQ2dv Class Reference

#include <SmithMonizQELCCXSec.h>

Inheritance diagram for genie::utils::gsl::d2Xsec_dQ2dv:
Inheritance graph
[legend]
Collaboration diagram for genie::utils::gsl::d2Xsec_dQ2dv:
Collaboration graph
[legend]

Public Member Functions

 d2Xsec_dQ2dv (const XSecAlgorithmI *m, const Interaction *i)
 
 ~d2Xsec_dQ2dv ()
 
unsigned int NDim (void) const
 
double DoEval (const double *xin) const
 
ROOT::Math::IBaseFunctionMultiDim * Clone (void) const
 

Private Attributes

const XSecAlgorithmIfModel
 
const InteractionfInteraction
 
SmithMonizUtilssm_utils
 
Range1D_t rQ2
 

Detailed Description

Definition at line 79 of file SmithMonizQELCCXSec.h.

Constructor & Destructor Documentation

genie::utils::gsl::d2Xsec_dQ2dv::d2Xsec_dQ2dv ( const XSecAlgorithmI m,
const Interaction i 
)

Definition at line 167 of file SmithMonizQELCCXSec.cxx.

References genie::AlgFactory::GetAlgorithm(), genie::AlgFactory::Instance(), genie::SmithMonizUtils::Q2QES_SM_lim(), rQ2, genie::SmithMonizUtils::SetInteraction(), and sm_utils.

167  :
168 ROOT::Math::IBaseFunctionMultiDim(),
169 fModel(m),
170 fInteraction(interaction)
171 {
172  AlgFactory * algf = AlgFactory::Instance();
173  sm_utils = const_cast<genie::SmithMonizUtils *>(dynamic_cast<const genie::SmithMonizUtils *>(algf->GetAlgorithm("genie::SmithMonizUtils","Default")));
174  sm_utils->SetInteraction(interaction);
176 }
void SetInteraction(const Interaction *i)
Range1D_t Q2QES_SM_lim(void) const
const Algorithm * GetAlgorithm(const AlgId &algid)
Definition: AlgFactory.cxx:75
Contains auxiliary functions for Smith-Moniz model. .
static AlgFactory * Instance()
Definition: AlgFactory.cxx:64
The GENIE Algorithm Factory.
Definition: AlgFactory.h:39
genie::utils::gsl::d2Xsec_dQ2dv::~d2Xsec_dQ2dv ( )

Definition at line 178 of file SmithMonizQELCCXSec.cxx.

179 {
180 
181 }

Member Function Documentation

ROOT::Math::IBaseFunctionMultiDim * genie::utils::gsl::d2Xsec_dQ2dv::Clone ( void  ) const
double genie::utils::gsl::d2Xsec_dQ2dv::DoEval ( const double *  xin) const

Definition at line 188 of file SmithMonizQELCCXSec.cxx.

References genie::units::cm2, genie::utils::mec::J(), genie::kKVQ2, genie::kKVv, genie::kPSQ2vfE, genie::Range1D_t::min, genie::utils::kinematics::Q2(), and genie::Kinematics::SetKV().

189 {
190 // inputs:
191 // normalized Q2 from 0 to 1
192 // normalized v from 0 to 1
193 // outputs:
194 // differential cross section [10^-38 cm^2]
195 //
196 
197  double Q2 = (rQ2.max-rQ2.min)*xin[0]+rQ2.min;
198  Range1D_t rv = sm_utils->vQES_SM_lim(Q2);
199  double v = (rv.max-rv.min)*xin[1]+rv.min;
200  double J = (rQ2.max-rQ2.min)*(rv.max-rv.min); // Jacobian for transformation
201 
202  Kinematics * kinematics = fInteraction->KinePtr();
203  kinematics->SetKV(kKVQ2, Q2);
204  kinematics->SetKV(kKVv, v);
205 
206  double xsec=fModel->XSec(fInteraction, kPSQ2vfE);
207 
208  xsec *= J;
209 
210  return xsec/(1E-38 * units::cm2);
211 }
double J(double q0, double q3, double Enu, double ml)
Definition: MECUtils.cxx:147
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1077
Kinematics * KinePtr(void) const
Definition: Interaction.h:76
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
Range1D_t vQES_SM_lim(double Q2) const
static constexpr double cm2
Definition: Units.h:69
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
void SetKV(KineVar_t kv, double value)
Definition: Kinematics.cxx:335
double max
Definition: Range1.h:53
double min
Definition: Range1.h:52
unsigned int genie::utils::gsl::d2Xsec_dQ2dv::NDim ( void  ) const

Definition at line 183 of file SmithMonizQELCCXSec.cxx.

184 {
185  return 2;
186 }

Member Data Documentation

const Interaction* genie::utils::gsl::d2Xsec_dQ2dv::fInteraction
private

Definition at line 91 of file SmithMonizQELCCXSec.h.

const XSecAlgorithmI* genie::utils::gsl::d2Xsec_dQ2dv::fModel
private

Definition at line 90 of file SmithMonizQELCCXSec.h.

Range1D_t genie::utils::gsl::d2Xsec_dQ2dv::rQ2
private

Definition at line 93 of file SmithMonizQELCCXSec.h.

Referenced by d2Xsec_dQ2dv().

SmithMonizUtils* genie::utils::gsl::d2Xsec_dQ2dv::sm_utils
mutableprivate

Definition at line 92 of file SmithMonizQELCCXSec.h.

Referenced by d2Xsec_dQ2dv().


The documentation for this class was generated from the following files: