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  public:
14  typedef std::vector<reco::PFJet> container;
15 
16  struct Pointer {
17  const reco::PFJet* operator()(const reco::PFJet& 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:
33  container selected_;
34  };
35 } // namespace pf2pat
36 
37 #endif
const reco::PFJet * operator()(const reco::PFJet &c) const
Jets made from PFObjects.
Definition: PFJet.h:20
edm::Handle< collection > HandleToCollection
boost::transform_iterator< Pointer, container::const_iterator > const_iterator
std::vector< reco::PFJet > container
std::vector< PFJet > PFJetCollection
collection of PFJet objects
const container & selected() const