I’m trying to divide two histograms, “top” by “bottom”, to produce a third histogram, “Forward-Backward Asymmetry…”. However, checking individual bins shows a discrepancy between the third histogram and what the division output should be. For example, in the images provided, dividing bin 8 in “top” by bin 8 in “bottom” should result in about 0.15, however, the value of bin 8 in “Forward…” is about 0.6. Furthermore, this only seems to be an issue when inputting particle event data, and not Monte Carlo simulations.
I have included some of my code below.
TH1F clone = (TH1F)top->Clone(“clone”);
h_lep_cos_decang_pos and h_lep_cos_decang_neg are both TH1F* objects. Am I perhaps misunderstanding the Add/Divide functions, or is there an error in the code that I am missing?