97 : src_ (iConfig.getParameter<edm::
InputTag> (
"src"))
98 , qualityStr (iConfig.getParameter<
string> (
"idLevel"))
99 , jetIDMap_(iConfig.getUntrackedParameter<edm::
InputTag> (
"jetIDMap", edm::
InputTag(
"ak5JetID")))
104 produces<JetCollection>();
138 <<
"Expect quality to be one of MINIMAL, LOOSE_AOD, LOOSE, MEDIUM, TIGHT" << std::endl;
145 if(jetIDFunctor)
delete jetIDFunctor;
173 iend = jets->end(), iJet = ibegin;
174 iJet != iend; ++iJet ) {
180 const std::type_info &
type =
typeid((*jets)[
idx]);
184 reco::JetID const & jetId = (*hJetIDMap)[ jetRef ];
185 passed = (*jetIDFunctor)( calojet, jetId);
191 bool passingLoose=
false;
192 bool passingMedium=
false;
193 bool passingTight=
false;
194 bool ThisIsClean=
true;
197 && fabs(pfjet.
eta())<2.4) ThisIsClean=
false;
199 && fabs(pfjet.
eta())<2.4 ) ThisIsClean=
false;
222 if ( use_pfloose && passingLoose) passed =
true;
223 if ( use_pfmedium && passingMedium) passed =
true;
224 if ( use_pftight && passingTight) passed =
true;
229 "Criteria for jets other than CaloJets and PFJets are not yet implemented";
234 const T& goodJet =
static_cast<const T&
>((*jets)[
idx]);
235 if(passed) selectedJets->push_back( goodJet );
242 nJetsTot_ +=jets->size();
243 nJetsPassed_+=selectedJets->size();
244 iEvent.
put(selectedJets);
254 ss<<
"nJetsTot="<<nJetsTot_<<
" nJetsPassed="<<nJetsPassed_
255 <<
" fJetsPassed="<<100.*(nJetsPassed_/(double)nJetsTot_)<<
"%\n";
256 cout<<
"++++++++++++++++++++++++++++++++++++++++++++++++++"
257 <<
"\n"<<
moduleLabel_ <<
"(JetIdSelector) SUMMARY:\n"<<ss.str()
258 <<
"++++++++++++++++++++++++++++++++++++++++++++++++++"
Jets made from CaloTowers.
float chargedEmEnergy() const
chargedEmEnergy
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.
virtual double eta() const
momentum pseudorapidity
float neutralEmEnergy() const
neutralEmEnergy
virtual double energy() const
energy
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
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
float chargedHadronEnergy() const
chargedHadronEnergy