I currently have two histograms, both TH1F, 75 bins, one experimental data, the other data from a Geant4 simulation. The histograms represent frequency of photoelectrons detected in a photomultiplier tube; counts vs number of photoelectrons.
I am curious to learn of any built in ROOT methods that will allow me to compare these two datasets, and determine if the simulation is a decent model of the experiment. All and any suggestions are greatly appreciated.
Thank you in advance!
-Frank
ROOT Version: 6.22/06 Platform: MacOS Big Sur Compiler: gcc
Thanks so much! With regards to the chi-squared test, would you happen to know or have any suggestion as to how to determine the degrees of freedom for my data?
From my understanding, given that I have 75 bins, each representing a number of photoelectrons, that the degrees of freedom would be: 75-1 = 74. Is this wildly off?
You can use the "P" TH1::Chi2Test option to print “NDF”.
I guess: “NDF” = “number of histogram bins” - 1 - “number of bins which are 0 in both histograms simultaneously”.