15#include <TLorentzVector.h>
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();
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils.
bool GetParam(const RgKey &name, T &p, bool is_top_call=true) const
virtual void Configure(const Registry &config)
STDHEP-like event record entry that can fit a particle or a nucleus.
string Name(void) const
Name that corresponds to the PDG code.
TLorentzVector * GetP4(void) const
double PolzAzimuthAngle(void) const
const TLorentzVector * X4(void) const
double PolzPolarAngle(void) const
double Px(void) const
Get Px.
double Pz(void) const
Get Pz.
double Py(void) const
Get Py.
void SetPolarization(double theta, double phi)
bool PolzIsSet(void) const
GENIE's GHEP MC event record.
virtual int ProbePosition(void) const
virtual GHepParticle * Probe(void) const
virtual GHepParticle * TargetNucleus(void) const
virtual Interaction * Summary(void) const
virtual void AddParticle(const GHepParticle &p)
virtual GHepParticle * FinalStatePrimaryLepton(void) const
Initial State information.
const Target & Tgt(void) const
Summary information for an interaction.
const Kinematics & Kine(void) const
const ProcessInfo & ProcInfo(void) const
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
const InitialState & InitState(void) const
Kinematics * KinePtr(void) const
double Q2(bool selected=false) const
double y(bool selected=false) const
void SetFSLeptonP4(const TLorentzVector &p4)
virtual void SetPolarization(GHepRecord *ev) const
virtual ~OutgoingDarkGenerator()
virtual void ProcessEventRecord(GHepRecord *evrec) const
void Configure(const Registry &config)
bool fApplyCoulombCorrection
virtual void AddToEventRecord(GHepRecord *ev, int pdgc, const TLorentzVector &p4) const
virtual TVector3 NucRestFrame2Lab(GHepRecord *ev) const
bool IsNuElectronElastic(void) const
bool IsInverseMuDecay(void) const
bool IsIMDAnnihilation(void) const
A singleton holding random number generator classes. All random number generation in GENIE should tak...
static RandomGen * Instance()
Access instance.
TRandom3 & RndLep(void) const
rnd number generator used by final state primary lepton generators
A registry. Provides the container for algorithm configuration parameters.
const TLorentzVector & HitNucP4(void) const
bool IsNeutrino(int pdgc)
bool IsElectron(int pdgc)
double NonNegative(double x)
string P4AsString(const TLorentzVector *p)
THE MAIN GENIE PROJECT NAMESPACE