CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 #include <functional>
8 
9 namespace pf2pat {
10 
12 
13  public:
16  typedef std::vector<reco::PFJet> container;
17 
18  struct Pointer : public std::unary_function<reco::PFJet,const reco::PFJet *> {
19  const reco::PFJet * operator()(const reco::PFJet &c) const { return &c; }
20  };
21 
22  typedef boost::transform_iterator<Pointer,container::const_iterator> const_iterator;
23 
25 
26  const_iterator begin() const { return const_iterator(selected_.begin()); }
27 
28  const_iterator end() const { return const_iterator(selected_.end()); }
29 
30  size_t size() const { return selected_.size(); }
31 
32  const container& selected() const {return selected_;}
33 
34  protected:
36  };
37 }
38 
39 #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