CMS 3D CMS Logo

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