I’m trying to fill a histogram with data from a tree, which has 40 bins and x values from -200 to 200. The bin content at x=10 is the last bin content added to the content which is supposed to be at that bin. The way I am filling the histogram is as follows(t is the tree with branches zPosition and efficiency and hist is the histogram).
for x in xrange(40):
Is there something wrong with how I’m filling the histogram, or a more proper way to do it?