Chi2Test on select region of TProfile

I would like to use the Chi2Test method of TH1, and possibly the KolgomorovTest method, to compare two TProfile plots. The problem I have is that in some regions of the plots, the associated errors are not reliable (they are too small - binomial errors of proportion issue), and so I wish to discount these from the test. Is it possible to define a region over which the test will be applied? Failing that, how can I override the Bin error to just set it to a massive value so that it doesn’t contribute to the Chi2? I tried used “SetBinError” but this doesn’t seem to have an affect on TProfiles?

Cheers,
Will

Hi,

You cannot really set different bin errors in the profile. You should transform the TProfile in a TH1D using
TProfile::ProjectionX and then you can do the chi2 test on the TH1D objects.
For selecting a range, you can use the SetRange(first,last) on TAxis.

Best Regards

Lorenzo