I have a TH2F filled with x,y data that underwent an elliptical cut in x,y space – so there is an elliptical region in the TH2F filled with data, and the rest of the rectangular area is just unfilled. How can I fit the non-zero data ONLY to a TF2. In my case, I don’t want the zeros in the rectangular TH2F outside of the elliptical region contributing to the fit.
It would be great if I could do something like
my2DHisto->Fit(fitFunc2D,"[cutG]")
but supressing contributions from the bins with no entries is fine too. I realize that if need be, I can make my own function that calculates and returns the chisqr using only the non-zero entries… but that sounds like a pain!
Thanks!