Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:50

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     };  // class SimpleIsolator
0024   }     // namespace helper
0025 }  // namespace pat
0026 
0027 #endif