12 #include <TLorentzVector.h> 13 #include <TRootIOCtor.h> 20 using namespace genie;
28 kinematics.
Print(stream);
43 this->
Copy(kinematics);
63 fP4Fsl =
new TLorentzVector;
89 for(iter = kinematics.
fKV.begin(); iter != kinematics.
fKV.end(); ++iter) {
91 double val = iter->second;
105 if(this->
KVSet(kvar)) {
return this->
GetKV(kvar); }
107 LOG(
"Interaction",
pWARN) <<
"Kinematic variable x was not set";
118 if(this->
KVSet(kvar)) {
return this->
GetKV(kvar); }
120 LOG(
"Interaction",
pWARN) <<
"Kinematic variable y was not set";
137 LOG(
"Interaction",
pWARN) <<
"Kinematic variable Q2 was not set";
153 LOG(
"Interaction",
pWARN) <<
"Kinematic variable q2 was not set";
163 if(this->
KVSet(kvar)) {
return this->
GetKV(kvar); }
165 LOG(
"Interaction",
pWARN) <<
"Kinematic variable W was not set";
176 if(this->
KVSet(kvar)) {
return this->
GetKV(kvar); }
178 LOG(
"Interaction",
pWARN) <<
"Kinematic variable t was not set";
185 double xs = this->
x(selected);
186 return (xs>0) ? TMath::Log(xs) : -99999;
191 double ys = this->
y(selected);
192 return (ys>0) ? TMath::Log(ys) : -99999;
197 double Q2s = this->
Q2(selected);
198 return (Q2s>0) ? TMath::Log(Q2s) : -99999;
203 double Ws = this->
W(selected);
204 return (Ws>0) ? TMath::Log(Ws) : -99999;
209 double xs = this->
x(selected);
210 return (xs>0) ? TMath::Log10(xs) : -99999;
215 double ys = this->
y(selected);
216 return (ys>0) ? TMath::Log10(ys) : -99999;
221 double Q2s = this->
Q2(selected);
222 return (Q2s>0) ? TMath::Log10(Q2s) : -99999;
227 double Ws = this->
W(selected);
228 return (Ws>0) ? TMath::Log10(Ws) : -99999;
237 <<
"Setting unphysical value for x (x = " << xbj <<
")";
240 this->
SetKV(kvar, xbj);
247 if(inel_y<0 || inel_y>1) {
249 <<
"Setting unphysical value for y (y = " << inel_y <<
")";
252 this->
SetKV(kvar, inel_y);
261 <<
"Setting unphysical value for Q2 (Q2 = " << Qsqrd <<
")";
264 this->
SetKV(kvar, Qsqrd);
273 <<
"Setting unphysical value for q2 (q2 = " << qsqrd <<
")";
276 this->
SetKV(kvar, qsqrd);
285 <<
"Setting unphysical value for W (W = " << hadr_mass_W <<
")";
288 this->
SetKV(kvar, hadr_mass_W);
294 this->
SetKV(kvar, tval);
299 fP4Fsl->SetPxPyPzE(p4.Px(), p4.Py(), p4.Pz(), p4.E());
304 fP4Fsl->SetPxPyPzE(px,py,pz,E);
309 fP4HadSyst->SetPxPyPzE(p4.Px(), p4.Py(), p4.Pz(), p4.E());
319 if(
fKV.count(kv) == 1)
return true;
325 if(this->
KVSet(kv)) {
340 if(this->
KVSet(kv)) {
343 fKV.insert( map<KineVar_t, double>::value_type(kv,value) );
365 if(iter !=
fKV.end()) this->
Setx(iter->second);
367 if(iter !=
fKV.end()) this->
Sety(iter->second);
369 if(iter !=
fKV.end()) this->
SetQ2(iter->second);
371 if(iter !=
fKV.end()) this->
Setq2(iter->second);
373 if(iter !=
fKV.end()) this->
SetW(iter->second);
375 if(iter !=
fKV.end()) this->
Sett(iter->second);
380 stream <<
"[-] [Kinematics]" <<
endl;
384 for(iter =
fKV.begin(); iter !=
fKV.end(); ++iter) {
386 double val = iter->second;
393 this->
Copy(kinematics);
Kinematics & operator=(const Kinematics &kine)
TLorentzVector * fP4HadSyst
generated final state hadronic system 4-p (LAB)
double W(bool selected=false) const
double Log10y(bool selected=false) const
THE MAIN GENIE PROJECT NAMESPACE
void SetQ2(double Q2, bool selected=false)
void Setq2(double q2, bool selected=false)
Generated/set kinematical variables for an event.
double x(bool selected=false) const
double Logx(bool selected=false) const
double y(bool selected=false) const
void UseSelectedKinematics(void)
double Logy(bool selected=false) const
double q2(bool selected=false) const
double LogQ2(bool selected=false) const
double Log10x(bool selected=false) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
bool KVSet(KineVar_t kv) const
void SetFSLeptonP4(const TLorentzVector &p4)
void Copy(const Kinematics &kine)
void Sett(double t, bool selected=false)
double GetKV(KineVar_t kv) const
void Init(void)
initialize
map< KineVar_t, double > fKV
selected kinematics
double Log10Q2(bool selected=false) const
enum genie::EKineVar KineVar_t
void Setx(double x, bool selected=false)
void SetKV(KineVar_t kv, double value)
void SetW(double W, bool selected=false)
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void Sety(double y, bool selected=false)
static string AsString(KineVar_t kv)
ClassImp(Kinematics) namespace genie
void SetHadSystP4(const TLorentzVector &p4)
double t(bool selected=false) const
TLorentzVector * fP4Fsl
generated final state primary lepton 4-p (LAB)
double Q2(bool selected=false) const
void ClearRunningValues(void)
double Log10W(bool selected=false) const
static constexpr double ys
double LogW(bool selected=false) const
void CleanUp(void)
clean-up
QTextStream & endl(QTextStream &s)
void Print(ostream &stream) const