#include <PtMinPFCandidateSelectorDefinition.h>
Public Member Functions | |
PtMinPFCandidateSelectorDefinition (const edm::ParameterSet &cfg) | |
void | select (const HandleToCollection &hc, const edm::EventBase &e, const edm::EventSetup &s) |
Private Attributes | |
double | ptMin_ |
Definition at line 10 of file PtMinPFCandidateSelectorDefinition.h.
pf2pat::PtMinPFCandidateSelectorDefinition::PtMinPFCandidateSelectorDefinition | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 13 of file PtMinPFCandidateSelectorDefinition.h.
: ptMin_( cfg.getParameter< double >( "ptMin" ) ) { }
void pf2pat::PtMinPFCandidateSelectorDefinition::select | ( | const HandleToCollection & | hc, |
const edm::EventBase & | e, | ||
const edm::EventSetup & | s | ||
) | [inline] |
Definition at line 17 of file PtMinPFCandidateSelectorDefinition.h.
References edm::HandleBase::isValid(), combine::key, ptMin_, and pf2pat::PFCandidateSelectorDefinition::selected_.
{ selected_.clear(); assert( hc.isValid() ); unsigned key=0; for( collection::const_iterator pfc = hc->begin(); pfc != hc->end(); ++pfc, ++key) { if( pfc->pt() > ptMin_ ) { selected_.push_back( reco::PFCandidate(*pfc) ); reco::PFCandidatePtr ptrToMother( hc, key ); selected_.back().setSourceCandidatePtr( ptrToMother ); } } }
double pf2pat::PtMinPFCandidateSelectorDefinition::ptMin_ [private] |
Definition at line 42 of file PtMinPFCandidateSelectorDefinition.h.
Referenced by select().