7 #include <boost/regex.hpp>
11 using namespace reco::isodeposit;
26 else throw cms::Exception(
"Not Implemented") <<
"Mode '" << mode <<
"' not implemented. " <<
27 "Supported modes are 'sum', 'sumRelative', 'max', 'maxRelative', 'sum2', 'sum2Relative', 'count'." <<
28 "New methods can be easily implemented if requested.";
34 if (conf.
exists(
"threshold")) {
37 if (conf.
exists(
"skipDefaultVeto")) {
41 if (conf.
exists(
"vetos")) {
43 throw cms::Exception(
"Configuration") <<
"You can't both configure this module with 'veto'/'threshold' AND with 'vetos'!";
44 if (!conf.
exists(
"skipDefaultVeto"))
45 throw cms::Exception(
"Configuration") <<
"When using the expert configuration variable 'vetos' you must specify the value for 'skipDefaultVeto' too.";
47 typedef std::vector<std::string>
vstring;
50 for (vstring::const_iterator it = vetos.begin(), ed = vetos.end(); it != ed; ++it) {
59 for (AbsVetos::iterator it =
vetos_.begin(), ed =
vetos_.end(); it != ed; ++it) {
68 (*it)->setEvent(event,eventSetup);
90 for (AbsVetos::const_iterator it =
vetos_.begin(), ed =
vetos_.end(); it != ed; ++it) {
91 (
const_cast<AbsVeto *
>(*it))->centerOn(eta,
phi);
102 throw cms::Exception(
"Logic error") <<
"Should not happen at " << __FILE__ <<
", line " << __LINE__;
T getParameter(std::string const &) const
virtual void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
double candEnergy() const
Get energy or pT attached to cand trajectory.
double sum2Within(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
reco::isodeposit::AbsVetos vetos_
bool exists(std::string const ¶meterName) const
checks if a parameter exists
double countWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
double maxWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
virtual ~IsoDepositIsolator()
edm::Handle< Isolation > handle_
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
reco::isodeposit::EventDependentAbsVetos evdepVetos_
std::vector< std::string > vstring
static reco::isodeposit::AbsVeto * make(const char *string)
virtual float getValue(const edm::ProductID &id, size_t index) const
virtual std::string description() const