CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Node.h
Go to the documentation of this file.
1 // Node.h
2 
3 #ifndef ADD_NODE
4 #define ADD_NODE
5 
6 #include <string>
7 #include <vector>
9 
10 namespace emtf{
11  class Node
12  {
13  public:
14  Node();
15  Node(std::string cName);
16  ~Node();
17 
19  void setName(std::string sName);
20 
21  Double_t getErrorReduction();
22  void setErrorReduction(Double_t sErrorReduction);
23 
25  void setLeftDaughter(Node *sLeftDaughter);
26 
28  void setRightDaughter(Node *sLeftDaughter);
29 
30  Node * getParent();
31  void setParent(Node *sParent);
32 
33  Double_t getSplitValue();
34  void setSplitValue(Double_t sSplitValue);
35 
36  Int_t getSplitVariable();
37  void setSplitVariable(Int_t sSplitVar);
38 
39  Double_t getFitValue();
40  void setFitValue(Double_t sFitValue);
41 
42  Double_t getTotalError();
43  void setTotalError(Double_t sTotalError);
44 
45  Double_t getAvgError();
46  void setAvgError(Double_t sAvgError);
47 
48  Int_t getNumEvents();
49  void setNumEvents(Int_t sNumEvents);
50 
51  std::vector< std::vector<emtf::Event*> >& getEvents();
52  void setEvents(std::vector< std::vector<emtf::Event*> >& sEvents);
53 
54  void calcOptimumSplit();
57  void listEvents();
59 
60  private:
62 
66 
67  Double_t splitValue;
69 
70  Double_t errorReduction;
71  Double_t totalError;
72  Double_t avgError;
73 
74  Double_t fitValue;
75  Int_t numEvents;
76 
77  std::vector< std::vector<emtf::Event*> > events;
78  };
79 }
80 
81 #endif
Node * getRightDaughter()
Definition: Node.cc:111
Node * getLeftDaughter()
Definition: Node.cc:101
Node * leftDaughter
Definition: Node.h:63
Node()
Definition: Node.cc:31
Double_t getAvgError()
Definition: Node.cc:179
std::vector< std::vector< emtf::Event * > > events
Definition: Node.h:77
void setErrorReduction(Double_t sErrorReduction)
Definition: Node.cc:84
Int_t numEvents
Definition: Node.h:75
Node * getParent()
Definition: Node.cc:123
void listEvents()
Definition: Node.cc:317
std::string name
Definition: Node.h:61
Double_t getTotalError()
Definition: Node.cc:169
Node * parent
Definition: Node.h:65
void setEvents(std::vector< std::vector< emtf::Event * > > &sEvents)
Definition: Node.cc:203
void setNumEvents(Int_t sNumEvents)
Definition: Node.cc:186
void setRightDaughter(Node *sLeftDaughter)
Definition: Node.cc:106
void setAvgError(Double_t sAvgError)
Definition: Node.cc:174
Double_t fitValue
Definition: Node.h:74
Double_t getErrorReduction()
Definition: Node.cc:89
void setFitValue(Double_t sFitValue)
Definition: Node.cc:152
std::vector< std::vector< emtf::Event * > > & getEvents()
Definition: Node.cc:198
void setTotalError(Double_t sTotalError)
Definition: Node.cc:164
void setSplitVariable(Int_t sSplitVar)
Definition: Node.cc:140
Double_t totalError
Definition: Node.h:71
Double_t getSplitValue()
Definition: Node.cc:135
Node * rightDaughter
Definition: Node.h:64
std::string getName()
Definition: Node.cc:77
Int_t getNumEvents()
Definition: Node.cc:191
Double_t getFitValue()
Definition: Node.cc:157
void setParent(Node *sParent)
Definition: Node.cc:118
Double_t avgError
Definition: Node.h:72
Int_t getSplitVariable()
Definition: Node.cc:145
void setName(std::string sName)
Definition: Node.cc:72
Int_t splitVariable
Definition: Node.h:68
void setSplitValue(Double_t sSplitValue)
Definition: Node.cc:130
~Node()
Definition: Node.cc:61
Node * filterEventToDaughter(emtf::Event *e)
Definition: Node.cc:394
Double_t errorReduction
Definition: Node.h:70
void filterEventsToDaughters()
Definition: Node.cc:349
void calcOptimumSplit()
Definition: Node.cc:213
Double_t splitValue
Definition: Node.h:67
void setLeftDaughter(Node *sLeftDaughter)
Definition: Node.cc:96
void theMiracleOfChildBirth()
Definition: Node.cc:334