-
Notifications
You must be signed in to change notification settings - Fork 51
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
Introducing support for variable binning with event classes (species) #835
base: master
Are you sure you want to change the base?
Conversation
…tion of the Map object to allow also contain variable binning histograms
…ds to VarMultiDimBinnig
…eq__ and __repr__ methods
…s not make sense or support is not yet implemented; also extended test_Map to include tests with VarMultiDimBinning
…or now but leaving this for later); also fix selection=None handling in config_parser
Thanks for implementing this. I will give it a more detailed look later, but have one first comment. I think we need a translation from each binning mode (events, multi dim, and var binning) to each other because we want to be able to run the stage before the hist stage in event as well as binned mode. We can always translate to event mode first and then change the binning mode though |
In general, I'm a bit worried about adding another "events" class (here Does one actually need an |
!!!DO NOT MERGE UNTIL APPROVED BY REQUESTED REVIEWERS!!!
Summary of the changes:
VarMultiDimBinning
, which holds a list ofEventSpecie
sEventSpecie
is defined by name, binning and selection string (can also be None)VarMultiDimBinning
intoMap
, so can support arithmetic operations, hashing, eq/neq, metric calculationContainer
, no translation from/toVarMultiDimBinning
shape (planning to add translationVarMultiDimBinning <-> 'events'
, translation to/from MultidimBinning isn't necessary imho, but this is up for debate)utils.hist
stage by adding handling ofVarMultiDimBinning
. This is where sample is divided based on selection. For now I used if/else statements, but it leads to some code duplication, so I'm open for suggestion (maybe we just make two hist stages, with and withoutVarMultiDimBinning
support?)Main idea is that analysis functionality should be minimally affected (I think only
get_detailed_metric_info
should really be affected), this is the reason for introducing this at binning level. However I haven't tested all functionality yetI have tested running Pipeline with identical 4d binning, one using
MultiDimBinning
and one withVarMultiDimBinning
containing a singleEventSpecie
with the same 4d binning andselection=None
. Resulting histograms are identical. You can see results of the timed test below:Main TODOs so far:
Let me know if you have any suggestions!