40 : jetsrc_(consumes<edm::
View<pat::
Jet>>(iConfig.getParameter<edm::
InputTag>(
"jetsrc"))),
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>>();
60 int njets = jetcandidates->size();
63 for (
int jetindex = 0; jetindex <
njets; ++jetindex) {
67 double ptJet = userawPt_ ? candjet->correctedJet(
"Uncorrected").pt() : candjet->pt();
68 double absEtaJet =
std::abs(candjet->eta());
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);
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
~BadPFCandidateJetsEEnoiseProducer() override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Abs< T >::type abs(const T &t)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Analysis-level calorimeter jet class.
void add(std::string const &label, ParameterSetDescription const &psetDescription)
BadPFCandidateJetsEEnoiseProducer(const edm::ParameterSet &)
edm::EDGetTokenT< edm::View< pat::Jet > > jetsrc_