Skip to content

Conversation

@vicha-w
Copy link

@vicha-w vicha-w commented Mar 16, 2024

Hi,

I noticed a bug where ParticleNetSF may produce one-dimensional histograms from different pT ranges that can overlap and cause double-counting.

According to this documentation, the method TH2::ProjectionX projects TH2 histograms from the first bin to the last bin, inclusive. This means if the end pT range is at the boundary of a bin, h2d->GetYaxis()->FindBin(ymax) will return the next bin and introduces extra bins to the projection.

For example, if the X axis on the 2D template is separated into 50 bins from 200 - 1200 GeV, the bins will be 20 GeV wide. Based on the original code, if we set the pT range for 1D histogram to be 300 - 400, ProjectionX will include bins 6 (300-320) to 10 (380-400) and bin 11 (400-420), which is undesired.

In this fix, I reduced the bin number so that the excess bin would not be included by the projection by accident. Should you have any questions about this PR please let me know.

Thanks!
Vichayanun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant