File indexing completed on 2024-09-07 04:37:20
0001 #ifndef PhysicsTools_PatAlgos_interface_SimpleIsolator_h
0002 #define PhysicsTools_PatAlgos_interface_SimpleIsolator_h
0003
0004 #include "PhysicsTools/PatAlgos/interface/BaseIsolator.h"
0005
0006 namespace pat {
0007 namespace helper {
0008 class SimpleIsolator : public BaseIsolator {
0009 public:
0010 typedef edm::ValueMap<double> IsoValueMap;
0011 SimpleIsolator() {}
0012 SimpleIsolator(const edm::ParameterSet &conf, edm::ConsumesCollector &iC, bool withCut);
0013 ~SimpleIsolator() override {}
0014 void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup) override;
0015 void endEvent() override;
0016
0017 std::string description() const override { return input_.encode(); }
0018
0019 protected:
0020 edm::Handle<IsoValueMap> handle_;
0021 edm::EDGetTokenT<IsoValueMap> inputDoubleToken_;
0022 float getValue(const edm::ProductID &id, size_t index) const override { return handle_->get(id, index); }
0023 };
0024 }
0025 }
0026
0027 #endif