TH1F::Chi2Test

Hi,
I have sets of simulated and real data, and want to compare the simulation to the data. When the variables are plotted in 1D hists for both data sets there are a number of bins with no entries. Because of this, hist1->Chi2Test(hist2) fails. Is there a way around this?

I’d also like to normalise the histograms by the total data entries for each case (sim and real) - giving TH1Fs with each bin content being in the range 0->1. Again, here the TH1F->Chi2Test fails. Is there a solution to this!?

Thanks
Matt

If you want to take into account bin with no contents, set a bin error to these bins.

Concerning your second question use TH1::Scale

Rene