93 : src_(iConfig.getParameter<edm::
InputTag>(
"src")),
94 qualityStr(iConfig.getParameter<
string>(
"idLevel")),
95 jetIDMap_(iConfig.getUntrackedParameter<edm::
InputTag>(
"jetIDMap", edm::
InputTag(
"ak5JetID"))),
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>
143 auto const&
jets = *hjets;
147 unsigned int idx = 0;
156 auto const&
jet = *iJet;
157 const std::type_info&
type =
typeid(
jet);
165 passed = (*jetIDFunctor)(calojet, jetId);
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 <<
"++++++++++++++++++++++++++++++++++++++++++++++++++"
233 << ss.str() <<
"++++++++++++++++++++++++++++++++++++++++++++++++++" << endl;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Jets made from CaloTowers.
float chargedEmEnergy() const
chargedEmEnergy
~JetIdSelector() override
JetIDSelectionFunctor * jetIDFunctor
#define DEFINE_FWK_MODULE(type)
JetIdSelector< reco::CaloJet > CaloJetIdSelector
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
JetIdSelector(const edm::ParameterSet &iConfig)
int chargedMultiplicity() const
chargedMultiplicity
unsigned int nJetsPassed_
Jets made from PFObjects.
float neutralEmEnergy() const
neutralEmEnergy
JetIdSelector< reco::JPTJet > JPTJetIdSelector
Jets made from CaloJets corrected for ZSP and tracks.
Jets made from MC generator particles.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Jet selector for pat::Jets and for CaloJets.
JetIdSelector< reco::GenJet > GenJetIdSelector
virtual int nConstituents() const
of constituents
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
float neutralHadronEnergy() const
neutralHadronEnergy
std::vector< T > JetCollection
JetIdSelector< reco::PFJet > PFJetIdSelector
Log< level::Warning, false > LogWarning
float chargedHadronEnergy() const
chargedHadronEnergy
double energy() const final
energy
double eta() const final
momentum pseudorapidity