ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
GlobalSim::BDT::BDT< n_trees, n_classes, input_t, score_t, threshold_t > Struct Template Reference

#include <BDT.h>

Collaboration diagram for GlobalSim::BDT::BDT< n_trees, n_classes, input_t, score_t, threshold_t >:

Public Member Functions

void tree_scores (input_t x, score_t scores[fn_classes(n_classes)][n_trees]) const
 
void decision_function (input_t x, score_t score[fn_classes(n_classes)]) const
 

Public Attributes

score_t normalisation
 
score_t init_predict [fn_classes(n_classes)]
 
OpAdd< score_top_add {}
 

Detailed Description

template<int n_trees, int n_classes, class input_t, class score_t, class threshold_t>
struct GlobalSim::BDT::BDT< n_trees, n_classes, input_t, score_t, threshold_t >

Definition at line 110 of file Trigger/TrigT1/Global/GlobalSimulation/src/GlobalAlgs/Egamma1BDT/BDT.h.

Member Function Documentation

◆ decision_function()

template<int n_trees, int n_classes, class input_t , class score_t , class threshold_t >
void GlobalSim::BDT::BDT< n_trees, n_classes, input_t, score_t, threshold_t >::decision_function ( input_t  x,
score_t  score[fn_classes(n_classes)] 
) const
inline

Definition at line 119 of file Trigger/TrigT1/Global/GlobalSimulation/src/GlobalAlgs/Egamma1BDT/BDT.h.

119  {
120  score_t scores[fn_classes(n_classes)][n_trees];
121  // Get predictions scores
122  tree_scores(x, scores);
123 
124  for(int j = 0; j < fn_classes(n_classes); j++){
125  // Init predictions
126  score[j] = init_predict[j];
127  // Sum predictions from trees via "reduce" method
128  score[j] += reduce<score_t, n_trees, OpAdd<score_t>>(scores[j], op_add);
129  }
130  // Normalize predictions
131  for(int j = 0; j < fn_classes(n_classes); j++){
132  score[j] *= normalisation;
133  }
134  }

◆ tree_scores()

template<int n_trees, int n_classes, class input_t , class score_t , class threshold_t >
void GlobalSim::BDT::BDT< n_trees, n_classes, input_t, score_t, threshold_t >::tree_scores ( input_t  x,
score_t  scores[fn_classes(n_classes)][n_trees] 
) const

Member Data Documentation

◆ init_predict

template<int n_trees, int n_classes, class input_t , class score_t , class threshold_t >
score_t GlobalSim::BDT::BDT< n_trees, n_classes, input_t, score_t, threshold_t >::init_predict[fn_classes(n_classes)]

◆ normalisation

template<int n_trees, int n_classes, class input_t , class score_t , class threshold_t >
score_t GlobalSim::BDT::BDT< n_trees, n_classes, input_t, score_t, threshold_t >::normalisation

◆ op_add

template<int n_trees, int n_classes, class input_t , class score_t , class threshold_t >
OpAdd<score_t> GlobalSim::BDT::BDT< n_trees, n_classes, input_t, score_t, threshold_t >::op_add {}

The documentation for this struct was generated from the following file:
GlobalSim::BDT::BDT::tree_scores
void tree_scores(input_t x, score_t scores[fn_classes(n_classes)][n_trees]) const
x
#define x
GlobalSim::BDT::BDT::normalisation
score_t normalisation
Definition: Trigger/TrigT1/Global/GlobalSimulation/src/GlobalAlgs/Egamma1BDT/BDT.h:113
GlobalSim::BDT::fn_classes
constexpr int fn_classes(int n_classes)
Definition: Trigger/TrigT1/Global/GlobalSimulation/src/GlobalAlgs/Egamma1BDT/BDT.h:44
GlobalSim::score_t
ap_fixed< 10, 5 > score_t
Definition: parameters.h:21
GlobalSim::BDT::BDT::op_add
OpAdd< score_t > op_add
Definition: Trigger/TrigT1/Global/GlobalSimulation/src/GlobalAlgs/Egamma1BDT/BDT.h:115
xAOD::score
@ score
Definition: TrackingPrimitives.h:513
GlobalSim::BDT::BDT::init_predict
score_t init_predict[fn_classes(n_classes)]
Definition: Trigger/TrigT1/Global/GlobalSimulation/src/GlobalAlgs/Egamma1BDT/BDT.h:114