![]() |
![]() |
#include <BaseIsolator.h>
Public Types | |
typedef edm::ValueMap< float > | Isolation |
Public Member Functions | |
BaseIsolator () | |
BaseIsolator (const edm::ParameterSet &conf, bool withCut) | |
virtual void | beginEvent (const edm::Event &event, const edm::EventSetup &eventSetup)=0 |
virtual std::string | description () const =0 |
virtual void | endEvent ()=0 |
template<typename AnyRef > | |
float | getValue (const AnyRef &ref) const |
Returns the associated isolation value given any sort of ref. | |
void | print (std::ostream &out) const |
template<typename AnyRef > | |
bool | test (const AnyRef &ref) const |
Tests if the value associated to this item is strictly below the cut. | |
virtual | ~BaseIsolator () |
Protected Member Functions | |
virtual float | getValue (const edm::ProductID &id, size_t index) const =0 |
Protected Attributes | |
float | cut_ |
uint64_t | fail_ |
edm::InputTag | input_ |
uint64_t | try_ |
Definition at line 9 of file BaseIsolator.h.
typedef edm::ValueMap<float> pat::helper::BaseIsolator::Isolation |
Reimplemented in pat::helper::IsoDepositIsolator.
Definition at line 11 of file BaseIsolator.h.
pat::helper::BaseIsolator::BaseIsolator | ( | ) | [inline] |
Definition at line 12 of file BaseIsolator.h.
{}
BaseIsolator::BaseIsolator | ( | const edm::ParameterSet & | conf, |
bool | withCut | ||
) |
Definition at line 7 of file BaseIsolator.cc.
: input_(conf.getParameter<edm::InputTag>("src")), cut_(withCut ? conf.getParameter<double>("cut") : -2.0), try_(0), fail_(0) { }
virtual pat::helper::BaseIsolator::~BaseIsolator | ( | ) | [inline, virtual] |
Definition at line 14 of file BaseIsolator.h.
{}
virtual void pat::helper::BaseIsolator::beginEvent | ( | const edm::Event & | event, |
const edm::EventSetup & | eventSetup | ||
) | [pure virtual] |
Implemented in pat::helper::IsoDepositIsolator, and pat::helper::SimpleIsolator.
virtual std::string pat::helper::BaseIsolator::description | ( | ) | const [pure virtual] |
Implemented in pat::helper::IsoDepositIsolator, and pat::helper::SimpleIsolator.
Referenced by print().
virtual void pat::helper::BaseIsolator::endEvent | ( | ) | [pure virtual] |
Implemented in pat::helper::IsoDepositIsolator, and pat::helper::SimpleIsolator.
float pat::helper::BaseIsolator::getValue | ( | const AnyRef & | ref | ) | const [inline] |
Returns the associated isolation value given any sort of ref.
Definition at line 25 of file BaseIsolator.h.
Referenced by test().
{ return getValue(ref.id(), ref.key()); }
virtual float pat::helper::BaseIsolator::getValue | ( | const edm::ProductID & | id, |
size_t | index | ||
) | const [protected, pure virtual] |
Implemented in pat::helper::IsoDepositIsolator, and pat::helper::SimpleIsolator.
void BaseIsolator::print | ( | std::ostream & | out | ) | const |
Definition at line 15 of file BaseIsolator.cc.
References cut_, description(), fail_, and try_.
Referenced by operator<<().
{ using namespace std; out << description() << " < " << cut_ << ": try " << try_ << ", fail " << fail_; }
bool pat::helper::BaseIsolator::test | ( | const AnyRef & | ref | ) | const [inline] |
Tests if the value associated to this item is strictly below the cut.
Definition at line 19 of file BaseIsolator.h.
References cut_, fail_, getValue(), convertSQLiteXML::ok, and try_.
float pat::helper::BaseIsolator::cut_ [protected] |
Definition at line 34 of file BaseIsolator.h.
uint64_t pat::helper::BaseIsolator::fail_ [mutable, protected] |
Definition at line 35 of file BaseIsolator.h.
edm::InputTag pat::helper::BaseIsolator::input_ [protected] |
Definition at line 33 of file BaseIsolator.h.
Referenced by pat::helper::IsoDepositIsolator::beginEvent(), pat::helper::SimpleIsolator::beginEvent(), pat::helper::IsoDepositIsolator::description(), and pat::helper::SimpleIsolator::description().
uint64_t pat::helper::BaseIsolator::try_ [mutable, protected] |
Definition at line 35 of file BaseIsolator.h.