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 {
14  public:
15  Node();
16  Node(std::string cName);
17  ~Node();
18 
19  Node(Node &&) = default;
20 
22  void setName(std::string sName);
23 
24  double getErrorReduction();
25  void setErrorReduction(double sErrorReduction);
26 
28  void setLeftDaughter(Node *sLeftDaughter);
29 
31  void setRightDaughter(Node *sLeftDaughter);
32 
33  Node * getParent();
34  void setParent(Node *sParent);
35 
36  double getSplitValue();
37  void setSplitValue(double sSplitValue);
38 
39  int getSplitVariable();
40  void setSplitVariable(int sSplitVar);
41 
42  double getFitValue();
43  void setFitValue(double sFitValue);
44 
45  double getTotalError();
46  void setTotalError(double sTotalError);
47 
48  double getAvgError();
49  void setAvgError(double sAvgError);
50 
51  int getNumEvents();
52  void setNumEvents(int sNumEvents);
53 
54  std::vector< std::vector<Event*> >& getEvents();
55  void setEvents(std::vector< std::vector<Event*> >& sEvents);
56 
57  void calcOptimumSplit();
60  void listEvents();
62 
63  private:
64  Node(const Node &) = delete;
65  Node& operator=(const Node &) = delete;
66 
68 
72 
73  double splitValue;
75 
77  double totalError;
78  double avgError;
79 
80  double fitValue;
81  int numEvents;
82 
83  std::vector< std::vector<Event*> > events;
84 };
85 
86 } // end of emtf namespace
87 
88 #endif
void setFitValue(double sFitValue)
Definition: Node.cc:153
Node * getRightDaughter()
Definition: Node.cc:112
Node * getLeftDaughter()
Definition: Node.cc:102
Node * leftDaughter
Definition: Node.h:69
double getFitValue()
Definition: Node.cc:158
Node()
Definition: Node.cc:32
int splitVariable
Definition: Node.h:74
Node * getParent()
Definition: Node.cc:124
void listEvents()
Definition: Node.cc:318
std::string name
Definition: Node.h:67
double fitValue
Definition: Node.h:80
Node * parent
Definition: Node.h:71
int numEvents
Definition: Node.h:81
Definition: Event.h:15
double errorReduction
Definition: Node.h:76
void setRightDaughter(Node *sLeftDaughter)
Definition: Node.cc:107
std::vector< std::vector< Event * > > events
Definition: Node.h:83
void setTotalError(double sTotalError)
Definition: Node.cc:165
double splitValue
Definition: Node.h:73
double getTotalError()
Definition: Node.cc:170
Node * filterEventToDaughter(Event *e)
Definition: Node.cc:395
void setErrorReduction(double sErrorReduction)
Definition: Node.cc:85
void setEvents(std::vector< std::vector< Event * > > &sEvents)
Definition: Node.cc:204
std::vector< std::vector< Event * > > & getEvents()
Definition: Node.cc:199
void setAvgError(double sAvgError)
Definition: Node.cc:175
Node & operator=(const Node &)=delete
double getSplitValue()
Definition: Node.cc:136
Node * rightDaughter
Definition: Node.h:70
std::string getName()
Definition: Node.cc:78
double avgError
Definition: Node.h:78
void setParent(Node *sParent)
Definition: Node.cc:119
double totalError
Definition: Node.h:77
void setName(std::string sName)
Definition: Node.cc:73
void setSplitVariable(int sSplitVar)
Definition: Node.cc:141
int getNumEvents()
Definition: Node.cc:192
void setNumEvents(int sNumEvents)
Definition: Node.cc:187
~Node()
Definition: Node.cc:62
double getErrorReduction()
Definition: Node.cc:90
void filterEventsToDaughters()
Definition: Node.cc:350
double getAvgError()
Definition: Node.cc:180
int getSplitVariable()
Definition: Node.cc:146
void calcOptimumSplit()
Definition: Node.cc:214
void setSplitValue(double sSplitValue)
Definition: Node.cc:131
void setLeftDaughter(Node *sLeftDaughter)
Definition: Node.cc:97
void theMiracleOfChildBirth()
Definition: Node.cc:335