Closed dladams closed 2 years ago
AdcDataPlotter has been modified to assign the tick rebinning in the ctor using TickRebin if nonzero and 1 + ntick/(0.72*npixel) otherwise. The factor in the demnominator tries to account for the histogram window size with a plot width of npixels and guarantees no rebin for the standard 1000 ticks in 1400 pixels.
Also add (rebin N) to the X-label if rebinning is done.
Note that rebinning is, as before, an average over the merged bins.
The rebin is evluated in the ctor with ntick based on the fcl param TickRange. If that range is not valid and the fcl value for TickRebin is zero, then the rebin is set to 1 and a warning is broadcast.
We could move the rebin calculation to be event-by-event but then it might vary event by event.
Rebinning is restricted to these values:
rebins = [1, 2, 4, 5, 8, 10, 16, 20, 32, 50, 64, 100, 128, 200, 256, 400, 500, 1000, 2000, 4000, 10000]
This could easily be made a fcl param if anyone wants different choices.
Tool AdcDataPlotter makes signal strength vs channel vs tick plots. The tick range for multiple plots can be set with a range tool but when the range is large (more ticks that pixels), we would like to rebin. There is no shared rebin value and rather than add that or add binning to the range tool, I would like to add the option to automate evaluation of the the rebin factor.