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;
Jets made from CaloTowers.
float neutralHadronEnergy() const
neutralHadronEnergy
int chargedMultiplicity() const
chargedMultiplicity
float chargedEmEnergy() const
chargedEmEnergy
~JetIdSelector() override
JetIDSelectionFunctor * jetIDFunctor
float neutralEmEnergy() const
neutralEmEnergy
JetIdSelector< reco::CaloJet > CaloJetIdSelector
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
JetIdSelector(const edm::ParameterSet &iConfig)
unsigned int nJetsPassed_
Jets made from PFObjects.
JetIdSelector< reco::JPTJet > JPTJetIdSelector
virtual int nConstituents() const
of constituents
Jets made from CaloJets corrected for ZSP and tracks.
Jets made from MC generator particles.
#define DEFINE_FWK_MODULE(type)
Jet selector for pat::Jets and for CaloJets.
JetIdSelector< reco::GenJet > GenJetIdSelector
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
float chargedHadronEnergy() const
chargedHadronEnergy
std::vector< T > JetCollection
JetIdSelector< reco::PFJet > PFJetIdSelector
Log< level::Warning, false > LogWarning
double energy() const final
energy
double eta() const final
momentum pseudorapidity