94 qualityStr(iConfig.getParameter<
string>(
"idLevel")),
96 moduleLabel_(iConfig.getParameter<
string>(
"@module_label")),
99 produces<JetCollection>();
122 throw cms::Exception(
"InvalidInput") <<
"Expect quality to be one of MINIMAL, LOOSE_AOD, LOOSE, MEDIUM, TIGHT"
127 template <
typename T>
138 template <
typename T>
142 iEvent.getByLabel(src_, hjets);
143 auto const&
jets = *hjets;
147 unsigned int idx = 0;
156 auto const&
jet = *iJet;
157 const std::type_info&
type =
typeid(
jet);
162 iEvent.getByLabel(jetIDMap_, hJetIDMap);
171 bool passingLoose =
false;
172 bool passingMedium =
false;
173 bool passingTight =
false;
174 bool ThisIsClean =
true;
193 passingMedium =
true;
199 if (use_pfloose && passingLoose)
201 if (use_pfmedium && passingMedium)
203 if (use_pftight && passingTight)
208 edm::LogWarning(
"JetId") <<
"Criteria for jets other than CaloJets and PFJets are not yet implemented";
212 const T& goodJet = static_cast<const T&>(
jet);
219 nJetsTot_ +=
jets.size();
225 template <
typename T>
228 ss <<
"nJetsTot=" << nJetsTot_ <<
" nJetsPassed=" << nJetsPassed_
229 <<
" fJetsPassed=" << 100. * (nJetsPassed_ / (double)nJetsTot_) <<
"%\n";
230 cout <<
"++++++++++++++++++++++++++++++++++++++++++++++++++"
232 << moduleLabel_ <<
"(JetIdSelector) SUMMARY:\n"
233 <<
ss.str() <<
"++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;