ATLAS Offline Software
Loading...
Searching...
No Matches
GlobalSim::BDT Namespace Reference

Classes

struct  BDT
class  OpAdd
struct  Tree

Functions

constexpr int floorlog2 (int x)
constexpr int pow2 (int x)
template<class T, int N, class Op>
reduce (const T *x, Op op)
constexpr int fn_classes (int n_classes)

Function Documentation

◆ floorlog2()

int GlobalSim::BDT::floorlog2 ( int x)
constexpr

◆ fn_classes()

int GlobalSim::BDT::fn_classes ( int n_classes)
constexpr

Definition at line 44 of file Trigger/TrigT1/Global/GlobalSimulation/src/FirstChain/Egamma1BDT/BDT.h.

44 {
45 return n_classes == 2 ? 1 : n_classes;
46 }
static const int n_classes
Definition parameters.h:16

◆ pow2()

int GlobalSim::BDT::pow2 ( int x)
constexpr

Definition at line 24 of file Trigger/TrigT1/Global/GlobalSimulation/src/FirstChain/Egamma1BDT/BDT.h.

24{ return x == 0 ? 1 : 2 * pow2(x - 1); }
static const std::map< unsigned int, unsigned int > pow2

◆ reduce()

template<class T, int N, class Op>
T GlobalSim::BDT::reduce ( const T * x,
Op op )

Definition at line 26 of file Trigger/TrigT1/Global/GlobalSimulation/src/FirstChain/Egamma1BDT/BDT.h.

26 {
27 static constexpr int leftN = pow2(floorlog2(N - 1)) > 0 ? pow2(floorlog2(N - 1)) : 0;
28 static constexpr int rightN = N - leftN > 0 ? N - leftN : 0;
29 if (N == 1) {
30 return x[0];
31 }
32 if (N == 2) {
33 return op(x[0], x[1]);
34 }
35 return op(reduce<T, leftN, Op>(x, op), reduce<T, rightN, Op>(x + leftN, op));
36 }
static void reduce(HepMC::GenEvent *ge, HepMC::GenParticle *gp)
Remove an unwanted particle from the event, collapsing the graph structure consistently.
Definition FixHepMC.cxx:39