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
funct::false
false
Definition: Factorize.h:29
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
reco::PattRecoTree::scales_
std::vector< ScaleType > scales_
Definition: PattRecoTree.h:47
reco::PattRecoTree::nodes_
std::vector< Node > nodes_
Definition: PattRecoTree.h:46
reco::PattRecoTree::addNode
void addNode(const Node &node)
Definition: PattRecoTree.h:42
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:46
reco::PattRecoTree::isSparse
bool isSparse() const
Definition: PattRecoTree.h:27
reco::PattRecoTree::getNodes
const std::vector< Node > & getNodes() const
Definition: PattRecoTree.h:28
alignCSCRings.s
s
Definition: alignCSCRings.py:92
reco::PattRecoTree::PattRecoTree
PattRecoTree()
Definition: PattRecoTree.h:24
b
double b
Definition: hdecay.h:118
PattRecoNode.h
reco::PattRecoTree
Class for storing FFTJet sparse clustering trees.
Definition: PattRecoTree.h:20
reco::PattRecoNode
Tree nodes for storing FFTJet preclusters.
Definition: PattRecoNode.h:16
reco::PattRecoTree::Node
PattRecoNode< Cluster > Node
Definition: PattRecoTree.h:22
reco::PattRecoTree::addScale
void addScale(const double s)
Definition: PattRecoTree.h:43
reco::PattRecoTree::setSparse
void setSparse(const bool b)
Definition: PattRecoTree.h:32
reco::PattRecoTree::reserveNodes
void reserveNodes(const unsigned n)
Definition: PattRecoTree.h:40
reco::PattRecoTree::sparse_
bool sparse_
Definition: PattRecoTree.h:48
reco::PattRecoTree::reserveScales
void reserveScales(const unsigned n)
Definition: PattRecoTree.h:41
reco::PattRecoTree::getScales
const std::vector< ScaleType > & getScales() const
Definition: PattRecoTree.h:29
reco::PattRecoTree::clear
void clear()
Definition: PattRecoTree.h:34