Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Histogram validation and bin migrations #168

Closed
alexander-held opened this issue Jun 28, 2023 · 2 comments
Closed

Histogram validation and bin migrations #168

alexander-held opened this issue Jun 28, 2023 · 2 comments

Comments

@alexander-held
Copy link
Member

In the CMS ttbar setup there is a histogram validation script (and a reference) provided. There are cases where the observable calculated for an event seems to be extremely close to a bin boundary, and in such cases the event may migrate between bins. This is presumably due to floating point math, and can happen even with the same implementation when using different machines. It can look like this:

4j2b_single_top_t_chan_pt_scale_up
        Contents do not match:
        got      [18.34436054206814, 191.94135120855094, 616.3569931138268, 1158.3923520829348, 1829.0405553414591, 2620.8829280746218, 3549.76845738687, 3981.8725441002866, 3059.056839636495, 2392.6575137718214, 2143.929579980845, 1915.501838183115, 1729.900082816315, 1598.0499986077054, 1437.671737611248, 1326.0544028975658, 1230.6907102781418, 1101.8080959954548, 1029.7795077935136, 962.6742219686713, 882.1478789788599, 816.2565581237128, 752.7931672079566, 705.7857458814076, 652.1689597198491, 593.0218886963431, 9634.026000505984]
        expected [18.34436054206814, 191.94135120855094, 616.3569931138268, 1158.3923520829348, 1829.0405553414591, 2620.8829280746218, 3549.76845738687, 3981.8725441002866, 3059.056839636495, 2392.6575137718214, 2143.8621374825284, 1915.5692806814316, 1729.900082816315, 1598.0499986077054, 1437.671737611248, 1326.0544028975658, 1230.6907102781418, 1101.8080959954548, 1029.7795077935136, 962.6742219686713, 882.1478789788599, 816.2565581237128, 752.7931672079566, 705.7857458814076, 652.1689597198491, 593.0218886963431, 9634.026000505984]

where an event migrates between two bins:

observed: 2143.929579980845, 1915.501838183115
reference: 2143.8621374825284, 1915.5692806814316

In such cases the tolerance can be increased to compensate, but we might want to have a better method to spot this. Importantly, partial sums of the counts should still match in case of migrations.

cc @eguiraud @ekauffma

Some details also in #163 (comment).

@ekauffma
Copy link
Collaborator

ekauffma commented Jul 7, 2023

Should this be closed by #171 or is there further work to be done here?

@alexander-held
Copy link
Member Author

Indeed this is addressed by #171, thanks for following up here.

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

No branches or pull requests

2 participants