#include <GenericPFJetSelectorDefinition.h>
Public Member Functions | |
GenericPFJetSelectorDefinition (const edm::ParameterSet &cfg) | |
void | select (const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s) |
Private Attributes | |
StringCutObjectSelector < reco::PFJet > | selector_ |
Definition at line 12 of file GenericPFJetSelectorDefinition.h.
pf2pat::GenericPFJetSelectorDefinition::GenericPFJetSelectorDefinition | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 14 of file GenericPFJetSelectorDefinition.h.
: selector_( cfg.getParameter< std::string >( "cut" ) ) { }
void pf2pat::GenericPFJetSelectorDefinition::select | ( | const HandleToCollection & | hc, |
const edm::Event & | e, | ||
const edm::EventSetup & | s | ||
) | [inline] |
Definition at line 17 of file GenericPFJetSelectorDefinition.h.
References combine::key, pf2pat::PFJetSelectorDefinition::selected_, and selector_.
{ selected_.clear(); unsigned key=0; for( collection::const_iterator pfc = hc->begin(); pfc != hc->end(); ++pfc, ++key) { if( selector_(*pfc) ) { selected_.push_back( reco::PFJet(*pfc) ); reco::CandidatePtr ptrToMother( hc, key ); selected_.back().setSourceCandidatePtr( ptrToMother ); } } }
Definition at line 36 of file GenericPFJetSelectorDefinition.h.
Referenced by select().