Hello!
I am doing some analyses from a root file, which I write a macro for. In this macro, I have a main histogram that consists of all the data points I need, it has 30 bins and x-axis range is from 0 to 150(meters), signifying 1 bin for each 5m distance.
I need to produce multiple histograms, where each histogram is the of one bin width. So, one histo for 0-5m, another for 5-10m, another for 10-15m and so on. And one final histogram that contains the entire plot from 0 to 150.
I could write an if loop/switch for each range but I assume that would require creating 30(+1) different histograms which seems inefficient.
Is there any other way to solve this?
ROOT Version: 6.28
Platform: Ubuntu 22.04
Compiler: g++