CMS 3D CMS Logo

Lepjets_Event_Lep.h
Go to the documentation of this file.
1 //
2 //
3 // File: hitfit/Lepjets_Event_Lep.h
4 // Purpose: Represent a `lepton' in a Lepjets_Event class.
5 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
6 //
7 // For each lepton, we store:
8 //
9 // - 4-momentum
10 // - type code
11 // - Vector_Resolution
12 //
13 // CMSSW File : interface/Lepjets_Event_Lep.h
14 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
15 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
16 //
17 
39 #ifndef HITFIT_LEPJETS_EVENT_LEP_H
40 #define HITFIT_LEPJETS_EVENT_LEP_H
41 
44 #include <iosfwd>
45 
46 namespace hitfit {
47 
52  lepton_label = 1, // generic lepton
55  };
56 
65  //
66  // Purpose: Represent a `lepton' in a Lepjets_Event class.
67  //
68  {
69  public:
70  // Constructor.
80  Lepjets_Event_Lep(const Fourvec& p, int type, const Vector_Resolution& res);
81 
82  // Access the 4-momentum.
86  Fourvec& p();
87 
91  const Fourvec& p() const;
92 
93  // Access the type code.
97  int& type();
98 
102  int type() const;
103 
104  // Access the resolution.
108  const Vector_Resolution& res() const;
109 
114 
115  // Return resolutions for this object.
120  double p_sigma() const;
121 
125  double eta_sigma() const;
126 
130  double phi_sigma() const;
131 
132  // Smear this object.
133  // If SMEAR_DIR is false, smear the momentum only.
142  void smear(CLHEP::HepRandomEngine& engine, bool smear_dir = false);
143 
144  // Dump out this object.
155  std::ostream& dump(std::ostream& s, bool full = false) const;
156 
157  // Sort on pt.
164  bool operator<(const Lepjets_Event_Lep& x) const;
165 
166  private:
167  // The object state.
168 
173 
177  int _type;
178 
183  };
184 
185  // Print the object.
186  std::ostream& operator<<(std::ostream& s, const Lepjets_Event_Lep& ev);
187 
188 } // namespace hitfit
189 
190 #endif // not HITFIT_LEPJETS_EVENT_LEP_H
bool operator<(const Lepjets_Event_Lep &x) const
Comparison operator for sorting purpose, based on $p_{T}$.
const Vector_Resolution & res() const
Return a constant reference to the resolution.
double phi_sigma() const
Return the uncertainty in azimuthal angle .
Calculate and represent resolution for a vector of momentum , pseudorapidity , and azimuthal angle ...
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...
void smear(CLHEP::HepRandomEngine &engine, bool smear_dir=false)
Smear this object.
double p_sigma() const
Return the uncertainty in momentum or ( or if the lepton is a tracking object).
Lepjets_Event_Lep(const Fourvec &p, int type, const Vector_Resolution &res)
Constructor, create a new instance of Lepjets_Event_Lep.
Definition: Electron.h:6
int & type()
Return a reference to the type code.
Definition: GenABIO.cc:168
CLHEP::HepLorentzVector Fourvec
Typedef for a HepLorentzVector.
Definition: fourvec.h:55
std::ostream & dump(std::ostream &s, bool full=false) const
Print the content of this object.
Fourvec & p()
Return a reference to the four-momentum.
double eta_sigma() const
Return the uncertainty in pseudorapidity .
std::ostream & operator<<(std::ostream &s, const Constraint_Intermed &ci)
Output stream operator, print the content of this Constraint_Intermed to an output stream...
float x
Calculate and represent resolution for a vector of , pseudorapidity , and azimuthal angle ...