CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h

Go to the documentation of this file.
00001 #ifndef IsolationAlgos_IsoDepositExtractor_H
00002 #define IsolationAlgos_IsoDepositExtractor_H
00003 
00004 //
00005 //
00006 //
00007 
00008 
00009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00010                                                                                 
00011 #include "FWCore/Framework/interface/Event.h"
00012 #include "FWCore/Framework/interface/EventSetup.h"
00013 
00014 #include "DataFormats/TrackReco/interface/Track.h"
00015 #include "DataFormats/TrackReco/interface/TrackFwd.h"
00016 
00017 #include "DataFormats/Candidate/interface/Candidate.h"
00018 #include "DataFormats/Candidate/interface/CandidateFwd.h"
00019 
00020 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
00021 
00022 namespace reco {
00023   namespace isodeposit {
00024     
00025     class IsoDepositExtractor {
00026     public:
00028       virtual ~IsoDepositExtractor(){};
00029       
00030       
00033       virtual void fillVetos(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::TrackCollection & tracks) = 0;
00034       
00037       virtual reco::IsoDeposit deposit(const edm::Event & ev, const edm::EventSetup & evSetup, 
00038                                          const reco::Track & track) const = 0;
00039       
00041       virtual reco::IsoDeposit deposit(const edm::Event & ev, const edm::EventSetup & evSetup, 
00042                                          const reco::TrackBaseRef & track) const{
00043         return deposit(ev, evSetup, *track);
00044       }
00045       
00048       virtual reco::IsoDeposit deposit(const edm::Event & ev, const edm::EventSetup & evSetup, 
00049                                          const reco::Candidate & track) const {
00050         //track-based implementation as default <-- do I want this pure virtual?
00051         return deposit(ev, evSetup, reco::Track(10, 10, 
00052                                                 track.vertex(), track.momentum(), track.charge(),
00053                                                 reco::Track::CovarianceMatrix()));
00054       }
00055       
00057       virtual reco::IsoDeposit deposit(const edm::Event & ev, const edm::EventSetup & evSetup, 
00058                                          const reco::CandidateBaseRef & track) const{
00059         return deposit(ev, evSetup, *track);
00060       }
00061       
00065       virtual std::vector<reco::IsoDeposit> 
00066         deposits(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::Track & track) const{
00067         return std::vector<reco::IsoDeposit>(1, deposit(ev, evSetup, track));
00068       }
00069       
00072       virtual std::vector<reco::IsoDeposit> 
00073         deposits(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::TrackBaseRef & track) const{
00074         return deposits(ev, evSetup, *track);
00075       }
00076       
00079       virtual std::vector<reco::IsoDeposit> 
00080         deposits(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::Candidate & track) const{
00081         return deposits(ev, evSetup, 
00082                         reco::Track(10, 10,  
00083                                     track.vertex(), track.momentum(), track.charge(), 
00084                                     reco::Track::CovarianceMatrix()));
00085       }
00086       
00089       virtual std::vector<reco::IsoDeposit> 
00090         deposits(const edm::Event & ev, const edm::EventSetup & evSetup, const reco::CandidateBaseRef & track) const{
00091         return deposits(ev, evSetup, *track);
00092       }
00093       
00094     };
00095   }
00096 }
00097 #endif