24 using namespace genie;
53 double y = interaction->
Kine().
y(
true);
65 <<
"Ev = " << Ev <<
", y = " << y <<
", -> El = " << El;
68 double El2 = TMath::Power(El,2);
71 double ml2 = TMath::Power(ml,2);
72 double pl = TMath::Sqrt(El2-ml2);
76 double Q2 = 2*(Ev-El)*me + me*me;
77 double costh = (El-0.5*(Q2+ml2)/Ev)/pl;
78 double sinth = TMath::Sqrt( TMath::Max(0., 1-TMath::Power(costh,2.)) );
81 <<
"Q2 = " << Q2 <<
", cos(theta) = " << costh;
84 if( TMath::Abs(costh)>1 ) {
86 <<
"El = " << El <<
", Ev = " << Ev <<
", cos(theta) = " << costh;
89 assert(TMath::Abs(costh)<=1);
92 double plp = pl * costh;
93 double plt = pl * sinth;
96 <<
"fsl: E = " << El <<
", |p//| = " << plp <<
"[pT] = " << plt;
100 double phi = 2*
kPi * rnd->
RndLep().Rndm();
101 double pltx = plt * TMath::Cos(phi);
102 double plty = plt * TMath::Sin(phi);
105 TVector3 unit_nudir = evrec->
Probe()->
P4()->Vect().Unit();
109 TVector3 p3l(pltx,plty,plp);
110 p3l.RotateUz(unit_nudir);
113 TLorentzVector p4l(p3l,El);
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.
const TLorentzVector * P4(void) const
static const double kElectronMass
A singleton holding random number generator classes. All random number generation in GENIE should tak...
int FSPrimLeptonPdg(void) const
final state primary lepton pdg
virtual GHepParticle * Probe(void) const
double y(bool selected=false) const
Summary information for an interaction.
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
const Kinematics & Kine(void) const
Abstract class. Is used to pass common implementation to concrete implementations of the EventRecordV...
TParticlePDG * FSPrimLepton(void) const
final state primary lepton
void ProcessEventRecord(GHepRecord *event_rec) const
NuEPrimaryLeptonGenerator()
virtual void SetPolarization(GHepRecord *ev) const
const InitialState & InitState(void) const
virtual void AddToEventRecord(GHepRecord *ev, int pdgc, const TLorentzVector &p4) const
double ProbeE(RefFrame_t rf) 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...
~NuEPrimaryLeptonGenerator()
Initial State information.