CMS 3D CMS Logo

PtMinPFCandidateSelectorDefinition Struct Reference

#include <PhysicsTools/PFCandProducer/interface/PtMinPFCandidateSelectorDefinition.h>

List of all members.

Public Types

typedef reco::PFCandidateCollection collection
typedef container::const_iterator const_iterator
typedef std::vector
< reco::PFCandidate * > 
container
typedef edm::Handle< collectionHandleToCollection

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_


Detailed Description

Definition at line 7 of file PtMinPFCandidateSelectorDefinition.h.


Member Typedef Documentation

typedef reco::PFCandidateCollection PtMinPFCandidateSelectorDefinition::collection

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.

typedef edm::Handle< collection > PtMinPFCandidateSelectorDefinition::HandleToCollection

Definition at line 10 of file PtMinPFCandidateSelectorDefinition.h.


Constructor & Destructor Documentation

PtMinPFCandidateSelectorDefinition::PtMinPFCandidateSelectorDefinition ( const edm::ParameterSet cfg  )  [inline]

Definition at line 14 of file PtMinPFCandidateSelectorDefinition.h.

00014                                                                      :
00015   ptMin_( cfg.getParameter< double >( "ptMin" ) ) { }


Member Function Documentation

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(); }


Member Data Documentation

double PtMinPFCandidateSelectorDefinition::ptMin_ [private]

Definition at line 45 of file PtMinPFCandidateSelectorDefinition.h.

Referenced by select().

container PtMinPFCandidateSelectorDefinition::selected_ [private]

Definition at line 44 of file PtMinPFCandidateSelectorDefinition.h.

Referenced by begin(), end(), select(), and size().


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:30:23 2009 for CMSSW by  doxygen 1.5.4