#include <Tree.h>
Public Member Functions | |
void | addXMLAttributes (TXMLEngine *xml, Node *node, XMLNodePointer_t np) |
void | buildTree (int nodeLimit) |
void | calcError () |
Node * | filterEvent (Event *e) |
Node * | filterEventRecursive (Node *node, Event *e) |
void | filterEvents (std::vector< Event *> &tEvents) |
void | filterEventsRecursive (Node *node) |
double | getBoostWeight (void) const |
int | getNumTerminalNodes () |
Node * | getRootNode () |
void | getSplitValues (std::vector< std::vector< double >> &v) |
void | getSplitValuesRecursive (Node *node, std::vector< std::vector< double >> &v) |
std::list< Node * > & | getTerminalNodes () |
void | loadFromCondPayload (const L1TMuonEndCapForest::DTree &tree) |
void | loadFromCondPayloadRecursive (const L1TMuonEndCapForest::DTree &tree, const L1TMuonEndCapForest::DTreeNode &node, Node *tnode) |
void | loadFromXML (const char *filename) |
void | loadFromXMLRecursive (TXMLEngine *xml, XMLNodePointer_t node, Node *tnode) |
Tree & | operator= (const Tree &tree) |
void | rankVariables (std::vector< double > &v) |
void | rankVariablesRecursive (Node *node, std::vector< double > &v) |
void | saveToXML (const char *filename) |
void | saveToXMLRecursive (TXMLEngine *xml, Node *node, XMLNodePointer_t np) |
void | setBoostWeight (double wgt) |
void | setRootNode (Node *sRootNode) |
void | setTerminalNodes (std::list< Node *> &sTNodes) |
Tree () | |
Tree (std::vector< std::vector< Event *>> &cEvents) | |
Tree (const Tree &tree) | |
Tree (Tree &&tree) | |
~Tree () | |
Private Member Functions | |
Node * | copyFrom (const Node *local_root) |
void | findLeafs (Node *local_root, std::list< Node *> &tn) |
Private Attributes | |
double | boostWeight |
int | numTerminalNodes |
double | rmsError |
Node * | rootNode |
std::list< Node * > | terminalNodes |
unsigned | xmlVersion |
Tree::Tree | ( | ) |
Definition at line 30 of file Tree.cc.
References boostWeight, numTerminalNodes, rootNode, terminalNodes, and xmlVersion.
Tree::Tree | ( | std::vector< std::vector< Event *>> & | cEvents | ) |
Definition at line 39 of file Tree.cc.
References boostWeight, numTerminalNodes, rootNode, emtf::Node::setEvents(), terminalNodes, and xmlVersion.
Tree::Tree | ( | const Tree & | tree | ) |
if( numTerminalNodes != terminalNodes.size() ) throw std::runtime_error();
Definition at line 59 of file Tree.cc.
References boostWeight, copyFrom(), findLeafs(), getRootNode(), numTerminalNodes, rmsError, rootNode, terminalNodes, and xmlVersion.
Tree::Tree | ( | Tree && | tree | ) |
Definition at line 138 of file Tree.cc.
References boostWeight, eostools::move(), numTerminalNodes, rmsError, rootNode, terminalNodes, and xmlVersion.
void Tree::addXMLAttributes | ( | TXMLEngine * | xml, |
Node * | node, | ||
XMLNodePointer_t | np | ||
) |
Definition at line 381 of file Tree.cc.
References emtf::Node::getFitValue(), emtf::Node::getSplitValue(), emtf::Node::getSplitVariable(), np, and emtf::numToStr().
Referenced by saveToXML(), and saveToXMLRecursive().
void Tree::buildTree | ( | int | nodeLimit | ) |
Definition at line 185 of file Tree.cc.
References calcError(), emtf::Node::calcOptimumSplit(), emtf::Node::filterEventsToDaughters(), emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, numTerminalNodes, rootNode, terminalNodes, and emtf::Node::theMiracleOfChildBirth().
void Tree::calcError | ( | ) |
Definition at line 171 of file Tree.cc.
References emtf::Node::getNumEvents(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, rmsError, rootNode, mathSSE::sqrt(), and terminalNodes.
Referenced by buildTree().
Definition at line 93 of file Tree.cc.
References emtf::Node::getAvgError(), emtf::Node::getErrorReduction(), emtf::Node::getFitValue(), emtf::Node::getLeftDaughter(), emtf::Node::getName(), emtf::Node::getNumEvents(), emtf::Node::getRightDaughter(), emtf::Node::getSplitValue(), emtf::Node::getSplitVariable(), emtf::Node::getTotalError(), and emtf::Node::setParent().
Referenced by operator=(), and Tree().
Definition at line 276 of file Tree.cc.
References MillePedeFileConverter_cfg::e, filterEventRecursive(), and rootNode.
Definition at line 287 of file Tree.cc.
References MillePedeFileConverter_cfg::e, and emtf::Node::filterEventToDaughter().
Referenced by filterEvent().
void Tree::filterEvents | ( | std::vector< Event *> & | tEvents | ) |
Definition at line 243 of file Tree.cc.
References filterEventsRecursive(), emtf::Node::getEvents(), and rootNode.
void Tree::filterEventsRecursive | ( | Node * | node | ) |
Definition at line 258 of file Tree.cc.
References emtf::Node::filterEventsToDaughters(), emtf::Node::getLeftDaughter(), and emtf::Node::getRightDaughter().
Referenced by filterEvents().
Definition at line 124 of file Tree.cc.
References emtf::Node::getLeftDaughter(), and emtf::Node::getRightDaughter().
Referenced by operator=(), and Tree().
|
inline |
Definition at line 57 of file Tree.h.
References boostWeight.
Referenced by L1TMuonEndCapForestESProducer::produce().
int Tree::getNumTerminalNodes | ( | ) |
Node * Tree::getRootNode | ( | ) |
Definition at line 155 of file Tree.cc.
References rootNode.
Referenced by operator=(), L1TMuonEndCapForestESProducer::produce(), and Tree().
void Tree::getSplitValues | ( | std::vector< std::vector< double >> & | v | ) |
Definition at line 364 of file Tree.cc.
References getSplitValuesRecursive(), rootNode, and findQualityFiles::v.
void Tree::getSplitValuesRecursive | ( | Node * | node, |
std::vector< std::vector< double >> & | v | ||
) |
Definition at line 336 of file Tree.cc.
References gather_cfg::cout, emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), emtf::Node::getSplitValue(), emtf::Node::getSplitVariable(), pfDeepBoostedJetPreprocessParams_cfi::sv, and findQualityFiles::v.
Referenced by getSplitValues().
std::list< Node * > & Tree::getTerminalNodes | ( | ) |
void Tree::loadFromCondPayload | ( | const L1TMuonEndCapForest::DTree & | tree | ) |
Definition at line 550 of file Tree.cc.
References loadFromCondPayloadRecursive(), and rootNode.
void Tree::loadFromCondPayloadRecursive | ( | const L1TMuonEndCapForest::DTree & | tree, |
const L1TMuonEndCapForest::DTreeNode & | node, | ||
Node * | tnode | ||
) |
Definition at line 560 of file Tree.cc.
References L1TMuonEndCapForest::DTreeNode::fitVal, emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), L1TMuonEndCapForest::DTreeNode::ileft, L1TMuonEndCapForest::DTreeNode::iright, numTerminalNodes, emtf::Node::setFitValue(), emtf::Node::setSplitValue(), emtf::Node::setSplitVariable(), L1TMuonEndCapForest::DTreeNode::splitVal, L1TMuonEndCapForest::DTreeNode::splitVar, terminalNodes, and emtf::Node::theMiracleOfChildBirth().
Referenced by loadFromCondPayload().
void Tree::loadFromXML | ( | const char * | filename | ) |
Definition at line 437 of file Tree.cc.
References boostWeight, corrVsCorr::filename, loadFromXMLRecursive(), rootNode, AlCaHLTBitMon_QueryRunRegistry::string, ExtractAppInfoFromXML::xmldoc, and xmlVersion.
void Tree::loadFromXMLRecursive | ( | TXMLEngine * | xml, |
XMLNodePointer_t | node, | ||
Node * | tnode | ||
) |
Definition at line 477 of file Tree.cc.
References emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), mps_fire::i, numTerminalNodes, emtf::Node::setFitValue(), emtf::Node::setSplitValue(), emtf::Node::setSplitVariable(), AlCaHLTBitMon_QueryRunRegistry::string, terminalNodes, emtf::Node::theMiracleOfChildBirth(), and xmlVersion.
Referenced by loadFromXML().
if( numTerminalNodes != terminalNodes.size() ) throw std::runtime_error();
Definition at line 74 of file Tree.cc.
References boostWeight, copyFrom(), findLeafs(), getRootNode(), numTerminalNodes, rmsError, rootNode, terminalNodes, and xmlVersion.
void Tree::rankVariables | ( | std::vector< double > & | v | ) |
Definition at line 332 of file Tree.cc.
References rankVariablesRecursive(), rootNode, and findQualityFiles::v.
void Tree::rankVariablesRecursive | ( | Node * | node, |
std::vector< double > & | v | ||
) |
Definition at line 300 of file Tree.cc.
References emtf::Node::getErrorReduction(), emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), emtf::Node::getSplitVariable(), pfDeepBoostedJetPreprocessParams_cfi::sv, and findQualityFiles::v.
Referenced by rankVariables().
void Tree::saveToXML | ( | const char * | filename | ) |
Definition at line 391 of file Tree.cc.
References addXMLAttributes(), HltBtagPostValidation_cff::c, emtf::Node::getName(), rootNode, saveToXMLRecursive(), and ExtractAppInfoFromXML::xmldoc.
void Tree::saveToXMLRecursive | ( | TXMLEngine * | xml, |
Node * | node, | ||
XMLNodePointer_t | np | ||
) |
Definition at line 415 of file Tree.cc.
References addXMLAttributes(), emtf::Node::getLeftDaughter(), emtf::Node::getRightDaughter(), MainPageGenerator::l, and np.
Referenced by saveToXML().
|
inline |
void Tree::setRootNode | ( | Node * | sRootNode | ) |
void Tree::setTerminalNodes | ( | std::list< Node *> & | sTNodes | ) |
|
private |
Definition at line 65 of file Tree.h.
Referenced by getBoostWeight(), loadFromXML(), operator=(), setBoostWeight(), and Tree().
|
private |
Definition at line 63 of file Tree.h.
Referenced by buildTree(), getNumTerminalNodes(), loadFromCondPayloadRecursive(), loadFromXMLRecursive(), operator=(), and Tree().
|
private |
Definition at line 64 of file Tree.h.
Referenced by calcError(), operator=(), and Tree().
|
private |
Definition at line 61 of file Tree.h.
Referenced by buildTree(), calcError(), filterEvent(), filterEvents(), getRootNode(), getSplitValues(), loadFromCondPayload(), loadFromXML(), operator=(), rankVariables(), saveToXML(), setRootNode(), Tree(), and ~Tree().
|
private |
Definition at line 62 of file Tree.h.
Referenced by buildTree(), calcError(), getTerminalNodes(), loadFromCondPayloadRecursive(), loadFromXMLRecursive(), operator=(), setTerminalNodes(), and Tree().
|
private |
Definition at line 66 of file Tree.h.
Referenced by loadFromXML(), loadFromXMLRecursive(), operator=(), and Tree().