GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 <c.andreopoulos \at cern.ch>
9  University of Liverpool
10 
11 \created May 08, 2004
12 
13 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _KINEMATICS_H_
19 #define _KINEMATICS_H_
20 
21 #include <map>
22 #include <iostream>
23 
24 #include <TObject.h>
25 
27 
28 using std::map;
29 using std::ostream;
30 
31 class TRootIOCtor;
32 class TLorentzVector;
33 
34 namespace genie {
35 
36 class Kinematics;
37 ostream & operator << (ostream & stream, const Kinematics & kine);
38 
39 class Kinematics : public TObject {
40 
41 public:
42  using TObject::Print; // suppress clang 'hides overloaded virtual function [-Woverloaded-virtual]' warnings
43  using TObject::Copy;
44 
45  Kinematics();
46  Kinematics(const Kinematics & kv);
47  Kinematics(TRootIOCtor*);
48  ~Kinematics();
49 
50  double x (bool selected=false) const;
51  double y (bool selected=false) const;
52  double Q2 (bool selected=false) const;
53  double q2 (bool selected=false) const;
54  double W (bool selected=false) const;
55  double t (bool selected=false) const;
56  double Logx (bool selected=false) const;
57  double Logy (bool selected=false) const;
58  double LogQ2 (bool selected=false) const;
59  double LogW (bool selected=false) const;
60  double Log10x (bool selected=false) const;
61  double Log10y (bool selected=false) const;
62  double Log10Q2 (bool selected=false) const;
63  double Log10W (bool selected=false) const;
64 
65  const TLorentzVector & FSLeptonP4(void) const { return *fP4Fsl; }
66  const TLorentzVector & HadSystP4 (void) const { return *fP4HadSyst; }
67 
68  void Setx (double x, bool selected=false);
69  void Sety (double y, bool selected=false);
70  void SetQ2 (double Q2, bool selected=false);
71  void Setq2 (double q2, bool selected=false);
72  void SetW (double W, bool selected=false);
73  void Sett (double t, bool selected=false);
74 
75  void SetFSLeptonP4 (const TLorentzVector & p4);
76  void SetFSLeptonP4 (double px, double py, double pz, double E);
77  void SetHadSystP4 (const TLorentzVector & p4);
78  void SetHadSystP4 (double px, double py, double pz, double E);
79 
80  bool KVSet(KineVar_t kv) const;
81  double GetKV(KineVar_t kv) const;
82  void SetKV(KineVar_t kv, double value);
83 
84  void ClearRunningValues (void);
85  void UseSelectedKinematics (void);
86 
87  //-- Copy, reset, compare and print itself
88  void Reset (void);
89  void Copy (const Kinematics & kine);
90  void Print (ostream & stream) const;
91 
92  Kinematics & operator = (const Kinematics & kine);
93  friend ostream & operator << (ostream & stream, const Kinematics & kine);
94 
95 private:
96 
97  void Init (void); ///< initialize
98  void CleanUp (void); ///< clean-up
99 
100  //-- Private data members
101 
102  map<KineVar_t, double> fKV; ///< selected kinematics
103  TLorentzVector * fP4Fsl; ///< generated final state primary lepton 4-p (LAB)
104  TLorentzVector * fP4HadSyst; ///< generated final state hadronic system 4-p (LAB)
105 
106 ClassDef(Kinematics,2)
107 };
108 
109 } // genie namespace
110 
111 #endif // _KINEMATICS_H_
Kinematics & operator=(const Kinematics &kine)
Definition: Kinematics.cxx:391
TLorentzVector * fP4HadSyst
generated final state hadronic system 4-p (LAB)
Definition: Kinematics.h:104
double W(bool selected=false) const
Definition: Kinematics.cxx:157
double Log10y(bool selected=false) const
Definition: Kinematics.cxx:213
void Reset(void)
Definition: Kinematics.cxx:75
void SetQ2(double Q2, bool selected=false)
Definition: Kinematics.cxx:255
void Setq2(double q2, bool selected=false)
Definition: Kinematics.cxx:267
Generated/set kinematical variables for an event.
Definition: Kinematics.h:39
double x(bool selected=false) const
Definition: Kinematics.cxx:99
const TLorentzVector & HadSystP4(void) const
Definition: Kinematics.h:66
double Logx(bool selected=false) const
Definition: Kinematics.cxx:183
double y(bool selected=false) const
Definition: Kinematics.cxx:112
void UseSelectedKinematics(void)
Definition: Kinematics.cxx:359
double Logy(bool selected=false) const
Definition: Kinematics.cxx:189
double q2(bool selected=false) const
Definition: Kinematics.cxx:141
double LogQ2(bool selected=false) const
Definition: Kinematics.cxx:195
friend ostream & operator<<(ostream &stream, const Kinematics &kine)
Definition: Kinematics.cxx:26
double Log10x(bool selected=false) const
Definition: Kinematics.cxx:207
const TLorentzVector & FSLeptonP4(void) const
Definition: Kinematics.h:65
bool KVSet(KineVar_t kv) const
Definition: Kinematics.cxx:317
void SetFSLeptonP4(const TLorentzVector &p4)
Definition: Kinematics.cxx:297
void Copy(const Kinematics &kine)
Definition: Kinematics.cxx:83
void Sett(double t, bool selected=false)
Definition: Kinematics.cxx:291
double GetKV(KineVar_t kv) const
Definition: Kinematics.cxx:323
void Init(void)
initialize
Definition: Kinematics.cxx:59
map< KineVar_t, double > fKV
selected kinematics
Definition: Kinematics.h:102
double Log10Q2(bool selected=false) const
Definition: Kinematics.cxx:219
enum genie::EKineVar KineVar_t
void Setx(double x, bool selected=false)
Definition: Kinematics.cxx:231
void SetKV(KineVar_t kv, double value)
Definition: Kinematics.cxx:335
void SetW(double W, bool selected=false)
Definition: Kinematics.cxx:279
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void Sety(double y, bool selected=false)
Definition: Kinematics.cxx:243
void SetHadSystP4(const TLorentzVector &p4)
Definition: Kinematics.cxx:307
double t(bool selected=false) const
Definition: Kinematics.cxx:170
TLorentzVector * fP4Fsl
generated final state primary lepton 4-p (LAB)
Definition: Kinematics.h:103
double Q2(bool selected=false) const
Definition: Kinematics.cxx:125
void ClearRunningValues(void)
Definition: Kinematics.cxx:347
double Log10W(bool selected=false) const
Definition: Kinematics.cxx:225
double LogW(bool selected=false) const
Definition: Kinematics.cxx:201
void CleanUp(void)
clean-up
Definition: Kinematics.cxx:67
void Print(ostream &stream) const
Definition: Kinematics.cxx:378