File indexing completed on 2024-09-07 04:37:20
0001 #ifndef PhysicsTools_PatAlgos_interface_IsoDepositIsolator_h
0002 #define PhysicsTools_PatAlgos_interface_IsoDepositIsolator_h
0003
0004 #include "PhysicsTools/PatAlgos/interface/BaseIsolator.h"
0005 #include "DataFormats/RecoCandidate/interface/IsoDeposit.h"
0006 #include "PhysicsTools/IsolationAlgos/interface/EventDependentAbsVeto.h"
0007
0008 namespace pat {
0009 namespace helper {
0010 class IsoDepositIsolator : public BaseIsolator {
0011 public:
0012 typedef edm::ValueMap<reco::IsoDeposit> Isolation;
0013
0014 IsoDepositIsolator() {}
0015 IsoDepositIsolator(const edm::ParameterSet &conf, edm::ConsumesCollector &iC, bool withCut);
0016 ~IsoDepositIsolator() override;
0017 void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup) override;
0018 void endEvent() override;
0019
0020 std::string description() const override;
0021
0022 protected:
0023 enum Mode { Sum, Sum2, SumRelative, Sum2Relative, Max, MaxRelative, Count };
0024 edm::Handle<Isolation> handle_;
0025
0026 float deltaR_;
0027 Mode mode_;
0028 reco::isodeposit::AbsVetos vetos_;
0029 reco::isodeposit::EventDependentAbsVetos evdepVetos_;
0030 bool skipDefaultVeto_;
0031 edm::EDGetTokenT<Isolation> inputIsoDepositToken_;
0032
0033 float getValue(const edm::ProductID &id, size_t index) const override;
0034 };
0035 }
0036 }
0037
0038 #endif