CMS 3D CMS Logo

PFCandidateSelectorDefinition.h
Go to the documentation of this file.
1 #ifndef CommonTools_ParticleFlow_PFCandidateSelectorDefinition
2 #define CommonTools_ParticleFlow_PFCandidateSelectorDefinition
3 
6 #include "boost/iterator/transform_iterator.hpp"
7 
8 namespace pf2pat {
9 
11  public:
14  typedef std::vector<reco::PFCandidate> container;
15 
16  struct Pointer {
17  const reco::PFCandidate* operator()(const reco::PFCandidate& c) const { return &c; }
18  };
19 
20  typedef boost::transform_iterator<Pointer, container::const_iterator> const_iterator;
21 
23 
24  const_iterator begin() const { return const_iterator(selected_.begin()); }
25 
26  const_iterator end() const { return const_iterator(selected_.end()); }
27 
28  size_t size() const { return selected_.size(); }
29 
30  const container& selected() const { return selected_; }
31 
32  protected:
34  };
35 } // namespace pf2pat
36 
37 #endif
pf2pat::PFCandidateSelectorDefinition::size
size_t size() const
Definition: PFCandidateSelectorDefinition.h:28
pf2pat::PFCandidateSelectorDefinition::selected
const container & selected() const
Definition: PFCandidateSelectorDefinition.h:30
PFCandidate.h
pf2pat
Definition: ElectronIDPFCandidateSelectorDefinition.h:22
edm::Handle
Definition: AssociativeIterator.h:50
pf2pat::PFCandidateSelectorDefinition::end
const_iterator end() const
Definition: PFCandidateSelectorDefinition.h:26
pf2pat::PFCandidateSelectorDefinition::Pointer::operator()
const reco::PFCandidate * operator()(const reco::PFCandidate &c) const
Definition: PFCandidateSelectorDefinition.h:17
pf2pat::PFCandidateSelectorDefinition::collection
reco::PFCandidateCollection collection
Definition: PFCandidateSelectorDefinition.h:12
pf2pat::PFCandidateSelectorDefinition::selected_
container selected_
Definition: PFCandidateSelectorDefinition.h:33
pf2pat::PFCandidateSelectorDefinition::Pointer
Definition: PFCandidateSelectorDefinition.h:16
pf2pat::PFCandidateSelectorDefinition::begin
const_iterator begin() const
Definition: PFCandidateSelectorDefinition.h:24
pf2pat::PFCandidateSelectorDefinition::const_iterator
boost::transform_iterator< Pointer, container::const_iterator > const_iterator
Definition: PFCandidateSelectorDefinition.h:20
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
reco::PFCandidateCollection
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
Definition: PFCandidateFwd.h:12
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
pf2pat::PFCandidateSelectorDefinition
Definition: PFCandidateSelectorDefinition.h:10
pf2pat::PFCandidateSelectorDefinition::container
std::vector< reco::PFCandidate > container
Definition: PFCandidateSelectorDefinition.h:14
pf2pat::PFCandidateSelectorDefinition::PFCandidateSelectorDefinition
PFCandidateSelectorDefinition()
Definition: PFCandidateSelectorDefinition.h:22
PFCandidateFwd.h
pf2pat::PFCandidateSelectorDefinition::HandleToCollection
edm::Handle< collection > HandleToCollection
Definition: PFCandidateSelectorDefinition.h:13