test
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 //
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 
20 
42 #ifndef HITFIT_LEPJETS_EVENT_JET_H
43 #define HITFIT_LEPJETS_EVENT_JET_H
44 
45 
49 #include <iosfwd>
50 
51 
52 namespace hitfit {
53 
54 
58 enum Jet_Labels {
59  isr_label = 0,
60  lepb_label = 11,
61  hadb_label = 12,
66 };
67 
68 
82  : public Lepjets_Event_Lep
83 //
84 // Purpose: Represent a `jet' in a Lepjets_Event.
85 //
86 {
87 public:
88  // Constructor.
106  Lepjets_Event_Jet (const Fourvec& p,
107  int type,
108  const Vector_Resolution& res,
109  bool svx_tag = false,
110  bool slt_tag = false,
111  const Fourvec& tag_lep = Fourvec(),
112  double slt_edep = 0);
113 
114  // Access the svx tag flag.
118  bool svx_tag () const;
119 
123  bool& svx_tag ();
124 
125  // Access the slt tag flag.
130  bool slt_tag () const;
134  bool& slt_tag ();
135 
136  // Access the tag lepton four-momentum.
140  Fourvec& tag_lep ();
141 
145  const Fourvec& tag_lep () const;
146 
147  // Access the tag lepton energy deposition.
151  double slt_edep () const;
155  double& slt_edep ();
156 
157  // Access the uncorrected jet energy.
161  double e0 () const;
162 
166  double& e0 ();
167 
168  // Print the content of this object.
179  std::ostream& dump (std::ostream& s, bool full = false) const;
180 
181 
182 private:
183  // The object state.
187  bool _svx_tag;
188 
192  bool _slt_tag;
193 
198 
202  double _slt_edep;
203 
207  double _e0;
208 };
209 
210 
211 // Print this object.
212 std::ostream& operator<< (std::ostream& s, const Lepjets_Event_Jet& ev);
213 
214 // Helper function to translate jet type from integer to char/string
227 char jetTypeChar(int type);
228 
242 
255 template<class T>
257 jetTypeString(std::vector<T> jet_types)
258 {
259 
260 
261  std::ostringstream ret;
262 
263  for (size_t j = 0 ; j != jet_types.size() ; ++j) {
264  ret << jetTypeChar((int) (jet_types[j]));
265  }
266 
267  return ret.str();
268 }
269 
270 
271 } // namespace hitfit
272 
273 
274 #endif // not HITFIT_LEPJETS_EVENT_JET_H
275 
type
Definition: HCALResponse.h:21
tuple ret
prodAgent to be discontinued
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...
bool ev
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:180
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:57
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 ...