13 deltaR_(conf.getParameter<double>(
"deltaR")),
15 skipDefaultVeto_(
false),
16 inputIsoDepositToken_(iC.consumes<
Isolation>(input_)) {
21 else if (mode ==
"sumRelative")
23 else if (mode ==
"max")
25 else if (mode ==
"maxRelative")
27 else if (mode ==
"sum2")
29 else if (mode ==
"sum2Relative")
31 else if (mode ==
"count")
35 <<
"Mode '" << mode <<
"' not implemented. " 36 <<
"Supported modes are 'sum', 'sumRelative', 'max', 'maxRelative', 'sum2', 'sum2Relative', 'count'." 37 <<
"New methods can be easily implemented if requested.";
43 if (conf.
exists(
"threshold")) {
46 if (conf.
exists(
"skipDefaultVeto")) {
50 if (conf.
exists(
"vetos")) {
53 <<
"You can't both configure this module with 'veto'/'threshold' AND with 'vetos'!";
54 if (!conf.
exists(
"skipDefaultVeto"))
55 throw cms::Exception(
"Configuration") <<
"When using the expert configuration variable 'vetos' you must specify " 56 "the value for 'skipDefaultVeto' too.";
58 typedef std::vector<std::string>
vstring;
61 for (vstring::const_iterator it = vetos.begin(), ed = vetos.end(); it != ed; ++it) {
78 veto->setEvent(event, eventSetup);
97 veto->centerOn(eta, phi);
115 throw cms::Exception(
"Logic error") <<
"Should not happen at " << __FILE__ <<
", 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