CMS 3D CMS Logo

Node.h
Go to the documentation of this file.
1 // Node.h
2 
3 #ifndef L1Trigger_L1TMuonEndCap_emtf_Node
4 #define L1Trigger_L1TMuonEndCap_emtf_Node
5 
6 #include <string>
7 #include <vector>
8 #include "Event.h"
9 
10 namespace emtf {
11 
12  class Node {
13  public:
14  Node();
15  Node(std::string cName);
16  ~Node();
17 
18  Node(Node &&) = default;
19  Node(const Node &) = delete;
20  Node &operator=(const Node &) = delete;
21 
23  void setName(std::string sName);
24 
25  double getErrorReduction();
26  void setErrorReduction(double sErrorReduction);
27 
29  void setLeftDaughter(Node *sLeftDaughter);
30 
32  void setRightDaughter(Node *sLeftDaughter);
33 
34  Node *getParent();
35  void setParent(Node *sParent);
36 
37  double getSplitValue();
38  void setSplitValue(double sSplitValue);
39 
40  int getSplitVariable();
41  void setSplitVariable(int sSplitVar);
42 
43  double getFitValue();
44  void setFitValue(double sFitValue);
45 
46  double getTotalError();
47  void setTotalError(double sTotalError);
48 
49  double getAvgError();
50  void setAvgError(double sAvgError);
51 
52  int getNumEvents();
53  void setNumEvents(int sNumEvents);
54 
55  std::vector<std::vector<Event *> > &getEvents();
56  void setEvents(std::vector<std::vector<Event *> > &sEvents);
57 
58  void calcOptimumSplit();
61  void listEvents();
63 
64  private:
66 
70 
71  double splitValue;
73 
75  double totalError;
76  double avgError;
77 
78  double fitValue;
79  int numEvents;
80 
81  std::vector<std::vector<Event *> > events;
82  };
83 
84 } // namespace emtf
85 
86 #endif
void setFitValue(double sFitValue)
Definition: Node.cc:110
Node * getRightDaughter()
Definition: Node.cc:90
Node * getLeftDaughter()
Definition: Node.cc:86
Node * leftDaughter
Definition: Node.h:67
double getFitValue()
Definition: Node.cc:112
Node()
Definition: Node.cc:32
int splitVariable
Definition: Node.h:72
Node * getParent()
Definition: Node.cc:96
void listEvents()
Definition: Node.cc:239
std::string name
Definition: Node.h:65
double fitValue
Definition: Node.h:78
Node * parent
Definition: Node.h:69
int numEvents
Definition: Node.h:79
Definition: Event.h:15
double errorReduction
Definition: Node.h:74
void setRightDaughter(Node *sLeftDaughter)
Definition: Node.cc:88
void setEvents(std::vector< std::vector< Event *> > &sEvents)
Definition: Node.cc:134
void setTotalError(double sTotalError)
Definition: Node.cc:116
double splitValue
Definition: Node.h:71
double getTotalError()
Definition: Node.cc:118
Node * filterEventToDaughter(Event *e)
Definition: Node.cc:314
void setErrorReduction(double sErrorReduction)
Definition: Node.cc:78
std::vector< std::vector< Event * > > & getEvents()
Definition: Node.cc:132
void setAvgError(double sAvgError)
Definition: Node.cc:120
Node & operator=(const Node &)=delete
double getSplitValue()
Definition: Node.cc:102
Node * rightDaughter
Definition: Node.h:68
std::string getName()
Definition: Node.cc:74
std::vector< std::vector< Event * > > events
Definition: Node.h:81
double avgError
Definition: Node.h:76
void setParent(Node *sParent)
Definition: Node.cc:94
double totalError
Definition: Node.h:75
void setName(std::string sName)
Definition: Node.cc:72
void setSplitVariable(int sSplitVar)
Definition: Node.cc:104
int getNumEvents()
Definition: Node.cc:128
void setNumEvents(int sNumEvents)
Definition: Node.cc:126
~Node()
Definition: Node.cc:60
double getErrorReduction()
Definition: Node.cc:80
void filterEventsToDaughters()
Definition: Node.cc:267
double getAvgError()
Definition: Node.cc:122
int getSplitVariable()
Definition: Node.cc:106
void calcOptimumSplit()
Definition: Node.cc:143
void setSplitValue(double sSplitValue)
Definition: Node.cc:100
void setLeftDaughter(Node *sLeftDaughter)
Definition: Node.cc:84
void theMiracleOfChildBirth()
Definition: Node.cc:253