I have a histogram which I would like to fit and finally get its pull distribution.
I am trying to fit this histogram using RooDataHist but I am not able to do it. Looking at the output plot, it looks like I am not even able to read histogram correctly. Here’s what the output looks like:
I am not able to figure out where exactly my mistake is. For your reference, I attach here the complete code that I am using to fit.
binned_fit.tar.gz (22.0 KB)
Would you please help me.
Thanks in advance,
the problem is at the beginning of your script when you define the variable on the x-axis. You write:
RooRealVar mpipi("d0pi_kpi","", 0.45, 0.45);
The interval from 0.45 to 0.45 is empty, that’s why you got the plot with one bin only.
You need to define the same range you have in your histogram:
RooRealVar mpipi("d0pi_kpi","", 0.45, 0.55);
I hope this fixes the problem! Please let me know if you have any further questions.
Thank you so much for the message. It’s really stupid of me to post this. I should have looked more carefully.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.