CMS 3D CMS Logo

Lepjets_Event.h
Go to the documentation of this file.
1 //
2 //
3 // File: hitfit/Lepjets_Event.h
4 // Purpose: Represent a simple `event' consisting of leptons and jets.
5 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
6 //
7 // An instance of this class holds a list of `leptons' (as represented
8 // by Lepjets_Event_Lep) and `jets' (as represented by Lepjets_Event_Jet).
9 // We also record:
10 //
11 // - Missing Et
12 // - z-vertex
13 // - run and event number
14 //
15 // CMSSW File : interface/Lepjets_Event.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_H
42 #define HITFIT_LEPJETS_EVENT_H
43 
46 #include <vector>
47 #include <iosfwd>
48 
49 namespace hitfit {
50 
63  //
64  // Purpose: Represent a simple `event' consisting of leptons and jets.
65  //
66  {
67  public:
68  // Constructor.
76  Lepjets_Event(int runnum, int evnum);
77 
78  // Get the run and event number.
79 
83  const int& runnum() const;
84 
88  int& runnum();
89 
93  const int& evnum() const;
94 
98  int& evnum();
99 
100  // Get the length of the lepton and jet lists.
105 
110 
111  // Access leptons and jets.
112 
119 
126 
133 
140 
141  // Access missing Et.
145  Fourvec& met();
146 
150  const Fourvec& met() const;
151 
152  // Access kt resolution.
153 
157  Resolution& kt_res();
158 
162  const Resolution& kt_res() const;
163 
164  // Access the z-vertex.
165 
169  double zvertex() const;
170 
174  double& zvertex();
175 
176  // Access the isMC flag.
180  bool isMC() const;
181 
185  void setMC(bool isMC);
186 
187  // Access the discriminants.
192  double& dlb();
193 
198  double dlb() const;
199 
204  double& dnn();
205 
210  double dnn() const;
211 
212  // Sum all objects (leptons or jets) with type TYPE.
219  Fourvec sum(int type) const;
220 
221  // Calculate kt --- sum of all objects plus missing Et.
226  Fourvec kt() const;
227 
228  // Add new objects to the event.
234  void add_lep(const Lepjets_Event_Lep& lep);
235 
241  void add_jet(const Lepjets_Event_Jet& jet);
242 
243  // Smear the objects in the event according to their resolutions.
252  void smear(CLHEP::HepRandomEngine& engine, bool smear_dir = false);
253 
254  // Sort according to pt.
259  void sort();
260 
261  // Get jet types
265  std::vector<int> jet_types() const;
266 
267  // Set jet types
271  bool set_jet_types(const std::vector<int>&);
272 
273  // Remove objects failing pt and eta cuts.
284  int cut_leps(double pt_cut, double eta_cut);
285 
296  int cut_jets(double pt_cut, double eta_cut);
297 
298  // Remove all but the first N jets.
305 
306  // Dump this object.
317  std::ostream& dump(std::ostream& s, bool full = false) const;
318 
330 
331  private:
332  // The lepton and jet lists.
333 
337  std::vector<Lepjets_Event_Lep> _leps;
338 
342  std::vector<Lepjets_Event_Jet> _jets;
343 
344  // Other event state.
349 
354 
358  double _zvertex;
359 
363  bool _isMC;
364 
368  int _runnum;
369 
373  int _evnum;
374 
378  double _dlb;
379 
383  double _dnn;
384  };
385 
386  // Print the object.
387  std::ostream& operator<<(std::ostream& s, const Lepjets_Event& ev);
388 
389 } // namespace hitfit
390 
391 #endif // not HITFIT_LEPJETS_EVENT_H
hitfit::Lepjets_Event::jet_types
std::vector< int > jet_types() const
Return the jet types in the event.
Definition: Lepjets_Event.cc:408
mps_fire.i
i
Definition: mps_fire.py:428
hitfit
Definition: Base_Constrainer.h:43
hitfit::Fourvec
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
hitfit::Lepjets_Event::jet_permutation
std::string jet_permutation() const
Return a string representing the jet permutation. The following notation is used for each type of jet...
Definition: Lepjets_Event.cc:541
hitfit::Lepjets_Event::_evnum
int _evnum
Definition: Lepjets_Event.h:373
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
hitfit::Lepjets_Event::runnum
const int & runnum() const
Return a constant reference to the run number.
Definition: Lepjets_Event.cc:56
hitfit::Lepjets_Event::trimjets
void trimjets(std::vector< Lepjets_Event_Jet >::size_type n)
Remove all but the first n jets.
Definition: Lepjets_Event.cc:497
hitfit::Lepjets_Event::_dnn
double _dnn
Definition: Lepjets_Event.h:383
hitfit::Lepjets_Event::lep
Lepjets_Event_Lep & lep(std::vector< Lepjets_Event_Lep >::size_type i)
Return a reference to lepton at index position i.
Definition: Lepjets_Event.cc:122
full
Definition: GenABIO.cc:168
hitfit::Lepjets_Event::evnum
const int & evnum() const
Return a constant reference to the event number.
Definition: Lepjets_Event.cc:78
hitfit::Lepjets_Event::_dlb
double _dlb
Definition: Lepjets_Event.h:378
hitfit::Lepjets_Event::Lepjets_Event
Lepjets_Event(int runnum, int evnum)
Constructor.
Definition: Lepjets_Event.cc:46
hitfit::Lepjets_Event::_leps
std::vector< Lepjets_Event_Lep > _leps
Definition: Lepjets_Event.h:337
hitfit::Lepjets_Event::_zvertex
double _zvertex
Definition: Lepjets_Event.h:358
alignCSCRings.s
s
Definition: alignCSCRings.py:92
hitfit::Lepjets_Event::met
Fourvec & met()
Return a reference to the missing transverse energy.
Definition: Lepjets_Event.cc:182
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
hitfit::Lepjets_Event::njets
std::vector< Lepjets_Event_Jet >::size_type njets() const
Return the number of jets in the event.
Definition: Lepjets_Event.cc:111
hitfit::Lepjets_Event
Represent a simple event consisting of lepton(s) and jet(s). An instance of this class holds a list o...
Definition: Lepjets_Event.h:62
hitfit::Lepjets_Event::isMC
bool isMC() const
Return the Monte Carlo flag.
Definition: Lepjets_Event.cc:248
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::Lepjets_Event::_met
Fourvec _met
Definition: Lepjets_Event.h:348
hitfit::Lepjets_Event::sum
Fourvec sum(int type) const
Return the sum of all objects' four-momentum which have a particular type.
Definition: Lepjets_Event.cc:314
hitfit::Lepjets_Event::cut_jets
int cut_jets(double pt_cut, double eta_cut)
Remove jets which fail transverse momentum and pseudorapidity cut.
Definition: Lepjets_Event.cc:481
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::_kt_res
Resolution _kt_res
Definition: Lepjets_Event.h:353
hitfit::Lepjets_Event::add_jet
void add_jet(const Lepjets_Event_Jet &jet)
Add a new jet to the event.
Definition: Lepjets_Event.cc:361
hitfit::Lepjets_Event::cut_leps
int cut_leps(double pt_cut, double eta_cut)
Remove leptons which fail transverse momentum and pseudorapidity cut.
Definition: Lepjets_Event.cc:465
hitfit::Lepjets_Event::set_jet_types
bool set_jet_types(const std::vector< int > &)
Set the jet types in the event.
Definition: Lepjets_Event.cc:420
hitfit::Lepjets_Event::_jets
std::vector< Lepjets_Event_Jet > _jets
Definition: Lepjets_Event.h:342
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
hitfit::Lepjets_Event::dump
std::ostream & dump(std::ostream &s, bool full=false) const
Print the content of this object.
Definition: Lepjets_Event.cc:510
hitfit::Lepjets_Event::smear
void smear(CLHEP::HepRandomEngine &engine, bool smear_dir=false)
Smear the objects in the event according to their resolutions.
Definition: Lepjets_Event.cc:372
hitfit::Lepjets_Event::jet
Lepjets_Event_Jet & jet(std::vector< Lepjets_Event_Jet >::size_type i)
Return a reference to jet at index position i.
Definition: Lepjets_Event.cc:137
hitfit::Resolution
Definition: Resolution.h:98
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
hitfit::Lepjets_Event::sort
void sort()
Sort objects in the event according to their transverse momentum .
Definition: Lepjets_Event.cc:399
hitfit::Lepjets_Event::dlb
double & dlb()
Return a reference to the value of low-bias (LB) discriminant (Irrelevant for non-D0 experiment).
Definition: Lepjets_Event.cc:281
hitfit::Lepjets_Event::_isMC
bool _isMC
Definition: Lepjets_Event.h:363
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
hitfit::Lepjets_Event::zvertex
double zvertex() const
Return the value of z-vertex.
Definition: Lepjets_Event.cc:226
hitfit::Lepjets_Event::dnn
double & dnn()
Return a reference to the value of neural network (NN) discriminant (Irrelevant for non-D0 experiment...
Definition: Lepjets_Event.cc:303
hitfit::Lepjets_Event::kt_res
Resolution & kt_res()
Return a reference to the resolution.
Definition: Lepjets_Event.cc:204
hitfit::Lepjets_Event::kt
Fourvec kt() const
Return the sum of all objects' four-momentum and missing transverse energy.
Definition: Lepjets_Event.cc:335
hitfit::Lepjets_Event::setMC
void setMC(bool isMC)
Set the Monte Carlo flag.
Definition: Lepjets_Event.cc:259
hitfit::Lepjets_Event::nleps
std::vector< Lepjets_Event_Lep >::size_type nleps() const
Return the number of leptons in the event.
Definition: Lepjets_Event.cc:100
Lepjets_Event_Jet.h
Represent a jet in an instance of Lepjets_Event class.
Lepjets_Event_Lep.h
Represent a lepton in an instance of Lepjets_Event class.
hitfit::Lepjets_Event::add_lep
void add_lep(const Lepjets_Event_Lep &lep)
Add a new lepton to the event.
Definition: Lepjets_Event.cc:350
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
hitfit::Lepjets_Event::_runnum
int _runnum
Definition: Lepjets_Event.h:368