I find the reason:
The fit variable of some events are nan, which lead to errors. After removing such events, everything get fine.
Similar situation: Extended fit with RooHistPdf results in ‘function value is NAN’ - Newbie - ROOT Forum (cern.ch)
I find the reason:
The fit variable of some events are nan, which lead to errors. After removing such events, everything get fine.
Similar situation: Extended fit with RooHistPdf results in ‘function value is NAN’ - Newbie - ROOT Forum (cern.ch)