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/ParticleFlowCandidate/interface/PFCandidateFwd.h"
00014 #include "DataFormats/TrackReco/interface/Track.h"
00015 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00016 #include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h"
00017
00018
00019 class PFCandWithSuperClusterExtractor : public reco::isodeposit::IsoDepositExtractor {
00020
00021 public:
00022
00023 PFCandWithSuperClusterExtractor(){};
00024 PFCandWithSuperClusterExtractor(const edm::ParameterSet& par);
00025
00026 virtual ~PFCandWithSuperClusterExtractor(){}
00027
00028 virtual void fillVetos (const edm::Event & ev,
00029 const edm::EventSetup & evSetup, const reco::TrackCollection & cand) { }
00030
00031
00032 virtual reco::IsoDeposit deposit (const edm::Event & ev,
00033 const edm::EventSetup & evSetup, const reco::Track & muon) const {
00034 return depositFromObject(ev, evSetup, muon);
00035 }
00036
00037 virtual reco::IsoDeposit deposit (const edm::Event & ev,
00038 const edm::EventSetup & evSetup, const reco::Candidate & photon) const {
00039
00040 const reco::Photon * myPhoton= dynamic_cast<const reco::Photon*>(&photon);
00041 if(myPhoton)
00042 return depositFromObject(ev, evSetup,*myPhoton);
00043
00044 const reco::PFCandidate * myPFCand = dynamic_cast<const reco::PFCandidate*>(&photon);
00045 return depositFromObject(ev, evSetup,*myPFCand);
00046 }
00047
00048 private:
00049 reco::IsoDeposit::Veto veto( const reco::IsoDeposit::Direction & dir) const;
00050
00051 reco::IsoDeposit depositFromObject( const edm::Event & ev,
00052 const edm::EventSetup & evSetup, const reco::Photon &cand) const ;
00053
00054 reco::IsoDeposit depositFromObject( const edm::Event & ev,
00055 const edm::EventSetup & evSetup, const reco::Track &cand) const ;
00056
00057 reco::IsoDeposit depositFromObject( const edm::Event & ev,
00058 const edm::EventSetup & evSetup, const reco::PFCandidate &cand) const ;
00059
00060
00061 edm::InputTag thePFCandTag;
00062 std::string theDepositLabel;
00063 bool theVetoSuperClusterMatch;
00064 double theDiff_r;
00065 double theDiff_z;
00066 double theDR_Max;
00067 double theDR_Veto;
00068 };
00069
00070
00071 #endif