43 ATH_MSG_DEBUG(
"read in " << (*in).size() <<
" neighborhoods");
49 CHECK(h_eRatioResult.
record(std::make_unique<IOBitwise::eEmEg1eRatioTOBContainer>()));
51 CHECK(h_eRatio.
record(std::make_unique<std::vector<int> >()));
53 CHECK(h_eRatioSimple.
record(std::make_unique<std::vector<float> >()));
55 for (
const auto nbhdTOB : *in) {
57 if (msgLevel() <= MSG::DEBUG) {
59 ss <<
"eRatio input: ";
60 for (
const auto& i : c_phi) {
ss << i <<
' ';}
68 if (msgLevel() <= MSG::DEBUG) {
70 ss <<
"eRatio input: ";
71 for (
const auto& i : input) {
ss << i <<
' ';}
81 std::vector<ap_int<16>> secondPeak;
99 auto result = std::max_element(secondPeak.begin(), secondPeak.end());
101 << std::distance(secondPeak.begin(),
result)
102 <<
" has value " << *
result);
108 if(peak > 0 || secondMax > 0){
109 auto eRatio =
static_cast< float >(peak - secondMax)/
static_cast< float >(peak + secondMax);
113 auto eRatioSimple =
static_cast< float >(secondMax)/
static_cast< float >(peak);
114 h_eRatioSimple->push_back(eRatioSimple);
118 std::bitset<IOBitwise::IeEmEg1eRatioTOB::s_eGamma1eRatio_width>
result = 0;
120 if(eRatio >= 0. && eRatio <= 1.0){
123 h_eRatio->push_back((
int)(eRatio*eRatioPower));
124 result = (int)(eRatio*eRatioPower);
128 h_eRatioResult->push_back(std::make_unique<IOBitwise::eEmEg1eRatioTOB>(*nbhdTOB,
result));
132 return StatusCode::SUCCESS;