41 ptThreshold_(iConfig.getParameter<double>(
"ptThreshold")),
42 minEtaThreshold_(iConfig.getParameter<double>(
"minEtaThreshold")),
43 maxEtaThreshold_(iConfig.getParameter<double>(
"maxEtaThreshold")),
44 userawPt_(iConfig.getParameter<
bool>(
"userawPt")) {
45 produces<std::vector<pat::Jet>>(
"good");
46 produces<std::vector<pat::Jet>>(
"bad");
54 auto goodJets = std::make_unique<std::vector<pat::Jet>>();
55 auto badJets = std::make_unique<std::vector<pat::Jet>>();
58 iEvent.getByToken(jetsrc_, jetcandidates);
60 int njets = jetcandidates->size();
63 for (
int jetindex = 0; jetindex <
njets; ++jetindex) {
67 double ptJet = userawPt_ ? candjet->
correctedJet(
"Uncorrected").
pt() : candjet->
pt();
70 if (ptJet > ptThreshold_ || absEtaJet < minEtaThreshold_ || absEtaJet > maxEtaThreshold_) {
75 badJets->emplace_back(candjet);
85 desc.
add<
bool>(
"userawPt",
true);
86 desc.
add<
double>(
"ptThreshold", 50.0);
87 desc.
add<
double>(
"minEtaThreshold", 2.65);
88 desc.
add<
double>(
"maxEtaThreshold", 3.139);
90 descriptions.
add(
"BadPFCandidateJetsEEnoiseProducer", desc);