00001 #ifndef EgammaIsolationAlgos_ElectronTkIsolation_h
00002 #define EgammaIsolationAlgos_ElectronTkIsolation_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <vector>
00013 #include <functional>
00014
00015
00016 #include "TObjArray.h"
00017
00018
00019 #include "FWCore/Framework/interface/ESHandle.h"
00020 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00021 #include "DataFormats/TrackReco/interface/Track.h"
00022 #include "RecoEgamma/EgammaIsolationAlgos/interface/EgammaTrackSelector.h"
00023
00024 #include<string>
00025
00026
00027 class ElectronTkIsolation {
00028 public:
00029
00030
00031 ElectronTkIsolation ( double extRadius,
00032 double intRadius,
00033 double ptLow,
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 ptLow_(ptLow),
00044 lip_(lip),
00045 drb_(drb),
00046 trackCollection_(trackCollection),
00047 beamPoint_(beamPoint) {
00048
00049 setDzOption("vz");
00050
00051 }
00052
00053 ElectronTkIsolation ( double extRadius,
00054 double intRadiusBarrel,
00055 double intRadiusEndcap,
00056 double stripBarrel,
00057 double stripEndcap,
00058 double ptLow,
00059 double lip,
00060 double drb,
00061 const reco::TrackCollection* trackCollection,
00062 reco::TrackBase::Point beamPoint) :
00063 extRadius_(extRadius),
00064 intRadiusBarrel_(intRadiusBarrel),
00065 intRadiusEndcap_(intRadiusEndcap),
00066 stripBarrel_(stripBarrel),
00067 stripEndcap_(stripEndcap),
00068 ptLow_(ptLow),
00069 lip_(lip),
00070 drb_(drb),
00071 trackCollection_(trackCollection),
00072 beamPoint_(beamPoint) {
00073
00074 setDzOption("vz");
00075
00076 }
00077
00078 ElectronTkIsolation ( double extRadius,
00079 double intRadiusBarrel,
00080 double intRadiusEndcap,
00081 double stripBarrel,
00082 double stripEndcap,
00083 double ptLow,
00084 double lip,
00085 double drb,
00086 const reco::TrackCollection*,
00087 reco::TrackBase::Point beamPoint,
00088 const std::string&) ;
00089
00090
00091 ~ElectronTkIsolation() ;
00092
00093
00094
00095 void setDzOption(const std::string &s) {
00096 if( ! s.compare("dz") ) dzOption_ = egammaisolation::EgammaTrackSelector::dz;
00097 else if( ! s.compare("vz") ) dzOption_ = egammaisolation::EgammaTrackSelector::vz;
00098 else if( ! s.compare("bs") ) dzOption_ = egammaisolation::EgammaTrackSelector::bs;
00099 else if( ! s.compare("vtx") )dzOption_ = egammaisolation::EgammaTrackSelector::vtx;
00100 else dzOption_ = egammaisolation::EgammaTrackSelector::dz;
00101 }
00102
00103 int getNumberTracks(const reco::GsfElectron*) const ;
00104 double getPtTracks (const reco::GsfElectron*) const ;
00105
00106 private:
00107
00108 double extRadius_ ;
00109 double intRadiusBarrel_ ;
00110 double intRadiusEndcap_ ;
00111 double stripBarrel_ ;
00112 double stripEndcap_ ;
00113 double ptLow_ ;
00114 double lip_ ;
00115 double drb_;
00116 const reco::TrackCollection *trackCollection_ ;
00117 reco::TrackBase::Point beamPoint_;
00118
00119 int dzOption_;
00120
00121 std::pair<int,double>getIso(const reco::GsfElectron*) const ;
00122 };
00123
00124 #endif