Go to the documentation of this file.00001 #ifndef CommonToolsParticleFlow_PDCandWithSuperCluster_H
00002 #define CommonToolsParticleFlow_PDCandWithSuperCluster_H
00003
00004 #include <string>
00005 #include <vector>
00006
00007
00008 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
00009 #include "DataFormats/TrackReco/interface/Track.h"
00010 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00011 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
00012 #include "DataFormats/EgammaCandidates/interface/Photon.h"
00013 #include "DataFormats/EgammaCandidates/interface/GsfElectron.h"
00014 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00015 #include "DataFormats/TrackReco/interface/Track.h"
00016 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00017 #include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h"
00018
00019
00020 class PFCandWithSuperClusterExtractor : public reco::isodeposit::IsoDepositExtractor {
00021
00022 public:
00023
00024 PFCandWithSuperClusterExtractor(){};
00025 PFCandWithSuperClusterExtractor(const edm::ParameterSet& par);
00026
00027 virtual ~PFCandWithSuperClusterExtractor(){}
00028
00029 virtual void fillVetos (const edm::Event & ev,
00030 const edm::EventSetup & evSetup, const reco::TrackCollection & cand) { }
00031
00032
00033 virtual reco::IsoDeposit deposit (const edm::Event & ev,
00034 const edm::EventSetup & evSetup, const reco::Track & muon) const {
00035 return depositFromObject(ev, evSetup, muon);
00036 }
00037
00038 virtual reco::IsoDeposit deposit (const edm::Event & ev,
00039 const edm::EventSetup & evSetup, const reco::Candidate & cand) const {
00040
00041 const reco::Photon * myPhoton= dynamic_cast<const reco::Photon*>(&cand);
00042 if(myPhoton)
00043 return depositFromObject(ev, evSetup,*myPhoton);
00044
00045 const reco::GsfElectron * myElectron = dynamic_cast<const reco::GsfElectron*>(&cand);
00046 if(myElectron)
00047 return depositFromObject(ev,evSetup,*myElectron);
00048
00049 const reco::PFCandidate * myPFCand = dynamic_cast<const reco::PFCandidate*>(&cand);
00050 return depositFromObject(ev, evSetup,*myPFCand);
00051 }
00052
00053 private:
00054 reco::IsoDeposit::Veto veto( const reco::IsoDeposit::Direction & dir) const;
00055
00056 reco::IsoDeposit depositFromObject( const edm::Event & ev,
00057 const edm::EventSetup & evSetup, const reco::Photon &cand) const ;
00058
00059 reco::IsoDeposit depositFromObject( const edm::Event & ev,
00060 const edm::EventSetup & evSetup, const reco::GsfElectron &cand) const ;
00061
00062 reco::IsoDeposit depositFromObject( const edm::Event & ev,
00063 const edm::EventSetup & evSetup, const reco::Track &cand) const ;
00064
00065 reco::IsoDeposit depositFromObject( const edm::Event & ev,
00066 const edm::EventSetup & evSetup, const reco::PFCandidate &cand) const ;
00067
00068
00069 edm::InputTag thePFCandTag;
00070 std::string theDepositLabel;
00071 bool theVetoSuperClusterMatch;
00072 bool theMissHitVetoSuperClusterMatch;
00073 double theDiff_r;
00074 double theDiff_z;
00075 double theDR_Max;
00076 double theDR_Veto;
00077 };
00078
00079
00080 #endif