CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_9_patch3/src/PhysicsTools/IsolationAlgos/plugins/CandViewExtractor.h

Go to the documentation of this file.
00001 #ifndef MuonIsolation_CandViewExtractor_H
00002 #define MuonIsolation_CandViewExtractor_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/Candidate/interface/Candidate.h"
00012 #include "DataFormats/Candidate/interface/CandidateFwd.h"
00013 #include "PhysicsTools/IsolationAlgos/interface/IsoDepositExtractor.h"
00014 
00015 namespace muonisolation {
00016 
00017 class CandViewExtractor : public reco::isodeposit::IsoDepositExtractor {
00018 
00019 public:
00020 
00021   CandViewExtractor(){};
00022   CandViewExtractor(const edm::ParameterSet& par);
00023 
00024   virtual ~CandViewExtractor(){}
00025 
00026   virtual void fillVetos (const edm::Event & ev,
00027       const edm::EventSetup & evSetup, const reco::TrackCollection & cand) { }
00028 
00029 /*  virtual reco::IsoDeposit::Vetos vetos(const edm::Event & ev,
00030       const edm::EventSetup & evSetup, const reco::Candidate & cand) const;
00031 
00032   virtual reco::IsoDeposit::Vetos vetos(const edm::Event & ev,
00033       const edm::EventSetup & evSetup, const reco::Track & cand) const;
00034 */
00035 
00036   virtual reco::IsoDeposit deposit (const edm::Event & ev,
00037       const edm::EventSetup & evSetup, const reco::Track & muon) const { 
00038         return depositFromObject(ev, evSetup, muon);
00039   }
00040 
00041   virtual reco::IsoDeposit deposit (const edm::Event & ev,
00042       const edm::EventSetup & evSetup, const reco::Candidate & muon) const { 
00043         return depositFromObject(ev, evSetup, muon);
00044   }
00045 
00046 private:
00047   reco::IsoDeposit::Veto veto( const reco::IsoDeposit::Direction & dir) const;
00048 
00049   template<typename T>
00050   reco::IsoDeposit depositFromObject( const edm::Event & ev,
00051       const edm::EventSetup & evSetup, const T &cand) const ;
00052    
00053   // Parameter set
00054   edm::InputTag theCandViewTag; // Track Collection Label
00055   std::string theDepositLabel;         // name for deposit
00056   double theDiff_r;                    // transverse distance to vertex
00057   double theDiff_z;                    // z distance to vertex
00058   double theDR_Max;                    // Maximum cone angle for deposits
00059   double theDR_Veto;                   // Veto cone angle
00060 };
00061 
00062 }
00063 
00064 #endif