37 {
39
40
41
42 auto in =
44 ctx);
46
47 ATH_MSG_DEBUG(
"read in " << (*in).size() <<
" neighborhoods");
48
49 SG::WriteHandle<std::vector<float> > h_BDTScore(
m_BDTScoreKey, ctx);
50 CHECK(h_BDTScore.record(std::make_unique<std::vector<float> >()));
51
52
53 auto eEmEg1BDTTOBs = std::make_unique<IOBitwise::eEmEg1BDTTOBContainer>();
54
55 for (const auto nbhdTOB : *in) {
57 if (c_phi.empty()) {continue;}
59
61 ap_int<10>* c_input = &
input[0];
62
64
65
66 bdt.decision_function(c_input, scores);
67 if (msgLevel() <= MSG::DEBUG) {
70 for (
const auto& i : input) {
ss <<
i <<
' ';}
72 }
73
74 if (msgLevel() <= MSG::DEBUG) {
76 ss <<
"C BDT output: ";
77 for (
const auto& i : scores) {
ss <<
i <<
' ';}
79 }
80
81
82 std::bitset<eEmEg1BDTTOB::s_eGamma1BDT_width>
result;
83 for (
int i=0;
i<scores[0].length();
i++){
86 }
87
88
89 h_BDTScore->push_back(scores[0].
to_float());
90 eEmEg1BDTTOBs->push_back(std::make_unique<IOBitwise::eEmEg1BDTTOB>(*nbhdTOB, result));
91 }
92
93
95 CHECK(h_eEmEg1BDTTOBs.record(std::move(eEmEg1BDTTOBs)));
96
97 return StatusCode::SUCCESS;
98 }
constexpr int fn_classes(int n_classes)
static const BDT::BDT< n_trees, n_classes, input_arr_t, score_t, threshold_t > bdt
static const int n_features
ap_fixed< 10, 5 > score_t
static const int n_classes
float to_float(const T &va, const unsigned int &p, const unsigned int &f)
static std::vector< ap_int< 10 > > digitize10(const std::vector< double > &v)