7 #include <boost/regex.hpp> 16 inputIsoDepositToken_(iC.consumes<
Isolation>(input_))
27 else throw cms::Exception(
"Not Implemented") <<
"Mode '" << mode <<
"' not implemented. " <<
28 "Supported modes are 'sum', 'sumRelative', 'max', 'maxRelative', 'sum2', 'sum2Relative', 'count'." <<
29 "New methods can be easily implemented if requested.";
35 if (conf.
exists(
"threshold")) {
38 if (conf.
exists(
"skipDefaultVeto")) {
42 if (conf.
exists(
"vetos")) {
44 throw cms::Exception(
"Configuration") <<
"You can't both configure this module with 'veto'/'threshold' AND with 'vetos'!";
45 if (!conf.
exists(
"skipDefaultVeto"))
46 throw cms::Exception(
"Configuration") <<
"When using the expert configuration variable 'vetos' you must specify the value for 'skipDefaultVeto' too.";
48 typedef std::vector<std::string>
vstring;
51 for (vstring::const_iterator it = vetos.begin(), ed = vetos.end(); it != ed; ++it) {
60 for (AbsVetos::iterator it =
vetos_.begin(), ed =
vetos_.end(); it != ed; ++it) {
69 (*it)->setEvent(event,eventSetup);
91 for (AbsVetos::const_iterator it =
vetos_.begin(), ed =
vetos_.end(); it != ed; ++it) {
92 (
const_cast<AbsVeto *
>(*it))->centerOn(eta, phi);
103 throw cms::Exception(
"Logic error") <<
"Should not happen at " << __FILE__ <<
", line " << __LINE__;
static reco::isodeposit::AbsVeto * make(const char *string, edm::ConsumesCollector &iC)
T getParameter(std::string const &) const
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
edm::Handle< Isolation > handle_
reco::isodeposit::EventDependentAbsVetos evdepVetos_
edm::EDGetTokenT< Isolation > inputIsoDepositToken_
~IsoDepositIsolator() override
std::string description() const override
float getValue(const edm::ProductID &id, size_t index) const override
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup) override