141 double DNuEnergy = xin;
146 double E_nu = P4_nu->E();
149 double ETimesM = E_nu * M_target;
150 double EPlusM = E_nu + M_target;
152 double p_DNu = TMath::Sqrt(DNuEnergy*DNuEnergy - fDNuMass2);
153 double cos_theta_DNu = (DNuEnergy*(EPlusM) - ETimesM - 0.5*fDNuMass2) / (E_nu * p_DNu);
154 double theta_DNu = TMath::ACos(cos_theta_DNu);
155 TVector3 DNu_3vector = TVector3(0,0,0);
156 DNu_3vector.SetMagThetaPhi(p_DNu, theta_DNu, 0.);
157 TLorentzVector P4_DNu = TLorentzVector(DNu_3vector, DNuEnergy);
160 TVector3 target_3vector = P4_nu->Vect() - DNu_3vector;
161 double E_target = E_nu + M_target - DNuEnergy;
162 TLorentzVector P4_target = TLorentzVector(target_3vector , E_target);
164 kinematics->
SetQ2(2.*M_target*(E_target-M_target));
168 #ifdef __GENIE_LOW_LEVEL_MESG_ENABLED__ 169 LOG(
"GSLXSecFunc",
pDEBUG) <<
"xsec(DNuEnergy = " << DNuEnergy <<
") = " << xsec;
const Interaction * fInteraction
void SetQ2(double Q2, bool selected=false)
Kinematics * KinePtr(void) const
virtual double XSec(const Interaction *i, KinePhaseSpace_t k=kPSfE) const =0
Compute the cross section for the input interaction.
Generated/set kinematical variables for an event.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void SetFSLeptonP4(const TLorentzVector &p4)
static constexpr double cm2
const XSecAlgorithmI * fModel
void SetHadSystP4(const TLorentzVector &p4)
InitialState * InitStatePtr(void) const
const InitialState & InitState(void) const
const Target & Tgt(void) const
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const