I have a list of histograms which I read in from a TFile:
histo_list=([root_file.Get(f"Histo{ch}") for ch in x_channels])
I then plot them:
canvas= TCanvas("canvas","canvas",1800,1400)
canvas.Divide(4,4)
for i_plot in range(16):
canvas.cd(i_plot+1)
x_histo=histo_list[i_plot]
x_histo.Rebin(200)
x_histo.Draw()
x_histo.SetTitle(";;")
x_histo.GetYaxis().SetRangeUser(-4000,55000)
#x_histo.Fit("pol0")
horizontal_zero_line.Draw("same")
If I run this in an interactive python environment and then ask numpy what the maximum value of any of these histograms is
np.max(histo_list)
It gives me a number which I believe is correct.
If I don’t plot it and I ask numpy what the max is, or if I get the np.max()
before I plot it, it gives me a completely different (wrong) number.
My first question is therefore, what is it that makes the difference? And is there a quick, simple way of getting the maximum of the maxima of a list of histograms?