11 if (conf.
exists(
"tracker"))
21 <<
"MultiIsolator: you can't specify both 'calo' isolation and 'ecal'/'hcal', " 22 <<
"as the 'calo' isolation flag is just the logical OR of 'ecal' and 'hcal'.\n";
24 if (conf.
exists(
"pfAllParticles"))
27 if (conf.
exists(
"pfChargedHadron"))
33 if (conf.
exists(
"pfNeutralHadron"))
39 if (conf.
exists(
"pfGamma"))
42 std::vector<edm::ParameterSet> psets = conf.
getParameter<std::vector<edm::ParameterSet> >(
"user");
43 if (psets.size() > 5) {
44 throw cms::Exception(
"Configuration") <<
"MultiIsolator: you can specify at most 5 user isolation collections.\n";
47 for (std::vector<edm::ParameterSet>::const_iterator it = psets.begin(), ed = psets.end(); it != ed;
65 if (conf.
exists(
"deltaR")) {
80 for (boost::ptr_vector<BaseIsolator>::iterator it =
isolators_.begin(), ed =
isolators_.end(); it != ed; ++it) {
81 it->beginEvent(event, eventSetup);
86 for (boost::ptr_vector<BaseIsolator>::iterator it =
isolators_.begin(), ed =
isolators_.end(); it != ed; ++it) {
92 for (boost::ptr_vector<BaseIsolator>::const_iterator it =
isolators_.begin(), ed =
isolators_.end(); it != ed; ++it) {
101 std::ostringstream isoSumm;
103 return isoSumm.str();
T getParameter(std::string const &) const
std::vector< uint32_t > masks_
boost::ptr_vector< BaseIsolator > isolators_
static const std::string & bitToString(uint32_t bit)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void print(std::ostream &out) const
IsolationKeys
Enum defining isolation keys.
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
std::string printSummary() const
static BaseIsolator * make(const edm::ParameterSet &conf, edm::ConsumesCollector &iC, bool withCut)
std::vector< pat::IsolationKeys > keys_
Flags used in PAT, and static translator from flags to strings.
void addIsolator(BaseIsolator *iso, uint32_t mask, pat::IsolationKeys key)