CMS 3D CMS Logo

Lepjets_Event_Jet.cc
Go to the documentation of this file.
1 //
2 //
3 // File: src/Lepjets_Event_Jet.cc
4 // Purpose: Represent a `jet' in a Lepjets_Event.
5 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
6 //
7 // CMSSW File : src/Lepjets_Event_Jet.cc
8 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
9 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
10 //
11 
35 
36 namespace hitfit {
37 
39  int type,
40  const Vector_Resolution& res,
41  bool svx_tag /*= false*/,
42  bool slt_tag /*= false*/,
43  const Fourvec& tag_lep /*= Fourvec()*/,
44  double slt_edep /*= 0*/)
45  //
46  // Purpose: Constructor.
47  //
48  // Inputs:
49  // p - The 4-momentum.
50  // type - The type code.
51  // res - The resolution.
52  // svx_tag - SVX tag flag.
53  // slt_tag - SLT tag flag.
54  // tag_lep - SLT lepton 4-momentum.
55  // slt_edep - SLT lepton energy deposition.
56  //
58  _svx_tag(svx_tag),
59  _slt_tag(slt_tag),
60  _tag_lep(tag_lep),
61  _slt_edep(slt_edep),
62  _e0(p.e()) {}
63 
65  //
66  // Purpose: Access the SVX tag flag.
67  //
68  // Returns:
69  // The SVX tag flag.
70  //
71  {
72  return _svx_tag;
73  }
74 
76  //
77  // Purpose: Access the SVX tag flag.
78  //
79  // Returns:
80  // The SVX tag flag.
81  //
82  {
83  return _svx_tag;
84  }
85 
87  //
88  // Purpose: Access the SLT tag flag.
89  //
90  // Returns:
91  // The SLT tag flag.
92  //
93  {
94  return _slt_tag;
95  }
96 
98  //
99  // Purpose: Access the SLT tag flag.
100  //
101  // Returns:
102  // The SLT tag flag.
103  //
104  {
105  return _slt_tag;
106  }
107 
109  //
110  // Purpose: Access the tag lepton 4-momentum.
111  //
112  // Returns:
113  // The tag lepton 4-momentum.
114  //
115  {
116  return _tag_lep;
117  }
118 
120  //
121  // Purpose: Access the tag lepton 4-momentum.
122  //
123  // Returns:
124  // The tag lepton 4-momentum.
125  //
126  {
127  return _tag_lep;
128  }
129 
131  //
132  // Purpose: Access the tag lepton energy deposition.
133  //
134  // Returns:
135  // The tag lepton energy deposition.
136  //
137  {
138  return _slt_edep;
139  }
140 
142  //
143  // Purpose: Access the tag lepton energy deposition.
144  //
145  // Returns:
146  // The tag lepton energy deposition.
147  //
148  {
149  return _slt_edep;
150  }
151 
153  //
154  // Purpose: Access the uncorrected jet energy.
155  //
156  // Returns:
157  // The uncorrected jet energy.
158  //
159  {
160  return _e0;
161  }
162 
164  //
165  // Purpose: Access the uncorrected jet energy.
166  //
167  // Returns:
168  // The uncorrected jet energy.
169  //
170  {
171  return _e0;
172  }
173 
174  std::ostream& Lepjets_Event_Jet::dump(std::ostream& s, bool full /*= false*/) const
175  //
176  // Purpose: Dump out this object.
177  //
178  // Inputs:
179  // s - The stream to which to write.
180  // full - If true, dump all information for this object.
181  //
182  // Returns:
183  // The stream S.
184  //
185  {
187  if (_svx_tag)
188  s << " (svx)";
189  if (_slt_tag)
190  s << " (slt)";
191  if (full) {
192  if (_slt_tag) {
193  s << " tag lep: " << _tag_lep;
194  s << " edep: " << _slt_edep;
195  }
196  s << "\n";
197  }
198  return s;
199  }
200 
209  std::ostream& operator<<(std::ostream& s, const Lepjets_Event_Jet& l)
210  //
211  // Purpose: Dump out this object.
212  //
213  // Inputs:
214  // s - The stream to which to write.
215  // l - The object to dump.
216  //
217  // Returns:
218  // The stream S.
219  //
220  {
221  return l.dump(s);
222  }
223 
224  char jetTypeChar(int j)
225  //
226  // Purpose: Translate numeric jet type into char
227  //
228  // Inputs:
229  // j - jet type in integer
230  //
231  // Returns:
232  // the jet type in char
233  //
234  {
235  switch (j) {
236  case hitfit::isr_label:
237  return 'g';
238  case hitfit::lepb_label:
239  return 'b';
240  case hitfit::hadb_label:
241  return 'B';
242  case hitfit::hadw1_label:
243  return 'W';
244  case hitfit::hadw2_label:
245  return 'W';
246  case hitfit::higgs_label:
247  return 'h';
249  return '?';
250  default:
251  return '?';
252  }
253 
254  return '?';
255  }
256 
258  //
259  // Purpose: Translate numeric jet type into string
260  //
261  // Inputs:
262  // j - jet type in integer
263  //
264  // Returns:
265  // the jet type in string
266  //
267  {
268  switch (j) {
269  case hitfit::isr_label:
270  return std::string("g");
271  case hitfit::lepb_label:
272  return std::string("b");
273  case hitfit::hadb_label:
274  return std::string("B");
275  case hitfit::hadw1_label:
276  return std::string("W");
277  case hitfit::hadw2_label:
278  return std::string("W");
279  case hitfit::higgs_label:
280  return std::string("h");
282  return std::string("?");
283  default:
284  return std::string("?");
285  }
286 
287  return std::string("?");
288  }
289 
290 } // namespace hitfit
hitfit::Lepjets_Event_Jet::svx_tag
bool svx_tag() const
Definition: Lepjets_Event_Jet.cc:64
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
watchdog.const
const
Definition: watchdog.py:83
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
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_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
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
res
Definition: Electron.h:6
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:204
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
hitfit::Lepjets_Event_Jet::_svx_tag
bool _svx_tag
Definition: Lepjets_Event_Jet.h:180
hitfit::Lepjets_Event_Lep::dump
std::ostream & dump(std::ostream &s, bool full=false) const
Print the content of this object.
Definition: Lepjets_Event_Lep.cc:160
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
Lepjets_Event_Jet.h
Represent a jet 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
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
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