CMS 3D CMS Logo

PFJetSelectorDefinition.h
Go to the documentation of this file.
1 #ifndef CommonTools_ParticleFlow_PFJetSelectorDefinition
2 #define CommonTools_ParticleFlow_PFJetSelectorDefinition
3 
6 #include "boost/iterator/transform_iterator.hpp"
7 
8 namespace pf2pat {
9 
11 
12  public:
15  typedef std::vector<reco::PFJet> container;
16 
17  struct Pointer {
18  const reco::PFJet * operator()(const reco::PFJet &c) const { return &c; }
19  };
20 
21  typedef boost::transform_iterator<Pointer,container::const_iterator> const_iterator;
22 
24 
25  const_iterator begin() const { return const_iterator(selected_.begin()); }
26 
27  const_iterator end() const { return const_iterator(selected_.end()); }
28 
29  size_t size() const { return selected_.size(); }
30 
31  const container& selected() const {return selected_;}
32 
33  protected:
34  container selected_;
35  };
36 }
37 
38 #endif
const reco::PFJet * operator()(const reco::PFJet &c) const
Jets made from PFObjects.
Definition: PFJet.h:21
std::vector< reco::PFJet > container
std::vector< PFJet > PFJetCollection
collection of PFJet objects
const container & selected() const
edm::Handle< collection > HandleToCollection
boost::transform_iterator< Pointer, container::const_iterator > const_iterator