ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TCS::Tree Class Reference

#include <AnomalyDetectionBDT.h>

Collaboration diagram for TCS::Tree:

Public Member Functions

 Tree (const nlohmann::json &obj, int nVars)
 
int64_t getTreeScore (const std::vector< int64_t > &inputEvent) const
 

Private Attributes

std::vector< Binbins
 

Detailed Description

Definition at line 36 of file AnomalyDetectionBDT.h.

Constructor & Destructor Documentation

◆ Tree()

Tree::Tree ( const nlohmann::json obj,
int  nVars 
)

Definition at line 364 of file AnomalyDetectionBDT.cxx.

364  {
365  for (auto &[binName, bin] : obj["bins"].items()) {
366  bins.push_back(Bin(bin, nVars));
367  }
368 }

Member Function Documentation

◆ getTreeScore()

int64_t Tree::getTreeScore ( const std::vector< int64_t > &  inputEvent) const

Definition at line 371 of file AnomalyDetectionBDT.cxx.

371  {
372  for(const Bin& bin : bins) {
373  if(bin.isInside(inputEvent)) {
374  return bin.score;
375  }
376  }
377  return 0;
378  //throw std::runtime_error("AnomalyDetection: the code has reached an unreachable state");
379 }

Member Data Documentation

◆ bins

std::vector<Bin> TCS::Tree::bins
private

Definition at line 45 of file AnomalyDetectionBDT.h.


The documentation for this class was generated from the following files:
TCS::Tree::bins
std::vector< Bin > bins
Definition: AnomalyDetectionBDT.h:45
bin
Definition: BinsDiffFromStripMedian.h:43
TrigJetMonitorAlgorithm.items
items
Definition: TrigJetMonitorAlgorithm.py:71
python.PyAthena.obj
obj
Definition: PyAthena.py:132