icecube / pisa

Monte Carlo-based data analysis
http://icecube.github.io/pisa/
Apache License 2.0
19 stars 47 forks source link

fix mceq_barr with use_honda_nominal_flux #680

Closed ellohfin closed 2 years ago

ellohfin commented 2 years ago

These changes are based on the oscNext2 branch in the PISA fork of @ts4051 and were discussed with @atrettin and @LeanderFischer . They mainly consist of the introduction of the use_honda_nominal_flux variable and most of its occurrences in order to fix the following:

Previously, when using the honda flux, it was overwritten with the mceq flux. The fix is to differentiate between what flux is used, as is done here.

Also, using honda flux makes it necessary to differenciate between nu and nubar, as is done here. or here, for mceq_barr_red in PISA master.

In @ts4051 fork, an error is raised when using honda nominal flux together with the events calc mode, here. I was told this error is not an issue anymore and therefore didn't include that assertion in this PR, but if someone knows more about this please comment on this PR.

LeanderFischer commented 2 years ago

Concerning the events calc mode assertion, i think i run into the same error with the pisa master branch. Maybe @atrettin can comment on that? Otherwise just add the assertion to this file as well, i would say.

atrettin commented 2 years ago

Concerning the events calc mode assertion, i think i run into the same error with the pisa master branch. Maybe @atrettin can comment on that? Otherwise just add the assertion to this file as well, i would say.

The assertion states that there is a bug somewhere, but I could not verify that. I am using the binned mode in my analysis in the reduced Barr stage, and I checked that the differences in bin counts are negligible. There is nothing wrong about the binned implementation as far as I can see from checking the code. There may be issues if the binning chosen for the Honda calculation and the binning for the MCEq calculation are different, as there could be some weird interference effects.

atrettin commented 2 years ago

I remember that the issue arose when we saw a non-negligible difference in the binned vs. event-wise calculation in the verification sample and we concluded that it would be safest just to do the event-wise calculation. We never figured out exactly why the bin counts were different, though... maybe it was a peculiarity of the chosen binning and/or cuts?

LeanderFischer commented 2 years ago

Great, ok, than it can be merged as is @philippeller :partying_face:

philippeller commented 2 years ago

Great, merging now! Thanks everyone