CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
const edm::EventSetup & c
const reco::PFCandidate * operator()(const reco::PFCandidate &c) const
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
boost::transform_iterator< Pointer, container::const_iterator > const_iterator