Kinematics.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::Kinematics
5 
6 \brief Generated/set kinematical variables for an event
7 
8 \author Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11 \created May 08, 2004
12 
13 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15  or see $GENIE/LICENSE
16 */
17 //____________________________________________________________________________
18 
19 #ifndef _KINEMATICS_H_
20 #define _KINEMATICS_H_
21 
22 #include <map>
23 #include <iostream>
24 
25 #include <TObject.h>
26 
28 
29 using std::map;
30 using std::ostream;
31 
32 class TRootIOCtor;
33 class TLorentzVector;
34 
35 namespace genie {
36 
37 class Kinematics;
38 ostream & operator << (ostream & stream, const Kinematics & kine);
39 
40 class Kinematics : public TObject {
41 
42 public:
43  using TObject::Print; // suppress clang 'hides overloaded virtual function [-Woverloaded-virtual]' warnings
44  using TObject::Copy;
45 
46  Kinematics();
47  Kinematics(const Kinematics & kv);
48  Kinematics(TRootIOCtor*);
49  ~Kinematics();
50 
51  double x (bool selected=false) const;
52  double y (bool selected=false) const;
53  double Q2 (bool selected=false) const;
54  double q2 (bool selected=false) const;
55  double W (bool selected=false) const;
56  double t (bool selected=false) const;
57  double Logx (bool selected=false) const;
58  double Logy (bool selected=false) const;
59  double LogQ2 (bool selected=false) const;
60  double LogW (bool selected=false) const;
61  double Log10x (bool selected=false) const;
62  double Log10y (bool selected=false) const;
63  double Log10Q2 (bool selected=false) const;
64  double Log10W (bool selected=false) const;
65 
66  const TLorentzVector & FSLeptonP4(void) const { return *fP4Fsl; }
67  const TLorentzVector & HadSystP4 (void) const { return *fP4HadSyst; }
68 
69  void Setx (double x, bool selected=false);
70  void Sety (double y, bool selected=false);
71  void SetQ2 (double Q2, bool selected=false);
72  void Setq2 (double q2, bool selected=false);
73  void SetW (double W, bool selected=false);
74  void Sett (double t, bool selected=false);
75 
76  void SetFSLeptonP4 (const TLorentzVector & p4);
77  void SetFSLeptonP4 (double px, double py, double pz, double E);
78  void SetHadSystP4 (const TLorentzVector & p4);
79  void SetHadSystP4 (double px, double py, double pz, double E);
80 
81  bool KVSet(KineVar_t kv) const;
82  double GetKV(KineVar_t kv) const;
83  void SetKV(KineVar_t kv, double value);
84 
85  void ClearRunningValues (void);
86  void UseSelectedKinematics (void);
87 
88  //-- Copy, reset, compare and print itself
89  void Reset (void);
90  void Copy (const Kinematics & kine);
91  void Print (ostream & stream) const;
92 
93  Kinematics & operator = (const Kinematics & kine);
94  friend ostream & operator << (ostream & stream, const Kinematics & kine);
95 
96 private:
97 
98  void Init (void); ///< initialize
99  void CleanUp (void); ///< clean-up
100 
101  //-- Private data members
102 
103  map<KineVar_t, double> fKV; ///< selected kinematics
104  TLorentzVector * fP4Fsl; ///< generated final state primary lepton 4-p (LAB)
105  TLorentzVector * fP4HadSyst; ///< generated final state hadronic system 4-p (LAB)
106 
107 ClassDef(Kinematics,2)
108 };
109 
110 } // genie namespace
111 
112 #endif // _KINEMATICS_H_
Kinematics & operator=(const Kinematics &kine)
Definition: Kinematics.cxx:401
TLorentzVector * fP4HadSyst
generated final state hadronic system 4-p (LAB)
Definition: Kinematics.h:105
double W(bool selected=false) const
Definition: Kinematics.cxx:167
double Log10y(bool selected=false) const
Definition: Kinematics.cxx:223
void Reset(void)
Definition: Kinematics.cxx:85
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
void SetQ2(double Q2, bool selected=false)
Definition: Kinematics.cxx:265
void Setq2(double q2, bool selected=false)
Definition: Kinematics.cxx:277
Generated/set kinematical variables for an event.
Definition: Kinematics.h:40
double x(bool selected=false) const
Definition: Kinematics.cxx:109
const TLorentzVector & HadSystP4(void) const
Definition: Kinematics.h:67
double Logx(bool selected=false) const
Definition: Kinematics.cxx:193
double y(bool selected=false) const
Definition: Kinematics.cxx:122
void UseSelectedKinematics(void)
Definition: Kinematics.cxx:369
double Logy(bool selected=false) const
Definition: Kinematics.cxx:199
double q2(bool selected=false) const
Definition: Kinematics.cxx:151
double LogQ2(bool selected=false) const
Definition: Kinematics.cxx:205
friend ostream & operator<<(ostream &stream, const Kinematics &kine)
double Log10x(bool selected=false) const
Definition: Kinematics.cxx:217
const TLorentzVector & FSLeptonP4(void) const
Definition: Kinematics.h:66
const XML_Char int const XML_Char * value
Definition: expat.h:331
bool KVSet(KineVar_t kv) const
Definition: Kinematics.cxx:327
void SetFSLeptonP4(const TLorentzVector &p4)
Definition: Kinematics.cxx:307
Float_t E
Definition: plot.C:20
void Copy(const Kinematics &kine)
Definition: Kinematics.cxx:93
void Sett(double t, bool selected=false)
Definition: Kinematics.cxx:301
double GetKV(KineVar_t kv) const
Definition: Kinematics.cxx:333
void Init(void)
initialize
Definition: Kinematics.cxx:69
map< KineVar_t, double > fKV
selected kinematics
Definition: Kinematics.h:103
double Log10Q2(bool selected=false) const
Definition: Kinematics.cxx:229
void Print(std::string prefix, std::string name, std::string suffix="")
Definition: nue_pid_effs.C:68
enum genie::EKineVar KineVar_t
void Setx(double x, bool selected=false)
Definition: Kinematics.cxx:241
void SetKV(KineVar_t kv, double value)
Definition: Kinematics.cxx:345
void SetW(double W, bool selected=false)
Definition: Kinematics.cxx:289
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void Sety(double y, bool selected=false)
Definition: Kinematics.cxx:253
void SetHadSystP4(const TLorentzVector &p4)
Definition: Kinematics.cxx:317
double t(bool selected=false) const
Definition: Kinematics.cxx:180
TLorentzVector * fP4Fsl
generated final state primary lepton 4-p (LAB)
Definition: Kinematics.h:104
double Q2(bool selected=false) const
Definition: Kinematics.cxx:135
void ClearRunningValues(void)
Definition: Kinematics.cxx:357
double Log10W(bool selected=false) const
Definition: Kinematics.cxx:235
double LogW(bool selected=false) const
Definition: Kinematics.cxx:211
void CleanUp(void)
clean-up
Definition: Kinematics.cxx:77
void Print(ostream &stream) const
Definition: Kinematics.cxx:388