Public Member Functions | Private Attributes | List of all members
genie::utils::gsl::d5XSecAR Class Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/genie/v3_00_06_p01/Linux64bit+2.6-2.12-e17-debug/GENIE-Generator/src/Physics/XSectionIntegration/GSLXSecFunc.h"

Inheritance diagram for genie::utils::gsl::d5XSecAR:

Public Member Functions

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

Private Attributes

const XSecAlgorithmIfModel
 
const InteractionfInteraction
 
bool flip
 

Detailed Description

Definition at line 274 of file GSLXSecFunc.h.

Constructor & Destructor Documentation

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

Definition at line 473 of file GSLXSecFunc.cxx.

474  :
475 ROOT::Math::IBaseFunctionMultiDim(),
476 fModel(m),
477 fInteraction(i),
478 flip(false)
479 {
480 
481 }
const Interaction * fInteraction
Definition: GSLXSecFunc.h:287
const XSecAlgorithmI * fModel
Definition: GSLXSecFunc.h:286
genie::utils::gsl::d5XSecAR::~d5XSecAR ( )

Definition at line 482 of file GSLXSecFunc.cxx.

483 {
484 }

Member Function Documentation

ROOT::Math::IBaseFunctionMultiDim * genie::utils::gsl::d5XSecAR::Clone ( void  ) const

Definition at line 564 of file GSLXSecFunc.cxx.

References fInteraction, and fModel.

565 {
566  return
568 }
const Interaction * fInteraction
Definition: GSLXSecFunc.h:287
const XSecAlgorithmI * fModel
Definition: GSLXSecFunc.h:286
double genie::utils::gsl::d5XSecAR::DoEval ( const double *  xin) const

Definition at line 490 of file GSLXSecFunc.cxx.

References fInteraction, flip, fModel, genie::Interaction::FSPrimLepton(), genie::InitialState::GetProbeP4(), genie::Interaction::InitStatePtr(), genie::ProcessInfo::IsWeakCC(), kinematics(), genie::Interaction::KinePtr(), genie::constants::kNucleonMass, genie::constants::kPi0Mass, genie::constants::kPionMass, genie::kRfLab, Mag2(), genie::Range1D_t::max, genie::Interaction::PhaseSpace(), genie::Interaction::ProcInfo(), genie::utils::kinematics::Q2(), genie::Kinematics::SetFSLeptonP4(), genie::Kinematics::SetHadSystP4(), genie::Kinematics::Setx(), genie::Kinematics::Sety(), ana::Sqrt(), genie::utils::kinematics::UpdateWQ2FromXY(), submit_syst::x, genie::KPhaseSpace::XLim(), genie::XSecAlgorithmI::XSec(), xsec, and submit_syst::y.

491 {
492 // inputs:
493 // x [-]
494 // y [-]
495 // outputs:
496 // differential cross section [10^-38 cm^2]
497 //
498 
500  const TLorentzVector * P4_nu = fInteraction->InitStatePtr()->GetProbeP4(kRfLab);
501  double E_nu = P4_nu->E();
502 
503  double E_l = xin[0];
504  double theta_l = xin[1];
505  double phi_l = xin[2];
506  double theta_pi = xin[3];
507  double phi_pi = xin[4];
508 
509  double E_pi= E_nu-E_l;
510 
511  double y = E_pi/E_nu;
512 
513  double m_l = fInteraction->FSPrimLepton()->Mass();
514  if (E_l < m_l) {
515  return 0.;
516  }
517 
518  double m_pi;
519  if ( fInteraction->ProcInfo().IsWeakCC() ) {
520  m_pi = constants::kPionMass;
521  }
522  else {
523  m_pi = constants::kPi0Mass;
524  }
525 
526 
527  double p_l = TMath::Sqrt(E_l*E_l - m_l*m_l);
528  TVector3 lepton_3vector = TVector3(0,0,0);
529  lepton_3vector.SetMagThetaPhi(p_l,theta_l,phi_l);
530  TLorentzVector P4_lep = TLorentzVector(lepton_3vector , E_l );
531 
532  double p_pi = TMath::Sqrt(E_pi*E_pi - m_pi*m_pi);
533  TVector3 pion_3vector = TVector3(0,0,0);
534  pion_3vector.SetMagThetaPhi(p_pi,theta_pi,phi_pi);
535  TLorentzVector P4_pion = TLorentzVector(pion_3vector , E_pi);
536 
537  double Q2 = -(*P4_nu-P4_lep).Mag2();
538 
539  double x = Q2/(2*E_pi*constants::kNucleonMass);
540 
542 
543  if ( x < xlim.min || x > xlim.max ) {
544  return 0.;
545  }
546 
547  kinematics->Setx(x);
548  kinematics->Sety(y);
550 
551  kinematics->SetFSLeptonP4(P4_lep );
552  kinematics->SetHadSystP4 (P4_pion); // use Hadronic System variable to store pion momentum
553 
554  double xsec = fModel->XSec(fInteraction);
555  if (xsec>0 && flip) {
556  xsec = xsec*-1.0;
557  }
558  delete P4_nu;
559  //return xsec/(1E-38 * units::cm2);
560  return xsec;
561 }
const KPhaseSpace & PhaseSpace(void) const
Definition: Interaction.h:73
bool IsWeakCC(void) const
static const double kNucleonMass
Definition: Constants.h:78
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:991
Kinematics * KinePtr(void) const
Definition: Interaction.h:76
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
A simple [min,max] interval for doubles.
Definition: Range1.h:43
static const double kPi0Mass
Definition: Constants.h:75
Generated/set kinematical variables for an event.
Definition: Kinematics.h:40
void SetFSLeptonP4(const TLorentzVector &p4)
Definition: Kinematics.cxx:307
Double_t xsec[nknots]
Definition: testXsec.C:47
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const Interaction * fInteraction
Definition: GSLXSecFunc.h:287
void Setx(double x, bool selected=false)
Definition: Kinematics.cxx:241
float Mag2() const
void UpdateWQ2FromXY(const Interaction *in)
Definition: KineUtils.cxx:1185
double max
Definition: Range1.h:54
static const double kPionMass
Definition: Constants.h:74
Var Sqrt(const Var &v)
Use to take sqrt of a var.
Definition: Var.cxx:326
const XSecAlgorithmI * fModel
Definition: GSLXSecFunc.h:286
void Sety(double y, bool selected=false)
Definition: Kinematics.cxx:253
void SetHadSystP4(const TLorentzVector &p4)
Definition: Kinematics.cxx:317
InitialState * InitStatePtr(void) const
Definition: Interaction.h:74
Range1D_t XLim(void) const
x limits
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
void kinematics()
Definition: kinematics.C:10
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
unsigned int genie::utils::gsl::d5XSecAR::NDim ( void  ) const

Definition at line 486 of file GSLXSecFunc.cxx.

487 {
488  return 5;
489 }
void genie::utils::gsl::d5XSecAR::SetFlip ( bool  b)
inline

Definition at line 283 of file GSLXSecFunc.h.

References b.

283 { flip = b; }
const hit & b
Definition: hits.cxx:21

Member Data Documentation

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

Definition at line 287 of file GSLXSecFunc.h.

Referenced by Clone(), and DoEval().

bool genie::utils::gsl::d5XSecAR::flip
private

Definition at line 288 of file GSLXSecFunc.h.

Referenced by DoEval().

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

Definition at line 286 of file GSLXSecFunc.h.

Referenced by Clone(), and DoEval().


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