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>
20  class PattRecoTree {
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 { return scales_; }
30 
31  // Modifiers
32  inline void setSparse(const bool b) { sparse_ = b; }
33 
34  inline void clear() {
35  nodes_.clear();
36  scales_.clear();
37  sparse_ = false;
38  }
39 
40  inline void reserveNodes(const unsigned n) { nodes_.reserve(n); }
41  inline void reserveScales(const unsigned n) { scales_.reserve(n); }
42  inline void addNode(const Node& node) { nodes_.push_back(node); }
43  inline void addScale(const double s) { 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 } // namespace reco
51 
52 #endif // JetReco_PattRecoTree_h
void reserveNodes(const unsigned n)
Definition: PattRecoTree.h:40
void setSparse(const bool b)
Definition: PattRecoTree.h:32
Tree nodes for storing FFTJet preclusters.
Definition: PattRecoNode.h:16
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:43
void reserveScales(const unsigned n)
Definition: PattRecoTree.h:41
const std::vector< ScaleType > & getScales() const
Definition: PattRecoTree.h:29
std::vector< Node > nodes_
Definition: PattRecoTree.h:46
double b
Definition: hdecay.h:120
const std::vector< Node > & getNodes() const
Definition: PattRecoTree.h:28
fixed size matrix
PattRecoNode< Cluster > Node
Definition: PattRecoTree.h:22
bool isSparse() const
Definition: PattRecoTree.h:27
void addNode(const Node &node)
Definition: PattRecoTree.h:42