How to perform least square and modified least square fit using ROOT?

Hi experts,
Here is the definition of Least square and modified least square.
How to perform them respectively, or if there is some options could be used to realise them?
Thank you.

Search for “Neyman”, “Pearson”, and “Baker” (or “Cousins”) chi-square in the TH1 Class Reference (and/or elsewhere).

See also: