You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, each variable that is passed to cf.CreateHistograms will automatically create a variable axis. It would be nice if we can also support some other types of Histogram axes (see Hist docu for possible types of axes).
Boolean, StrCategory, and IntCategory might be used if someone needs a second categorical axis, e.g. for trigger studies.
Integer might be nice for variables with discrete x values, e.g number of jets.
Implementing the creation of histograms with different axes types should be rather straightforward. We just need to add some auxiliary entry to our variable insts that is used to define how the additional axis is created.
The text was updated successfully, but these errors were encountered:
This is an interesting proposal as this would also make plotting of variables such as number of jets nicer. I tried to do a simple implementation looking at the attribute discrete_x to at least include Integer in cf.CreateHistograms. I came however across an "issue" in how variables are defined in order:
the variable_inst.binning is always converted to a float (see code) which hist axis Integer does not allow. This could be fixed by converting it back to an integer but a change in variables in order would be nice for my next issue
It is not possible to give a type to the variable, this would be the easiest way to decide what histogram axis to use (bool, Integer...) and would be a usefull addition in general to variable attributes as this would also "fix" the binning problem above.
At the moment, each variable that is passed to
cf.CreateHistograms
will automatically create a variable axis. It would be nice if we can also support some other types of Histogram axes (see Hist docu for possible types of axes).Boolean
,StrCategory
, andIntCategory
might be used if someone needs a second categorical axis, e.g. for trigger studies.Integer
might be nice for variables with discrete x values, e.g number of jets.Implementing the creation of histograms with different axes types should be rather straightforward. We just need to add some auxiliary entry to our variable insts that is used to define how the additional axis is created.
The text was updated successfully, but these errors were encountered: