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
hitfit::Lepjets_Event_Jet::svx_tag
bool svx_tag() const
Definition: Lepjets_Event_Jet.cc:64
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:542
hitfit
Definition: Base_Constrainer.h:43
hitfit::Fourvec
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
hitfit::hadb_label
Definition: Lepjets_Event_Jet.h:57
hitfit::lepb_label
Definition: Lepjets_Event_Jet.h:56
hitfit::Vector_Resolution
Definition: Vector_Resolution.h:89
hitfit::Lepjets_Event_Jet::_tag_lep
Fourvec _tag_lep
Definition: Lepjets_Event_Jet.h:190
full
Definition: GenABIO.cc:168
hitfit::Lepjets_Event_Jet::dump
std::ostream & dump(std::ostream &s, bool full=false) const
Print the content of this object.
Definition: Lepjets_Event_Jet.cc:174
hitfit::Lepjets_Event_Jet::Lepjets_Event_Jet
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.
Definition: Lepjets_Event_Jet.cc:38
hitfit::hadw1_label
Definition: Lepjets_Event_Jet.h:58
alignCSCRings.s
s
Definition: alignCSCRings.py:92
hitfit::hadw2_label
Definition: Lepjets_Event_Jet.h:59
hitfit::Lepjets_Event_Jet
A class to represent a jet in an instance of Lepjets_Event class. The class is derived from the Lepje...
Definition: Lepjets_Event_Jet.h:76
Vector_Resolution.h
Calculate and represent resolution for a vector of momentum , pseudorapidity , and azimuthal angle .
hitfit::operator<<
std::ostream & operator<<(std::ostream &s, const Constraint_Intermed &ci)
Output stream operator, print the content of this Constraint_Intermed to an output stream.
Definition: Constraint_Intermed.cc:268
hitfit::Lepjets_Event_Jet::e0
double e0() const
Definition: Lepjets_Event_Jet.cc:152
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
hitfit::Lepjets_Event_Lep::p
Fourvec & p()
Return a reference to the four-momentum.
Definition: Lepjets_Event_Lep.cc:49
hitfit::Lepjets_Event_Jet::tag_lep
Fourvec & tag_lep()
Definition: Lepjets_Event_Jet.cc:119
hitfit::jetTypeString
std::string jetTypeString(int type)
Helper function: Translate jet type code from integer to char. The following notation is used for eac...
Definition: Lepjets_Event_Jet.cc:257
hitfit::Jet_Labels
Jet_Labels
Definition: Lepjets_Event_Jet.h:54
res
Definition: Electron.h:6
hitfit::Lepjets_Event_Jet::_slt_tag
bool _slt_tag
Definition: Lepjets_Event_Jet.h:185
hitfit::jetTypeChar
char jetTypeChar(int type)
Helper function: Translate jet type code from integer to char. The following notation is used for eac...
Definition: Lepjets_Event_Jet.cc:224
hitfit::Lepjets_Event_Jet::_e0
double _e0
Definition: Lepjets_Event_Jet.h:200
hitfit::Lepjets_Event_Jet::_slt_edep
double _slt_edep
Definition: Lepjets_Event_Jet.h:195
hitfit::higgs_label
Definition: Lepjets_Event_Jet.h:60
hitfit::Lepjets_Event_Jet::slt_tag
bool slt_tag() const
Definition: Lepjets_Event_Jet.cc:86
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
fourvec.h
Define three-vector and four-vector classes for the HitFit package, and supply a few additional opera...
hitfit::Lepjets_Event_Jet::_svx_tag
bool _svx_tag
Definition: Lepjets_Event_Jet.h:180
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
Lepjets_Event_Lep.h
Represent a lepton in an instance of Lepjets_Event class.
hitfit::unknown_label
Definition: Lepjets_Event_Jet.h:61
hitfit::isr_label
Definition: Lepjets_Event_Jet.h:55
hitfit::Lepjets_Event_Jet::slt_edep
double slt_edep() const
Definition: Lepjets_Event_Jet.cc:130
hitfit::Lepjets_Event_Lep
Represent a lepton in an instance of Lepjets_Event class. This class hold the following information:
Definition: Lepjets_Event_Lep.h:64