CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_14/src/TopQuarkAnalysis/TopHitFit/interface/Lepjets_Event_Lep.h

Go to the documentation of this file.
00001 //
00002 // $Id: Lepjets_Event_Lep.h,v 1.1 2011/05/26 09:46:53 mseidel Exp $
00003 //
00004 // File: hitfit/Lepjets_Event_Lep.h
00005 // Purpose: Represent a `lepton' in a Lepjets_Event class.
00006 // Created: Jul, 2000, sss, based on run 1 mass analysis code.
00007 //
00008 // For each lepton, we store:
00009 //
00010 //   - 4-momentum
00011 //   - type code
00012 //   - Vector_Resolution
00013 //
00014 // CMSSW File      : interface/Lepjets_Event_Lep.h
00015 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
00016 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
00017 //
00018 
00019 
00041 #ifndef HITFIT_LEPJETS_EVENT_LEP_H
00042 #define HITFIT_LEPJETS_EVENT_LEP_H
00043 
00044 
00045 #include "TopQuarkAnalysis/TopHitFit/interface/fourvec.h"
00046 #include "TopQuarkAnalysis/TopHitFit/interface/Vector_Resolution.h"
00047 #include <iosfwd>
00048 
00049 
00050 namespace hitfit {
00051 
00055 enum Lepton_Labels {
00056   lepton_label = 1,  // generic lepton
00057   electron_label = 2,
00058   muon_label = 3
00059 };
00060 
00061 
00069 class Lepjets_Event_Lep
00070 //
00071 // Purpose: Represent a `lepton' in a Lepjets_Event class.
00072 //
00073 {
00074 public:
00075   // Constructor.
00085   Lepjets_Event_Lep (const Fourvec& p,
00086                      int type,
00087                      const Vector_Resolution& res);
00088 
00089   // Access the 4-momentum.
00093   Fourvec& p ();
00094 
00098   const Fourvec& p () const;
00099 
00100   // Access the type code.
00104   int& type ();
00105 
00109   int type () const;
00110 
00111   // Access the resolution.
00115   const Vector_Resolution& res () const;
00116 
00120   Vector_Resolution& res ();
00121 
00122   // Return resolutions for this object.
00127   double p_sigma () const;
00128 
00132   double eta_sigma () const;
00133 
00137   double phi_sigma () const;
00138 
00139   // Smear this object.
00140   // If SMEAR_DIR is false, smear the momentum only.
00149   void smear (CLHEP::HepRandomEngine& engine, bool smear_dir = false);
00150 
00151   // Dump out this object.
00162   std::ostream& dump (std::ostream& s, bool full = false) const;
00163 
00164   // Sort on pt.
00171   bool operator< (const Lepjets_Event_Lep& x) const;
00172 
00173 
00174 private:
00175   // The object state.
00176 
00180   Fourvec _p;
00181 
00185   int _type;
00186 
00190   Vector_Resolution _res;
00191 };
00192 
00193 
00194 // Print the object.
00195 std::ostream& operator<< (std::ostream& s, const Lepjets_Event_Lep& ev);
00196 
00197 
00198 } // namespace hitfit
00199 
00200 
00201 #endif // not HITFIT_LEPJETS_EVENT_LEP_H
00202