#include <PhysicsTools/PFCandProducer/interface/PtMinPFCandidateSelectorDefinition.h>
Public Types | |
typedef reco::PFCandidateCollection | collection |
typedef container::const_iterator | const_iterator |
typedef std::vector < reco::PFCandidate * > | container |
typedef edm::Handle< collection > | HandleToCollection |
Public Member Functions | |
const_iterator | begin () const |
const_iterator | end () const |
PtMinPFCandidateSelectorDefinition (const edm::ParameterSet &cfg) | |
void | select (const HandleToCollection &hc, const edm::Event &e, const edm::EventSetup &s) |
size_t | size () const |
Private Attributes | |
double | ptMin_ |
container | selected_ |
Definition at line 7 of file PtMinPFCandidateSelectorDefinition.h.
Definition at line 9 of file PtMinPFCandidateSelectorDefinition.h.
typedef container::const_iterator PtMinPFCandidateSelectorDefinition::const_iterator |
Definition at line 12 of file PtMinPFCandidateSelectorDefinition.h.
typedef std::vector< reco::PFCandidate *> PtMinPFCandidateSelectorDefinition::container |
Definition at line 11 of file PtMinPFCandidateSelectorDefinition.h.
Definition at line 10 of file PtMinPFCandidateSelectorDefinition.h.
PtMinPFCandidateSelectorDefinition::PtMinPFCandidateSelectorDefinition | ( | const edm::ParameterSet & | cfg | ) | [inline] |
Definition at line 14 of file PtMinPFCandidateSelectorDefinition.h.
00014 : 00015 ptMin_( cfg.getParameter< double >( "ptMin" ) ) { }
const_iterator PtMinPFCandidateSelectorDefinition::begin | ( | void | ) | const [inline] |
Definition at line 17 of file PtMinPFCandidateSelectorDefinition.h.
References selected_.
00017 { return selected_.begin(); }
const_iterator PtMinPFCandidateSelectorDefinition::end | ( | void | ) | const [inline] |
Definition at line 19 of file PtMinPFCandidateSelectorDefinition.h.
References selected_.
00019 { return selected_.end(); }
void PtMinPFCandidateSelectorDefinition::select | ( | const HandleToCollection & | hc, | |
const edm::Event & | e, | |||
const edm::EventSetup & | s | |||
) | [inline] |
Definition at line 21 of file PtMinPFCandidateSelectorDefinition.h.
References edm::Handle< T >::isValid(), getDQMSummary::key, ptMin_, and selected_.
00023 { 00024 selected_.clear(); 00025 00026 assert( hc.isValid() ); 00027 00028 00029 unsigned key=0; 00030 for( collection::const_iterator pfc = hc->begin(); 00031 pfc != hc->end(); ++pfc, ++key) { 00032 00033 if( pfc->pt() > ptMin_ ) { 00034 selected_.push_back( new reco::PFCandidate(*pfc) ); 00035 reco::PFCandidatePtr ptrToMother( hc, key ); 00036 selected_.back()->setSourcePtr( ptrToMother ); 00037 } 00038 } 00039 }
size_t PtMinPFCandidateSelectorDefinition::size | ( | void | ) | const [inline] |
Definition at line 41 of file PtMinPFCandidateSelectorDefinition.h.
References selected_.
00041 { return selected_.size(); }
double PtMinPFCandidateSelectorDefinition::ptMin_ [private] |