15 #include <TLorentzVector.h> 32 using namespace genie;
69 TLorentzVector * p4v = evrec->
Probe()->
GetP4();
73 double Q2 = interaction->
Kine().
Q2(
true);
74 double y = interaction->
Kine().
y(
true);
77 double ml2 = TMath::Power(ml,2);
78 double pv = TMath::Sqrt(TMath::Max(0.,Ev*Ev - ml2));
81 <<
"Ev = " << Ev <<
", Q2 = " << Q2 <<
", y = " <<
y;
85 double El = Ev * (1. -
y);
86 double plp = (2.*Ev*El - 2.*ml2 -
Q2) / (2.*pv);
87 double plt = TMath::Sqrt(TMath::Max(0.,El*El-plp*plp-ml2));
90 <<
"fsl: E = " << El <<
", |p//| = " << plp <<
", [pT] = " << plt;
94 double phi = 2*
kPi * rnd->
RndLep().Rndm();
95 double pltx = plt * TMath::Cos(phi);
96 double plty = plt * TMath::Sin(phi);
99 TVector3 unit_nudir = p4v->Vect().Unit();
103 TVector3 p3l(pltx,plty,plp);
104 p3l.RotateUz(unit_nudir);
107 TLorentzVector p4l(p3l,El);
138 const TLorentzVector & pnuc4 = init_state.
Tgt().
HitNucP4();
139 TVector3
beta = pnuc4.BoostVector();
145 GHepRecord * evrec,
int pdgc,
const TLorentzVector & p4)
const 155 const TLorentzVector & vtx = *(mom->
X4());
157 TLorentzVector x4l(vtx);
158 TLorentzVector p4l(p4);
169 <<
"Correcting f/s lepton energy for Coulomb effects";
172 double Z = nucltgt->
Z();
173 double A = nucltgt->
A();
176 double Rc = (1.1*TMath::Power(A,1./3.) + 0.86*TMath::Power(A,-1./3.))/0.197;
179 double Vo = 3*
kAem*Z/(2*Rc);
182 double Elo = p4l.Energy();
183 double e = TMath::Min(Vo, Elo-m);
184 double El = TMath::Max(0., Elo-e);
187 <<
"Lepton energy subtraction: E = " << Elo <<
" --> " << El;
189 double pmag_old = p4l.P();
191 double scale = pmag_new / pmag_old;
193 <<
"|pnew| = " << pmag_new <<
", |pold| = " << pmag_old
194 <<
", scale = " << scale;
196 double pxl = scale * p4l.Px();
197 double pyl = scale * p4l.Py();
198 double pzl = scale * p4l.Pz();
200 p4l.SetPxPyPzE(pxl,pyl,pzl,El);
202 TLorentzVector p4c = p4 - p4l;
203 TLorentzVector x4dummy(0,0,0,0);;
227 <<
"Final state lepton not set yet! \n" << *ev;
232 TVector3 plab(fsl->
Px(), fsl->
Py(), fsl->
Pz());
236 int pdgc = fsl->
Pdg();
243 <<
"Setting polarization angles for particle: " << fsl->
Name();
double beta(double KE, const simb::MCParticle *part)
bool IsNeutrino(int pdgc)
THE MAIN GENIE PROJECT NAMESPACE
TRandom3 & RndLep(void) const
rnd number generator used by final state primary lepton generators
double Q2(const Interaction *const i)
virtual Interaction * Summary(void) const
static RandomGen * Instance()
Access instance.
Kinematics * KinePtr(void) const
Defines the EventRecordVisitorI interface. Concrete implementations of this interface use the 'Visito...
double PolzPolarAngle(void) const
bool IsInverseMuDecay(void) const
string P4AsString(const TLorentzVector *p)
bool IsIMDAnnihilation(void) const
void SetPolarization(double theta, double phi)
void Configure(const Registry &config)
A singleton holding random number generator classes. All random number generation in GENIE should tak...
double Pz(void) const
Get Pz.
double Px(void) const
Get Px.
virtual GHepParticle * Probe(void) const
double y(bool selected=false) const
string Name(void) const
Name that corresponds to the PDG code.
Summary information for an interaction.
const TLorentzVector & HitNucP4(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
void SetFSLeptonP4(const TLorentzVector &p4)
bool IsNuElectronElastic(void) const
TLorentzVector * GetP4(void) const
virtual void SetPolarization(GHepRecord *ev) const
virtual GHepParticle * FinalStatePrimaryLepton(void) const
const Kinematics & Kine(void) const
virtual void Configure(const Registry &config)
virtual void AddToEventRecord(GHepRecord *ev, int pdgc, const TLorentzVector &p4) const
virtual GHepParticle * TargetNucleus(void) const
virtual void ProcessEventRecord(GHepRecord *evrec) const
bool PolzIsSet(void) const
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const TLorentzVector * X4(void) const
A registry. Provides the container for algorithm configuration parameters.
virtual TVector3 NucRestFrame2Lab(GHepRecord *ev) const
virtual ~OutgoingDarkGenerator()
virtual void AddParticle(const GHepParticle &p)
const InitialState & InitState(void) const
const ProcessInfo & ProcInfo(void) const
double NonNegative(double x)
double Q2(bool selected=false) const
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
const Target & Tgt(void) const
virtual int ProbePosition(void) const
bool fApplyCoulombCorrection
double PolzAzimuthAngle(void) const
GENIE's GHEP MC event record.
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
STDHEP-like event record entry that can fit a particle or a nucleus.
bool IsElectron(int pdgc)
Initial State information.
double Py(void) const
Get Py.