Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:27:04

0001 #ifndef MuonIsolation_MuIsoByTrackPt_H
0002 #define MuonIsolation_MuIsoByTrackPt_H
0003 
0004 #include "RecoMuon/MuonIsolation/interface/MuIsoBaseAlgorithm.h"
0005 #include "RecoMuon/MuonIsolation/interface/CutsConeSizeFunction.h"
0006 
0007 namespace reco {
0008   namespace isodeposit {
0009     class IsoDepositExtractor;
0010   }
0011 }  // namespace reco
0012 namespace muonisolation {
0013   class IsolatorByDeposit;
0014 }
0015 namespace reco {
0016   class Track;
0017 }
0018 namespace edm {
0019   class Event;
0020 }
0021 namespace edm {
0022   class EventSetup;
0023 }
0024 namespace edm {
0025   class ConsumesCollector;
0026 }
0027 namespace edm {
0028   class ParameterSet;
0029 }
0030 
0031 class MuIsoByTrackPt : public MuIsoBaseAlgorithm {
0032 public:
0033   MuIsoByTrackPt(const edm::ParameterSet& conf, edm::ConsumesCollector&& iC);
0034   ~MuIsoByTrackPt() override;
0035 
0036   float isolation(const edm::Event&, const edm::EventSetup&, const reco::Track& muon) override;
0037   float isolation(const edm::Event& ev, const edm::EventSetup& es, const reco::TrackRef& muon) override {
0038     return isolation(ev, es, *muon);
0039   }
0040   bool isIsolated(const edm::Event&, const edm::EventSetup&, const reco::Track& muon) override;
0041   bool isIsolated(const edm::Event& ev, const edm::EventSetup& es, const reco::TrackRef& muon) override {
0042     return isIsolated(ev, es, *muon);
0043   }
0044 
0045   void setConeSize(float dr);
0046   void setCut(float cut) { theCut = cut; }
0047 
0048   virtual reco::isodeposit::IsoDepositExtractor* extractor() { return theExtractor.get(); }
0049   virtual muonisolation::IsolatorByDeposit* isolator() { return theIsolator.get(); }
0050 
0051 private:
0052   float theCut;
0053   std::unique_ptr<reco::isodeposit::IsoDepositExtractor> theExtractor;
0054   std::unique_ptr<muonisolation::IsolatorByDeposit> theIsolator;
0055 };
0056 
0057 #endif