136 const int N =
genBinning->GetDistributionNumberOfBins();
137 for (
int i = 1; i <= N; ++i) {
138 double DEta =
genBinning->GetDistributionBinCenter(0,i),
139 DPhi =
genBinning->GetDistributionBinCenter(1,i);
143 bLeft = i-1, bCenter = i , bRight = i+1,
147 auto get = [&bias](
int i) {
148 auto content = bias->GetBinContent(i);
150 BOOST_THROW_EXCEPTION(
DE::BadInput(
"Expecting only positive entries", bias) );
151 return content > 0 ? 1./content : 0;
154 auto cUp = get(bUp ),
156 cRight = get(bRight),
159 cout << setw(3) << i << setw(10) << DEta << setw(10) << DPhi
160 << setw(5) << bCenter << setw(15) << (cUp+cLeft+cRight+cDown)
161 << setw(5) << bUp << setw(15) << -cUp
162 << setw(5) << bLeft << setw(15) << -cLeft
163 << setw(5) << bRight << setw(15) << -cRight
164 << setw(5) << bDown << setw(15) << -cDown <<
'\n';
167 L->SetBinContent(i, bCenter, cUp+cLeft+cRight+cDown );
168 if (cUp > 0) L->SetBinContent(i, bUp , -cUp );
169 if (cLeft > 0) L->SetBinContent(i, bLeft , -cLeft );
170 if (cRight > 0) L->SetBinContent(i, bRight , -cRight );
171 if (cDown > 0) L->SetBinContent(i, bDown , -cDown );