14 const std::string&
name,
15 const IInterface*
parent) :
25 return StatusCode::SUCCESS;
40 ATH_MSG_DEBUG(
"read in " << (*in).size() <<
" neighborhoods");
50 for (
const auto& nbhd : *in) {
54 ss <<
"Baseline input: ";
55 for (
const auto&
i : c_phi) {
ss <<
i <<
' ';}
65 ss <<
"Baseline input: ";
66 for (
const auto&
i : input) {
ss <<
i <<
' ';}
76 std::vector<ap_int<16>> secondPeak;
94 auto result = std::max_element(secondPeak.begin(), secondPeak.end());
97 <<
" has value " << *
result);
103 if(peak > 0 || secondMax > 0){
104 auto eRatio =
static_cast< float >(peak - secondMax)/
static_cast< float >(peak + secondMax);
105 h_eRatio->push_back(eRatio);
108 auto eRatioSimple =
static_cast< float >(secondMax)/
static_cast< float >(peak);
109 h_eRatioSimple->push_back(eRatioSimple);
115 return StatusCode::SUCCESS;
132 if(startCell > endCell) {
139 for (
auto itr = input.begin() + startCell; itr != input.begin() + endCell + direction; itr+=direction){
141 ATH_MSG_DEBUG(
"Input is " << *itr <<
" last energy is " << lastEnergy);
142 if(
ascending==0 && *itr>lastEnergy && *itr-lastEnergy > noiseMargin){
143 ATH_MSG_DEBUG(
"We are going up now " << *itr <<
" is more then " << lastEnergy);
147 }
else if(
ascending==1 && lastEnergy>*itr && lastEnergy-*itr > noiseMargin){
148 ATH_MSG_DEBUG(
"We are past the top " << *itr <<
" is less than " << lastEnergy);
149 if(secondPeak<*itr) secondPeak = lastEnergy;
163 auto result = std::vector<double>();
165 const auto& phi_low = nbhd->
phi_low();
171 const auto& phi_high = nbhd->
phi_high();
192 std::stringstream
ss;
193 ss <<
"Egamma1BaselineAlgTool. name: " <<
name() <<
'\n'