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

#include <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 325 of file GSLXSecFunc.h.

Constructor & Destructor Documentation

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

Definition at line 598 of file GSLXSecFunc.cxx.

599  :
600 ROOT::Math::IBaseFunctionMultiDim(),
601 fModel(m),
602 fInteraction(i),
603 flip(false)
604 {
605 
606 }
const Interaction * fInteraction
Definition: GSLXSecFunc.h:338
const XSecAlgorithmI * fModel
Definition: GSLXSecFunc.h:337
genie::utils::gsl::d5XSecAR::~d5XSecAR ( )

Definition at line 607 of file GSLXSecFunc.cxx.

608 {
609 }

Member Function Documentation

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

Definition at line 689 of file GSLXSecFunc.cxx.

690 {
691  return
693 }
const Interaction * fInteraction
Definition: GSLXSecFunc.h:338
const XSecAlgorithmI * fModel
Definition: GSLXSecFunc.h:337
double genie::utils::gsl::d5XSecAR::DoEval ( const double *  xin) const

Definition at line 615 of file GSLXSecFunc.cxx.

616 {
617 // inputs:
618 // x [-]
619 // y [-]
620 // outputs:
621 // differential cross section [10^-38 cm^2]
622 //
623 
624  Kinematics * kinematics = fInteraction->KinePtr();
625  const TLorentzVector * P4_nu = fInteraction->InitStatePtr()->GetProbeP4(kRfLab);
626  double E_nu = P4_nu->E();
627 
628  double E_l = xin[0];
629  double theta_l = xin[1];
630  double phi_l = xin[2];
631  double theta_pi = xin[3];
632  double phi_pi = xin[4];
633 
634  double E_pi= E_nu-E_l;
635 
636  double y = E_pi/E_nu;
637 
638  double m_l = fInteraction->FSPrimLepton()->Mass();
639  if (E_l < m_l) {
640  return 0.;
641  }
642 
643  double m_pi;
644  if ( fInteraction->ProcInfo().IsWeakCC() ) {
645  m_pi = constants::kPionMass;
646  }
647  else {
648  m_pi = constants::kPi0Mass;
649  }
650 
651 
652  double p_l = TMath::Sqrt(E_l*E_l - m_l*m_l);
653  TVector3 lepton_3vector = TVector3(0,0,0);
654  lepton_3vector.SetMagThetaPhi(p_l,theta_l,phi_l);
655  TLorentzVector P4_lep = TLorentzVector(lepton_3vector , E_l );
656 
657  double p_pi = TMath::Sqrt(E_pi*E_pi - m_pi*m_pi);
658  TVector3 pion_3vector = TVector3(0,0,0);
659  pion_3vector.SetMagThetaPhi(p_pi,theta_pi,phi_pi);
660  TLorentzVector P4_pion = TLorentzVector(pion_3vector , E_pi);
661 
662  double Q2 = -(*P4_nu-P4_lep).Mag2();
663 
664  double x = Q2/(2*E_pi*constants::kNucleonMass);
665 
667 
668  if ( x < xlim.min || x > xlim.max ) {
669  return 0.;
670  }
671 
672  kinematics->Setx(x);
673  kinematics->Sety(y);
675 
676  kinematics->SetFSLeptonP4(P4_lep );
677  kinematics->SetHadSystP4 (P4_pion); // use Hadronic System variable to store pion momentum
678 
679  double xsec = fModel->XSec(fInteraction);
680  if (xsec>0 && flip) {
681  xsec = xsec*-1.0;
682  }
683  delete P4_nu;
684  //return xsec/(1E-38 * units::cm2);
685  return xsec;
686 }
double m_pi
const KPhaseSpace & PhaseSpace(void) const
Definition: Interaction.h:73
bool IsWeakCC(void) const
static const double kNucleonMass
Definition: Constants.h:77
double Q2(const Interaction *const i)
Definition: KineUtils.cxx:1064
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:42
static const double kPi0Mass
Definition: Constants.h:74
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
void SetFSLeptonP4(const TLorentzVector &p4)
Definition: Kinematics.cxx:297
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const Interaction * fInteraction
Definition: GSLXSecFunc.h:338
void Setx(double x, bool selected=false)
Definition: Kinematics.cxx:231
void UpdateWQ2FromXY(const Interaction *in)
Definition: KineUtils.cxx:1277
double max
Definition: Range1.h:53
static const double kPionMass
Definition: Constants.h:73
const XSecAlgorithmI * fModel
Definition: GSLXSecFunc.h:337
void Sety(double y, bool selected=false)
Definition: Kinematics.cxx:243
void SetHadSystP4(const TLorentzVector &p4)
Definition: Kinematics.cxx:307
InitialState * InitStatePtr(void) const
Definition: Interaction.h:74
Range1D_t XLim(void) const
x limits
const ProcessInfo & ProcInfo(void) const
Definition: Interaction.h:70
list x
Definition: train.py:276
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
unsigned int genie::utils::gsl::d5XSecAR::NDim ( void  ) const

Definition at line 611 of file GSLXSecFunc.cxx.

612 {
613  return 5;
614 }
void genie::utils::gsl::d5XSecAR::SetFlip ( bool  b)
inline

Definition at line 334 of file GSLXSecFunc.h.

334 { flip = b; }
static bool * b
Definition: config.cpp:1043

Member Data Documentation

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

Definition at line 338 of file GSLXSecFunc.h.

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

Definition at line 339 of file GSLXSecFunc.h.

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

Definition at line 337 of file GSLXSecFunc.h.


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