@@ -922,11 +922,36 @@ int NievesQELCCPXSec::leviCivita(int input[]) const{
922922// Calculates the constraction of the leptonic and hadronic tensors. The
923923// expressions used here are valid in a frame in which the
924924// initial nucleus is at rest, and qTilde must be in the z direction.
925- double NievesQELCCPXSec::LmunuAnumu (const TLorentzVector neutrinoMom ,
926- const TLorentzVector inNucleonMomOnShell , const TLorentzVector leptonMom ,
927- const TLorentzVector qTildeP4 , double M, bool is_neutrino,
925+ double NievesQELCCPXSec::LmunuAnumu (const TLorentzVector neutrinoMom1 ,
926+ const TLorentzVector inNucleonMomOnShell1 , const TLorentzVector leptonMom1 ,
927+ const TLorentzVector qTildeP41 , double M, bool is_neutrino,
928928const Target& target, bool assumeFreeNucleon) const
929929{
930+
931+ // copy the const value to do the transfermation
932+ TLorentzVector neutrinoMom = neutrinoMom1;
933+ TLorentzVector inNucleonMomOnShell = inNucleonMomOnShell1;
934+ TLorentzVector qTildeP4 = qTildeP41;
935+ TLorentzVector leptonMom = leptonMom1;
936+
937+ // Boost to nucleon rest frame to calculate the nucleon rest frame cross section
938+ TVector3 beta = -1.0 * inNucleonMomOnShell.BoostVector (); // boost from lab to nucRest
939+ neutrinoMom.Boost (beta);
940+ leptonMom.Boost (beta);
941+ qTildeP4.Boost (beta);
942+ inNucleonMomOnShell.Boost (beta);
943+
944+ // Find the rotation angle needed to put q3VecTilde along z
945+ TVector3 zvec (0.0 , 0.0 , 1.0 );
946+ TVector3 rot = ( qTildeP4.Vect ().Cross (zvec) ).Unit (); // Vector to rotate about
947+ // Angle between the z direction and q
948+ double angle = zvec.Angle ( qTildeP4.Vect () );
949+
950+ neutrinoMom.Rotate (angle, rot);
951+ leptonMom.Rotate (angle, rot);
952+ qTildeP4.Rotate (angle, rot);
953+ inNucleonMomOnShell.Rotate (angle, rot);
954+
930955 double r = target.HitNucPosition ();
931956 bool tgtIsNucleus = target.IsNucleus ();
932957 int tgt_pdgc = target.Pdg ();
0 commit comments