CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PattRecoTree.h
Go to the documentation of this file.
1 
12 #ifndef DataFormats_JetReco_PattRecoTree_h
13 #define DataFormats_JetReco_PattRecoTree_h
14 
16 
17 namespace reco {
18  template<typename ScaleType, class Cluster>
20  {
21  public:
23 
24  inline PattRecoTree() : sparse_(false) {}
25 
26  // Inspectors
27  inline bool isSparse() const {return sparse_;}
28  inline const std::vector<Node>& getNodes() const {return nodes_;}
29  inline const std::vector<ScaleType>& getScales() const
30  {return scales_;}
31 
32  // Modifiers
33  inline void setSparse(const bool b) {sparse_ = b;}
34 
35  inline void clear()
36  {nodes_.clear(); scales_.clear(); sparse_ = false;}
37 
38  inline void reserveNodes(const unsigned n) {nodes_.reserve(n);}
39  inline void reserveScales(const unsigned n) {scales_.reserve(n);}
40  inline void addNode(const Node& node) {nodes_.push_back(node);}
41  inline void addScale(const double s)
42  {scales_.push_back(static_cast<ScaleType>(s));}
43 
44  private:
45  std::vector<Node> nodes_;
46  std::vector<ScaleType> scales_;
47  bool sparse_;
48  };
49 }
50 
51 #endif // JetReco_PattRecoTree_h
void reserveNodes(const unsigned n)
Definition: PattRecoTree.h:38
void setSparse(const bool b)
Definition: PattRecoTree.h:33
Tree nodes for storing FFTJet preclusters.
Definition: PattRecoNode.h:17
bool isSparse() const
Definition: PattRecoTree.h:27
std::vector< ScaleType > scales_
Definition: PattRecoTree.h:46
Class for storing FFTJet sparse clustering trees.
Definition: PattRecoTree.h:19
void addScale(const double s)
Definition: PattRecoTree.h:41
void reserveScales(const unsigned n)
Definition: PattRecoTree.h:39
tuple node
Definition: Node.py:50
const std::vector< Node > & getNodes() const
Definition: PattRecoTree.h:28
const std::vector< ScaleType > & getScales() const
Definition: PattRecoTree.h:29
std::vector< Node > nodes_
Definition: PattRecoTree.h:45
double b
Definition: hdecay.h:120
PattRecoNode< Cluster > Node
Definition: PattRecoTree.h:22
void addNode(const Node &node)
Definition: PattRecoTree.h:40