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

Stage/service to define different binning for analysis #108

Open
jllanfranchi opened this issue Aug 24, 2016 · 5 comments
Open

Stage/service to define different binning for analysis #108

jllanfranchi opened this issue Aug 24, 2016 · 5 comments

Comments

@jllanfranchi
Copy link
Contributor

jllanfranchi commented Aug 24, 2016

Additional stage that allows the user to define analysis binning that is possibly different than reco binning and possibly different binnings for each PID category.

Discussion from PISA call on 2016-08-24 (https://wikispaces.psu.edu/display/PINGU/PISA+-+PINGU+Simulation+Analysis):

Ste: can we have different binning for tracks and cascades...?

  • Why this is useful: Look at Michael's analysis, he uses track length as PID; correlation between track length and energy means that track events have no events below 10 GeV, but cascades go to 3 GeV. Therefore different binning makes sense.
  • How to implement: Stage at the end to re-bin or mask off certain bins for subsequent analysis steps (i.e. the fit)
    • Requires new stage/service, plus handing the masking such that they don't contribute to the fit.
      • Masking: advantage is that can do more complicated things; disadvantage if it does more difficult things, non-uniform cuts, ...?
      • Alternatively: define new "analysis binning". Advantages: similar to other binning things we do now, bins don't even exist so accidentally doing the something unintentionally is harder; covers common use case of just cutting out e.g. low / high energies. Problems: must be rectangular; need to define for each PID category separately, but it's a goal to make PID another binning dimension rather than separate maps, which makes different binning for different PID very tricky to achieve.
      • Shivesh suggests: Why not both being an option? It's a stage, it can do what it wants and have flexible configuration if need be. Advantages: Both Ste and Justin get their way. Disadvantages: more time to implement both, possibly difficult to communicate when the user can do the same thing but different ways
@jllanfranchi
Copy link
Contributor Author

should be fixed in PISA pi...

@LeanderFischer
Copy link
Collaborator

So this here is actually an issue that we might consider implementing. @anilak41 et al have found workarounds to use different binnings, but this would be an amazing feature to pisa.

@JanWeldert
Copy link
Collaborator

A current hack is to use the detectors class to define different "detectors", one per PID bin (to use the example from before), and choose different energy and coszen binning for each of them. Note that for each detector you have to remove all events that don't fall in the respective PID bin.

@thehrh
Copy link
Contributor

thehrh commented Nov 17, 2024

Adding to this thread, PR #835 by @marialiubarska is now proposing to introduce a VarMultiDimBinning class. Internally, it is represented by a tuple of (also new) EventSpecies objects, each of which has its own MultiDimBinning (among others). The Map and Container classes have been adapted, as well as the utils.hist service and the utils.config_parser module. Anyone feel free to take a look and review.

@thehrh
Copy link
Contributor

thehrh commented Feb 20, 2025

For another approach currently under review see #849 .

@thehrh thehrh added this to the PISA 4.2 milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants