To do the Goodness-of-fit test of un-binned maximum likelihood fit with Chi2 method, the data need to be binned and there should be not too small entries in each bin. Here an adaptive binning is needed. As it is mentioned in www.slac.stanford.edu/BFROOT/www/Organization/Workshops/2005/bbr_analtools/Sat01/martinez.pdf
but it is a Fortran package there. Could you please implement one in RooFit? Thanks a lot.