185 int i =
genBinning->GetGlobalBinNumber(HT, n);
187 BOOST_THROW_EXCEPTION( runtime_error(
"HT = "s + HT +
" and n = "s + n
188 +
" do not correspond to any bin index"s) );
192 bLeft = i-1, bCenter = i , bRight = i+1,
196 auto get = [&bias](
int i) {
197 auto content = bias->GetBinContent(i);
199 BOOST_THROW_EXCEPTION(
DE::BadInput(
"Expecting only positive entries", bias) );
200 return content > 0 ? 1./content : 0;
203 auto cUp = get(bUp ),
205 cRight = get(bRight),
208 cout << setw(3) << n << setw(3) << iHT
209 << setw(5) << bCenter << setw(15) << (cUp+cLeft+cRight+cDown)
210 << setw(5) << bUp << setw(15) << -cUp
211 << setw(5) << bLeft << setw(15) << -cLeft
212 << setw(5) << bRight << setw(15) << -cRight
213 << setw(5) << bDown << setw(15) << -cDown <<
'\n';
216 L->SetBinContent(i, bCenter, cUp+cLeft+cRight+cDown );
217 if (cUp > 0) L->SetBinContent(i, bUp , -cUp );
218 if (cLeft > 0) L->SetBinContent(i, bLeft , -cLeft );
219 if (cRight > 0) L->SetBinContent(i, bRight , -cRight );
220 if (cDown > 0) L->SetBinContent(i, bDown , -cDown );