CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/RecoEgamma/EgammaIsolationAlgos/interface/PhotonTkIsolation.h

Go to the documentation of this file.
00001 #ifndef PhotonTkIsolation_h
00002 #define PhotonTkIsolation_h
00003 
00004 //*****************************************************************************
00005 // File:      PhotonTkIsolation.h
00006 // ----------------------------------------------------------------------------
00007 // OrigAuth:  Matthias Mozer
00008 // Institute: IIHE-VUB
00009 //=============================================================================
00010 //*****************************************************************************
00011 
00012 //C++ includes
00013 #include <vector>
00014 #include <string>
00015 #include <functional>
00016 
00017 //CMSSW includes
00018 #include "FWCore/Framework/interface/ESHandle.h"
00019 #include "DataFormats/Candidate/interface/Candidate.h"
00020 #include "DataFormats/TrackReco/interface/Track.h"
00021 #include "DataFormats/VertexReco/interface/Vertex.h"
00022 #include "RecoEgamma/EgammaIsolationAlgos/interface/EgammaTrackSelector.h"
00023 
00024 
00025 
00026 
00027 class PhotonTkIsolation {
00028  public:
00029   
00030   //constructors
00031   PhotonTkIsolation (double extRadius,
00032                      double intRadius,
00033                      double etLow,
00034                      double lip,
00035                      double drb,
00036                      const reco::TrackCollection* trackCollection,
00037                      reco::TrackBase::Point beamPoint) :
00038   extRadius_(extRadius),
00039   intRadiusBarrel_(intRadius),
00040   intRadiusEndcap_(intRadius),
00041   stripBarrel_(0.0),
00042   stripEndcap_(0.0),
00043   etLow_(etLow),
00044   lip_(lip),
00045   drb_(drb),
00046   trackCollection_(trackCollection),
00047   beamPoint_(beamPoint) {
00048     
00049     setDzOption("vz");
00050 
00051   }
00052 
00053   PhotonTkIsolation (double extRadius,
00054                      double intRadius,
00055                      double strip,
00056                      double etLow,
00057                      double lip,
00058                      double drb,
00059                      const reco::TrackCollection* trackCollection,
00060                      reco::TrackBase::Point beamPoint) :
00061   extRadius_(extRadius),
00062   intRadiusBarrel_(intRadius),
00063   intRadiusEndcap_(intRadius),
00064   stripBarrel_(strip),
00065   stripEndcap_(strip),
00066   etLow_(etLow),
00067   lip_(lip),
00068   drb_(drb),
00069   trackCollection_(trackCollection),
00070   beamPoint_(beamPoint) {
00071     
00072     setDzOption("vz");
00073 
00074   }
00075 
00076 
00077   PhotonTkIsolation (double extRadius,
00078                      double intRadiusBarrel,
00079                              double intRadiusEndcap,
00080                              double stripBarrel,
00081                      double stripEndcap,                
00082                      double etLow,
00083                      double lip,
00084                      double drb,
00085                      const reco::TrackCollection* trackCollection,
00086                      reco::TrackBase::Point beamPoint) :
00087   extRadius_(extRadius),
00088   intRadiusBarrel_(intRadiusBarrel),
00089   intRadiusEndcap_(intRadiusEndcap),
00090   stripBarrel_(stripBarrel),
00091   stripEndcap_(stripEndcap),
00092   etLow_(etLow),
00093   lip_(lip),
00094   drb_(drb),
00095   trackCollection_(trackCollection),
00096   beamPoint_(beamPoint) {
00097     
00098     setDzOption("vz");
00099 
00100   }
00101 
00102 
00103 
00104   PhotonTkIsolation (double extRadius,
00105                      double intRadiusBarrel,
00106                              double intRadiusEndcap,
00107                              double stripBarrel,
00108                      double stripEndcap,                
00109                      double etLow,
00110                      double lip,
00111                      double drb,
00112                      const reco::TrackCollection*,
00113                      reco::TrackBase::Point beamPoint,
00114                      const std::string&) ;
00115 
00116    //destructor 
00117   ~PhotonTkIsolation() ;
00118     //methods
00119 
00120   int getNumberTracks(const reco::Candidate*) const ;
00121   double getPtTracks (const reco::Candidate*) const ;
00122 
00123   void setDzOption(const std::string &s) {
00124     if( ! s.compare("dz") )      dzOption_ = egammaisolation::EgammaTrackSelector::dz;
00125     else if( ! s.compare("vz") ) dzOption_ = egammaisolation::EgammaTrackSelector::vz;
00126     else if( ! s.compare("bs") ) dzOption_ = egammaisolation::EgammaTrackSelector::bs;
00127     else if( ! s.compare("vtx") )dzOption_ = egammaisolation::EgammaTrackSelector::vtx;
00128     else                         dzOption_ = egammaisolation::EgammaTrackSelector::dz;
00129   }
00130 
00131  private:
00132 
00133   double extRadius_ ;
00134   double intRadiusBarrel_ ;
00135   double intRadiusEndcap_ ;
00136   double stripBarrel_;
00137   double stripEndcap_;
00138   double etLow_ ;
00139   double lip_ ;
00140   double drb_;
00141 
00142   const reco::TrackCollection *trackCollection_ ;
00143   reco::TrackBase::Point beamPoint_;
00144 
00145   int dzOption_;
00146 
00147   std::pair<int,double>getIso(const reco::Candidate*) const ;
00148 
00149 };
00150 
00151 #endif