Graph Fitting

Hi,

I have fitted the histogram data by user defined function and it calculates chi square.
However, the graph does not fit the data. So it is not realistic.
I attached running code.

The command under the root are

.L bw_fit_simple01_sent.C+
ppbarpt();
flowfit( 0, 13.0, “bw_fit_simple01_sent.root”);

The fitting ling does not fit the data obviously even though it calculates chi square nicely.

Thank you!
bw_fit_simple01_sent.C (9.99 KB)

Please provide the shortest possible RUNNING script that we can execute.

Rene

This is the short code for the fitting!
Would you check it for me?
Thank you!
bw_fit_simple02_sent.C (10.5 KB)

You already sent this example in a private email to Lorenzo and I. Lorenzo found the problem and will answer you shortly.

Please, try to avoid multiple posts/emails with the same question to different places

Thank you for your reply and I received the message from him.
Thank you again!