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::d3XSecMK_dWQ2CosTheta_E Class Reference

#include <SPPXSecWithCache.h>

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

Public Member Functions

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

Private Attributes

const XSecAlgorithmIfModel
 
InteractionfInteraction
 
Range1D_t Wl
 
bool isZero
 
KPhaseSpacekps
 
double fWcut
 

Detailed Description

Definition at line 78 of file SPPXSecWithCache.h.

Constructor & Destructor Documentation

genie::utils::gsl::d3XSecMK_dWQ2CosTheta_E::d3XSecMK_dWQ2CosTheta_E ( const XSecAlgorithmI m,
const Interaction i,
double  wcut 
)

Definition at line 218 of file SPPXSecWithCache.cxx.

References fInteraction, fWcut, isZero, genie::kISkipKinematicChk, genie::kISkipProcessChk, kps, genie::kRfHitNucRest, genie::Range1D_t::max, genie::Range1D_t::min, genie::Interaction::PhaseSpacePtr(), genie::InitialState::ProbeE(), Wl, and genie::KPhaseSpace::WLim_SPP_iso().

219  :
220  ROOT::Math::IBaseFunctionMultiDim(),
221  fModel(m),
222  fWcut(wcut)
223 {
224 
225  isZero = false;
226  fInteraction = const_cast<Interaction*>(interaction);
229 
231 
232  // Get kinematical parameters
233  const InitialState & init_state = interaction -> InitState();
234  double Enu = init_state.ProbeE(kRfHitNucRest);
235 
236 
237  if (Enu < kps->Threshold_SPP_iso())
238  {
239  isZero = true;
240  return;
241  }
242 
243  Wl = kps->WLim_SPP_iso();
244  if (fWcut >= Wl.min)
245  Wl.max = TMath::Min(fWcut,Wl.max);
246 
247 
248 }
KPhaseSpace * PhaseSpacePtr(void) const
Definition: Interaction.h:78
Summary information for an interaction.
Definition: Interaction.h:56
const UInt_t kISkipKinematicChk
if set, skip kinematic validity checks
Definition: Interaction.h:48
double max
Definition: Range1.h:53
Range1D_t WLim_SPP_iso(void) const
W limits for resonance single pion production on isoscalar nucleon.
double min
Definition: Range1.h:52
double ProbeE(RefFrame_t rf) const
const UInt_t kISkipProcessChk
if set, skip process validity checks
Definition: Interaction.h:47
Initial State information.
Definition: InitialState.h:48
genie::utils::gsl::d3XSecMK_dWQ2CosTheta_E::~d3XSecMK_dWQ2CosTheta_E ( )

Definition at line 249 of file SPPXSecWithCache.cxx.

250 {
251 
252 }

Member Function Documentation

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

Definition at line 257 of file SPPXSecWithCache.cxx.

References genie::units::cm2, genie::kKVctp, genie::kPSWQ2ctpfE, genie::Range1D_t::max, and genie::Range1D_t::min.

258 {
259  // outputs:
260  // differential cross section [1/GeV^3] for Resonance single pion production production
261  //
262 
263  if (isZero) return 0.;
264 
265  double W2 = Wl.min*Wl.min + (Wl.max*Wl.max - Wl.min*Wl.min)*xin[0];
266  fInteraction->KinePtr()->SetW(TMath::Sqrt(W2));
267 
268  Range1D_t Q2l = kps->Q2Lim_W_SPP_iso();
269 
270  double sqrt_Q2 = TMath::Sqrt(Q2l.min) + ( TMath::Sqrt(Q2l.max) - TMath::Sqrt(Q2l.min) )*xin[1];
271  fInteraction->KinePtr()->SetQ2(sqrt_Q2*sqrt_Q2);
272 
273  fInteraction->KinePtr()->SetKV(kKVctp, -1. + 2.*xin[2]); //CosTheta
274 
275  double xsec = fModel->XSec(fInteraction, kPSWQ2ctpfE)*sqrt_Q2*(Wl.max*Wl.max - Wl.min*Wl.min)*(TMath::Sqrt(Q2l.max) - TMath::Sqrt(Q2l.min))*2/TMath::Sqrt(W2);
276  return xsec/(1E-38 * units::cm2);
277 }
void SetQ2(double Q2, bool selected=false)
Definition: Kinematics.cxx:255
Kinematics * KinePtr(void) const
Definition: Interaction.h:76
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Range1D_t Q2Lim_W_SPP_iso(void) const
Q2 limits @ fixed W for resonance single pion production on isoscalar nucleon.
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
void SetW(double W, bool selected=false)
Definition: Kinematics.cxx:279
double min
Definition: Range1.h:52
unsigned int genie::utils::gsl::d3XSecMK_dWQ2CosTheta_E::NDim ( void  ) const

Definition at line 253 of file SPPXSecWithCache.cxx.

254 {
255  return 3;
256 }

Member Data Documentation

Interaction* genie::utils::gsl::d3XSecMK_dWQ2CosTheta_E::fInteraction
private

Definition at line 91 of file SPPXSecWithCache.h.

Referenced by d3XSecMK_dWQ2CosTheta_E().

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

Definition at line 90 of file SPPXSecWithCache.h.

double genie::utils::gsl::d3XSecMK_dWQ2CosTheta_E::fWcut
private

Definition at line 95 of file SPPXSecWithCache.h.

Referenced by d3XSecMK_dWQ2CosTheta_E().

bool genie::utils::gsl::d3XSecMK_dWQ2CosTheta_E::isZero
private

Definition at line 93 of file SPPXSecWithCache.h.

Referenced by d3XSecMK_dWQ2CosTheta_E().

KPhaseSpace* genie::utils::gsl::d3XSecMK_dWQ2CosTheta_E::kps
private

Definition at line 94 of file SPPXSecWithCache.h.

Referenced by d3XSecMK_dWQ2CosTheta_E().

Range1D_t genie::utils::gsl::d3XSecMK_dWQ2CosTheta_E::Wl
private

Definition at line 92 of file SPPXSecWithCache.h.

Referenced by d3XSecMK_dWQ2CosTheta_E().


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