CMS 3D CMS Logo

Lepjets_Event_Jet.h
Go to the documentation of this file.
1 //
2 //
3 // File: hitfit/Lepjets_Event_Jet.h
4 // Purpose: Represent a `jet' in a Lepjets_Event.
5 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
6 //
7 // This is like Lepjets_Event_Jet, except that we store some
8 // additional information:
9 //
10 // - svx tag flag
11 // - slt tag flag
12 // - slt lepton 4-vector
13 // - slt lepton energy deposition
14 //
15 // CMSSW File : interface/Lepjets_Event_Jet.h
16 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
17 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
18 //
19 
41 #ifndef HITFIT_LEPJETS_EVENT_JET_H
42 #define HITFIT_LEPJETS_EVENT_JET_H
43 
47 #include <iosfwd>
48 
49 namespace hitfit {
50 
54  enum Jet_Labels {
55  isr_label = 0,
56  lepb_label = 11,
57  hadb_label = 12,
62  };
63 
77  //
78  // Purpose: Represent a `jet' in a Lepjets_Event.
79  //
80  {
81  public:
82  // Constructor.
100  Lepjets_Event_Jet(const Fourvec& p,
101  int type,
102  const Vector_Resolution& res,
103  bool svx_tag = false,
104  bool slt_tag = false,
105  const Fourvec& tag_lep = Fourvec(),
106  double slt_edep = 0);
107 
108  // Access the svx tag flag.
112  bool svx_tag() const;
113 
117  bool& svx_tag();
118 
119  // Access the slt tag flag.
124  bool slt_tag() const;
128  bool& slt_tag();
129 
130  // Access the tag lepton four-momentum.
134  Fourvec& tag_lep();
135 
139  const Fourvec& tag_lep() const;
140 
141  // Access the tag lepton energy deposition.
145  double slt_edep() const;
149  double& slt_edep();
150 
151  // Access the uncorrected jet energy.
155  double e0() const;
156 
160  double& e0();
161 
162  // Print the content of this object.
173  std::ostream& dump(std::ostream& s, bool full = false) const;
174 
175  private:
176  // The object state.
180  bool _svx_tag;
181 
185  bool _slt_tag;
186 
191 
195  double _slt_edep;
196 
200  double _e0;
201  };
202 
203  // Print this object.
204  std::ostream& operator<<(std::ostream& s, const Lepjets_Event_Jet& ev);
205 
206  // Helper function to translate jet type from integer to char/string
219  char jetTypeChar(int type);
220 
234 
247  template <class T>
248  std::string jetTypeString(std::vector<T> jet_types) {
249  std::ostringstream ret;
250 
251  for (size_t j = 0; j != jet_types.size(); ++j) {
252  ret << jetTypeChar((int)(jet_types[j]));
253  }
254 
255  return ret.str();
256  }
257 
258 } // namespace hitfit
259 
260 #endif // not HITFIT_LEPJETS_EVENT_JET_H
std::ostream & dump(std::ostream &s, bool full=false) const
Print the content of this object.
Calculate and represent resolution for a vector of momentum , pseudorapidity , and azimuthal angle ...
Represent a lepton in an instance of Lepjets_Event class. This class hold the following information: ...
Define three-vector and four-vector classes for the HitFit package, and supply a few additional opera...
ret
prodAgent to be discontinued
Definition: Electron.h:6
Lepjets_Event_Jet(const Fourvec &p, int type, const Vector_Resolution &res, bool svx_tag=false, bool slt_tag=false, const Fourvec &tag_lep=Fourvec(), double slt_edep=0)
Constructor.
std::string jetTypeString(int type)
Helper function: Translate jet type code from integer to char. The following notation is used for eac...
Definition: GenABIO.cc:168
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
A class to represent a jet in an instance of Lepjets_Event class. The class is derived from the Lepje...
Represent a lepton in an instance of Lepjets_Event class.
Fourvec & p()
Return a reference to the four-momentum.
std::ostream & operator<<(std::ostream &s, const Constraint_Intermed &ci)
Output stream operator, print the content of this Constraint_Intermed to an output stream...
char jetTypeChar(int type)
Helper function: Translate jet type code from integer to char. The following notation is used for eac...
Calculate and represent resolution for a vector of , pseudorapidity , and azimuthal angle ...