35 using namespace genie;
36 using namespace genie::constants;
83 const TLorentzVector vtx = *(nu->
X4());
84 const TLorentzVector p4nu_lab = *(nu ->
P4());
85 const TLorentzVector p4fsl_lab = *(fsl->
P4());
88 TLorentzVector p4nu = p4nu_lab;
89 TLorentzVector p4fsl = p4fsl_lab;
93 TVector3 beta = pnuc4.BoostVector();
95 p4fsl.Boost(-1.*beta);
97 LOG(
"SKHadron",
pDEBUG ) <<
"\nStruck nucleon p = (" << pnuc4.X() <<
", " << pnuc4.Y() <<
", " << pnuc4.Z() <<
")";
98 LOG(
"SKHadron",
pDEBUG ) <<
"\nLab frame neutrino E = " << p4nu_lab.E() <<
" lepton " << p4fsl_lab.E() <<
" rest frame " << p4nu.E() <<
" lepton " << p4fsl.E();
110 double M = pnuc4.M();
112 double mk2 = TMath::Power(mk,2);
116 double kaon_E = kaon_T + mk;
117 double pk = sqrt( kaon_E*kaon_E - mk2 );
119 TLorentzVector q = p4nu - p4fsl;
121 TVector3 qvec = q.Vect();
122 double q3 = qvec.Mag();
125 double eN = q.E() + M - kaon_E;
126 double cos_thetaKq = (q3*q3 + pk*pk + Mf*Mf - eN*eN)/(2*q3*pk);
129 "Cosine theta_kq = " << cos_thetaKq <<
"\n" <<
130 "q.E = " << q.E() <<
" M = " << M <<
" kaon E " << kaon_E <<
" q3 = " << q3 <<
" pk = " << pk;
132 if(cos_thetaKq > 1.0) {
133 LOG(
"SKHadron",
pWARN) <<
"Invalid selected kinematics; Attempt regenerating";
136 exception.
SetReason(
"Invalid selected kinematics");
155 kaon.SetMagThetaPhi( pk, TMath::ACos(cos_thetaKq), phi_kq );
157 TVector3 nucleon( -kaon.X(), -kaon.Y(), q3 - kaon.Z() );
160 kaon.RotateUz(qvec.Unit());
161 nucleon.RotateUz(qvec.Unit());
164 "\nKaon (x,y,z) in nuc rest frame: (" << kaon.X() <<
", " << kaon.Y() <<
", " << kaon.Z() <<
")" <<
165 "\nNucleon: (" << nucleon.X() <<
", " << nucleon.Y() <<
", " << nucleon.Z() <<
")";
168 TLorentzVector p4kaon( kaon, sqrt(kaon.Mag2()+mk2) );
169 TLorentzVector p4fsnuc( nucleon, sqrt(nucleon.Mag2()+Mf*Mf) );
171 p4kaon.Boost( beta );
172 p4fsnuc.Boost( beta );
175 "\nKaon (x,y,z) in lab frame: (" << p4kaon.X() <<
", " << p4kaon.Y() <<
", " << p4kaon.Z() <<
")" <<
176 "\nNucleon: (" << p4fsnuc.X() <<
", " << p4fsnuc.Y() <<
", " << p4fsnuc.Z() <<
")";
178 double pxNf = p4fsnuc.Px();
179 double pyNf = p4fsnuc.Py();
180 double pzNf = p4fsnuc.Pz();
181 double ENf = p4fsnuc.E();
183 double pxKf = p4kaon.Px();
184 double pyKf = p4kaon.Py();
185 double pzKf = p4kaon.Pz();
186 double EKf = p4kaon.E();
196 nuc_pdgc, ist, mom,-1,-1,-1,
197 pxNf, pyNf, pzNf, ENf, vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
200 kaon_pdgc,ist, mom,-1,-1,-1,
201 pxKf, pyKf, pzKf, EKf, vtx.X(), vtx.Y(), vtx.Z(), vtx.T());
SKHadronicSystemGenerator()
~SKHadronicSystemGenerator()
virtual Interaction * Summary(void) const
const TLorentzVector * P4(void) const
Kinematics * KinePtr(void) const
bool IsNucleus(void) const
Generated/set kinematical variables for an event.
virtual int HitNucleonPosition(void) const
Contains minimal information for tagging exclusive processes.
virtual GHepParticle * Probe(void) const
Summary information for an interaction.
const TLorentzVector & HitNucP4(void) const
An exception thrown by EventRecordVisitorI when the normal processing sequence has to be disrupted (f...
int StrangeHadronPdg(void) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
virtual GHepParticle * FinalStatePrimaryLepton(void) const
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
static const double kNeutronMass
double GetKV(KineVar_t kv) const
void ProcessEventRecord(GHepRecord *event_rec) const
void SetReturnStep(int s)
static PDGLibrary * Instance(void)
void SetReason(string reason)
virtual TBits * EventFlags(void) const
const TLorentzVector * X4(void) const
const XclsTag & ExclTag(void) const
virtual GHepParticle * HitNucleon(void) const
void SwitchOnStepBack(void)
virtual void AddParticle(const GHepParticle &p)
const InitialState & InitState(void) const
void CalculateHadronicSystem_AtharSingleKaon(GHepRecord *event_rec) const
Abstract class. Is used to pass some commonly recurring methods to all concrete implementations of th...
TParticlePDG * Find(int pdgc, bool must_exist=true)
const Target & Tgt(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.
static const double kProtonMass
enum genie::EGHepStatus GHepStatus_t