Dear ROOTers,
Assume a histogram from 0 to 1023 with 1024 bins. Each number from 0 to 1023 has a specific value. Now, consider I draw a graph with the same amounts, with the exception that values for X axis changes to X+0.5 (since histograms only care the center of bins in fits). Now when I fit a line to graph and histogram I get different results:
“first” is a HISTOGRAM.
command: first->Fit(“pol1”,"","",TenPercent_first,SixtyPercent_first);
result:
Minimizer is Linear
Chi2 = 0.0130941
NDf = 11
p0 = -0.410958 +/- 1.7957
p1 = 0.0028866 +/- 0.0118169
“gr” is a GRAPH.
command: gr->Fit(“pol1”,"","",TenPercent_first,SixtyPercent_first);
result:
Minimizer is Linear
Chi2 = 0.000339396
NDf = 11
p0 = -0.344322 +/- 0.0632206
p1 = 0.00245905 +/- 0.000411738
Albeit these two fits do not differ significantly but they do at the end of some complex calculations. Can you tell me why these two fits are different?
Thanks