CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Lepjets_Event_Jet.h
Go to the documentation of this file.
1 //
2 // $Id: Lepjets_Event_Jet.h,v 1.1 2011/05/26 09:46:53 mseidel Exp $
3 //
4 // File: hitfit/Lepjets_Event_Jet.h
5 // Purpose: Represent a `jet' in a Lepjets_Event.
6 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
7 //
8 // This is like Lepjets_Event_Jet, except that we store some
9 // additional information:
10 //
11 // - svx tag flag
12 // - slt tag flag
13 // - slt lepton 4-vector
14 // - slt lepton energy deposition
15 //
16 // CMSSW File : interface/Lepjets_Event_Jet.h
17 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
18 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
19 //
20 
21 
43 #ifndef HITFIT_LEPJETS_EVENT_JET_H
44 #define HITFIT_LEPJETS_EVENT_JET_H
45 
46 
50 #include <iosfwd>
51 
52 
53 namespace hitfit {
54 
55 
59 enum Jet_Labels {
60  isr_label = 0,
61  lepb_label = 11,
62  hadb_label = 12,
67 };
68 
69 
83  : public Lepjets_Event_Lep
84 //
85 // Purpose: Represent a `jet' in a Lepjets_Event.
86 //
87 {
88 public:
89  // Constructor.
107  Lepjets_Event_Jet (const Fourvec& p,
108  int type,
109  const Vector_Resolution& res,
110  bool svx_tag = false,
111  bool slt_tag = false,
112  const Fourvec& tag_lep = Fourvec(),
113  double slt_edep = 0);
114 
115  // Access the svx tag flag.
119  bool svx_tag () const;
120 
124  bool& svx_tag ();
125 
126  // Access the slt tag flag.
131  bool slt_tag () const;
135  bool& slt_tag ();
136 
137  // Access the tag lepton four-momentum.
141  Fourvec& tag_lep ();
142 
146  const Fourvec& tag_lep () const;
147 
148  // Access the tag lepton energy deposition.
152  double slt_edep () const;
156  double& slt_edep ();
157 
158  // Access the uncorrected jet energy.
162  double e0 () const;
163 
167  double& e0 ();
168 
169  // Print the content of this object.
180  std::ostream& dump (std::ostream& s, bool full = false) const;
181 
182 
183 private:
184  // The object state.
188  bool _svx_tag;
189 
193  bool _slt_tag;
194 
199 
203  double _slt_edep;
204 
208  double _e0;
209 };
210 
211 
212 // Print this object.
213 std::ostream& operator<< (std::ostream& s, const Lepjets_Event_Jet& ev);
214 
215 // Helper function to translate jet type from integer to char/string
228 char jetTypeChar(int type);
229 
242 std::string jetTypeString(int type);
243 
256 template<class T>
257 std::string
258 jetTypeString(std::vector<T> jet_types)
259 {
260 
261 
262  std::ostringstream ret;
263 
264  for (size_t j = 0 ; j != jet_types.size() ; ++j) {
265  ret << jetTypeChar((int) (jet_types[j]));
266  }
267 
268  return ret.str();
269 }
270 
271 
272 } // namespace hitfit
273 
274 
275 #endif // not HITFIT_LEPJETS_EVENT_JET_H
276 
type
Definition: HCALResponse.h:22
Calculate and represent resolution for a vector of momentum , pseudorapidity , and azimuthal angle ...
std::ostream & dump(std::ostream &s, bool full=false) const
Print the content of this object.
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...
const Vector_Resolution & res() const
Return a constant reference to the resolution.
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:193
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:58
int j
Definition: DBlmapReader.cc:9
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 ...