20 const std::string& name,
21 const IInterface* parent) :
22 base_class(
type, name, parent){
30 return StatusCode::SUCCESS;
44 ATH_MSG_DEBUG(
"read in " << (*in).size() <<
" neighborhoods");
47 CHECK(h_BDTResult.
record(std::make_unique<eEmEg1BDTTOBContainer>()));
49 for (
const auto nbhdTOB : *in) {
51 if (c_phi.empty()) {
continue;}
55 ap_int<10>* c_input = &input[0];
60 bdt.decision_function(c_input, scores);
61 if (msgLevel() <= MSG::DEBUG) {
64 for (
const auto& i : input) {
ss << i <<
' ';}
68 if (msgLevel() <= MSG::DEBUG) {
70 ss <<
"C BDT output: ";
71 for (
const auto& i : scores) {
ss << i <<
' ';}
76 std::bitset<eEmEg1BDTTOB::s_eGamma1BDT_width>
result;
77 for (
int i=0;i<scores[0].length();i++){
81 h_BDTResult->push_back(std::make_unique<IOBitwise::eEmEg1BDTTOB>(*nbhdTOB,
result));
84 return StatusCode::SUCCESS;
90 auto result = std::vector<double>();
106 result.at(0) = phi_center.at(c).m_e;
108 result.at(1) = std::max(phi_low.at(c).m_e, phi_high.at(c).m_e);
113 std::max({phi_center.at(c-
diff).m_e,
114 phi_center.at(c+
diff).m_e});
117 std::max({phi_low.at(c-
diff).m_e,
118 phi_low.at(c+
diff).m_e,
119 phi_high.at(c-
diff).m_e,
120 phi_high.at(c+
diff).m_e});
130 std::stringstream
ss;
131 ss <<
"Egamma1BDTAlgTool. name: " << name() <<
'\n'
#define CHECK(...)
Evaluate an expression and check for errors.
Header file to be included by clients of the Monitored infrastructure.
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
virtual const LArStripNeighborhood & Neighbourhood() const
const StripDataVector & phi_low() const
Returns a vector of strip cell e/eta/phi data for the low phi row of the neighborhood.
const StripDataVector & phi_center() const
Returns a vector of strip cell e/eta/phi data for the central phi row of the neighborhood.
const StripDataVector & phi_high() const
Returns a vector of strip cell e/eta/phi data for the central high row of the neighborhood.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
constexpr int fn_classes(int n_classes)
AlgTool that to test whether expected the TIP values generated by data supplied by eEmMultTestBench c...
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
static std::vector< ap_int< 10 > > digitize10(const std::vector< double > &v)