Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:54

0001 // Node.h
0002 
0003 #ifndef L1Trigger_L1TMuonEndCap_emtf_Node
0004 #define L1Trigger_L1TMuonEndCap_emtf_Node
0005 
0006 #include <string>
0007 #include <vector>
0008 #include "Event.h"
0009 
0010 namespace emtf {
0011 
0012   class Node {
0013   public:
0014     Node();
0015     Node(std::string cName);
0016     ~Node();
0017 
0018     Node(Node &&) = default;
0019     Node(const Node &) = delete;
0020     Node &operator=(const Node &) = delete;
0021 
0022     std::string getName();
0023     void setName(std::string sName);
0024 
0025     double getErrorReduction();
0026     void setErrorReduction(double sErrorReduction);
0027 
0028     Node *getLeftDaughter();
0029     void setLeftDaughter(Node *sLeftDaughter);
0030 
0031     Node *getRightDaughter();
0032     void setRightDaughter(Node *sLeftDaughter);
0033 
0034     Node *getParent();
0035     void setParent(Node *sParent);
0036 
0037     double getSplitValue();
0038     void setSplitValue(double sSplitValue);
0039 
0040     int getSplitVariable();
0041     void setSplitVariable(int sSplitVar);
0042 
0043     double getFitValue();
0044     void setFitValue(double sFitValue);
0045 
0046     double getTotalError();
0047     void setTotalError(double sTotalError);
0048 
0049     double getAvgError();
0050     void setAvgError(double sAvgError);
0051 
0052     int getNumEvents();
0053     void setNumEvents(int sNumEvents);
0054 
0055     std::vector<std::vector<Event *> > &getEvents();
0056     void setEvents(std::vector<std::vector<Event *> > &sEvents);
0057 
0058     void calcOptimumSplit();
0059     void filterEventsToDaughters();
0060     Node *filterEventToDaughter(Event *e);
0061     void listEvents();
0062     void theMiracleOfChildBirth();
0063 
0064   private:
0065     std::string name;
0066 
0067     Node *leftDaughter;
0068     Node *rightDaughter;
0069     Node *parent;
0070 
0071     double splitValue;
0072     int splitVariable;
0073 
0074     double errorReduction;
0075     double totalError;
0076     double avgError;
0077 
0078     double fitValue;
0079     int numEvents;
0080 
0081     std::vector<std::vector<Event *> > events;
0082   };
0083 
0084 }  // namespace emtf
0085 
0086 #endif