Imperial Analysis
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Met.hh
Go to the documentation of this file.
1 #ifndef ICHiggsTauTau_Met_hh
2 #define ICHiggsTauTau_Met_hh
3 #include <vector>
4 #include <map>
5 #include <utility>
7 #include "Rtypes.h"
8 
9 namespace ic {
10 
15 class Met : public Candidate {
16 public:
17  struct BasicMet{
18  double px, py, sumet;
19  double pt() const { return sqrt(px*px+py*py); }
20  double phi() const { return std::atan2(py,px); }
21  };
22 
23 
24  private:
25  typedef std::map<std::size_t, ic::Met::BasicMet> UBMmap;
26  typedef std::map<std::size_t, std::string> TSmap;
27 
28  public:
29  Met();
30  virtual ~Met();
31  virtual void Print() const;
32 
34 
35  inline double sum_et() const { return sum_et_; }
37 
39  inline double et_sig() const { return et_sig_; }
40 
42  inline double xx_sig() const { return xx_sig_; }
43 
45  inline double xy_sig() const { return xy_sig_; }
46 
48  inline double yx_sig() const { return yx_sig_; }
49 
51  inline double yy_sig() const { return yy_sig_; }
54  inline std::map<std::size_t, ic::Met::BasicMet> const& shifted_mets() const {
56  return shiftedmets_;
57  }
61  inline std::map<std::size_t, ic::Met::BasicMet> const& corrected_mets() const {
63  return correctedmets_;
64  }
67  ic::Met::BasicMet GetCorrectedMet(std::string const& name) const;
72  ic::Met::BasicMet GetShiftedMet(std::string const& name) const;
77 
79  inline void set_sum_et(double const& sum_et) { sum_et_ = sum_et; }
81 
83  inline void set_et_sig(double const& et_sig) { et_sig_ = et_sig; }
84 
86  inline void set_xx_sig(double const& xx_sig) { xx_sig_ = xx_sig; }
87 
89  inline void set_xy_sig(double const& xy_sig) { xy_sig_ = xy_sig; }
90 
92  inline void set_yx_sig(double const& yx_sig) { yx_sig_ = yx_sig; }
93 
95  inline void set_yy_sig(double const& yy_sig) { yy_sig_ = yy_sig; }
98  inline void set_shiftedmets(std::map<std::size_t, ic::Met::BasicMet> const& shiftedmets) { shiftedmets_ = shiftedmets; }
102  inline void set_correctedmets(std::map<std::size_t, ic::Met::BasicMet> const& cormets) {
104  correctedmets_ = cormets;
105  }
108  void SetCorrectedMet(std::string const& name, ic::Met::BasicMet const& value);
112  void SetShiftedMet(std::string const& name, ic::Met::BasicMet const& value);
117  private:
118  double sum_et_;
119  double et_sig_;
120  double xx_sig_;
121  double xy_sig_;
122  double yx_sig_;
123  double yy_sig_;
124  UBMmap shiftedmets_;
125  UBMmap correctedmets_;
126 
127  std::string UnHashMetCor(std::size_t cor) const;
128  std::string UnHashMetUnc(std::size_t unc) const;
129 
130  #ifndef SKIP_CINT_DICT
131  public:
132  ClassDef(Met, 5);
133  #endif
134 };
135 
136  std::ostream& operator<<(std::ostream& os,const ic::Met::BasicMet& met);
137 
138  typedef std::vector<ic::Met> MetCollection;
139 }
141 #endif
Stores a missing transverse energy object and the corresponding significance and corrections.
Definition: Met.hh:15
double sumet
Definition: Met.hh:18
virtual void Print() const
Definition: Met.cc:20
ic::Met::BasicMet GetCorrectedMet(std::string const &name) const
Returns a specific correction factor if name is defined, otherwise returns zero.
Definition: Met.cc:39
virtual ~Met()
Definition: Met.cc:18
double et_sig() const
Signifiance of the missing transverse energy.
Definition: Met.hh:39
void set_xx_sig(double const &xx_sig)
The component of the significance matrix.
Definition: Met.hh:86
void set_yy_sig(double const &yy_sig)
The component of the significance matrix.
Definition: Met.hh:95
void set_et_sig(double const &et_sig)
Signifiance of the missing transverse energy.
Definition: Met.hh:83
Stores a four-momentum, charge and identifier, and is the base class for most other physics objects...
Definition: Candidate.hh:13
ic::Met::BasicMet GetShiftedMet(std::string const &name) const
Returns a specific correction factor if name is defined, otherwise returns zero.
Definition: Met.cc:54
double sum_et() const
Scalar sum of transverse energies for all input objects.
Definition: Met.hh:36
std::map< std::size_t, ic::Met::BasicMet > const & shifted_mets() const
The vector of shifted mets.
Definition: Met.hh:55
std::vector< ic::Met > MetCollection
Definition: Met.hh:138
Definition: CaloJet.hh:9
double px
Definition: Met.hh:18
ClassDef(Met, 5)
double phi() const
Definition: Met.hh:20
double pt() const
Definition: Met.hh:19
Met()
Definition: Met.cc:9
void set_shiftedmets(std::map< std::size_t, ic::Met::BasicMet > const &shiftedmets)
Definition: Met.hh:99
void SetCorrectedMet(std::string const &name, ic::Met::BasicMet const &value)
Store a corrected met, overwriting any existing value with label name
Definition: Met.cc:31
double xx_sig() const
The component of the significance matrix.
Definition: Met.hh:42
double yx_sig() const
The component of the significance matrix.
Definition: Met.hh:48
void set_yx_sig(double const &yx_sig)
The component of the significance matrix.
Definition: Met.hh:92
std::map< std::size_t, ic::Met::BasicMet > const & corrected_mets() const
map of MET corrections.
Definition: Met.hh:62
void SetShiftedMet(std::string const &name, ic::Met::BasicMet const &value)
Store a shifted met, overwriting any existing value with label name
Definition: Met.cc:35
double xy_sig() const
The component of the significance matrix.
Definition: Met.hh:45
std::ostream & operator<<(std::ostream &os, const ic::Met::BasicMet &met)
Definition: Met.cc:127
double py
Definition: Met.hh:18
double yy_sig() const
The component of the significance matrix.
Definition: Met.hh:51
void set_sum_et(double const &sum_et)
Scalar sum of transverse energies for all input objects.
Definition: Met.hh:80
void set_correctedmets(std::map< std::size_t, ic::Met::BasicMet > const &cormets)
Definition: Met.hh:103
void set_xy_sig(double const &xy_sig)
The component of the significance matrix.
Definition: Met.hh:89