similar issue asked here with no reply :
1> Pulls from RooMCStudy with different generating and fitting models
2> RooMCStudy pulls fail using different generate and fit models
I am doing a toy MC study for my fitting pdf.
I am using different generator and fitting pdf.
Both generator and fitting pdf have same shape.
The only parameters different in generator and fit pdf are the yields for signal and background.
For generator pdf it is fixed and for fit pdf it is floated with some random initial value not close to the
expected value to avoid bias.
RooMCStudy *mcstudy = new RooMCStudy(mdzdel1g,RooArgSet(M_dz,deltam),FitModel(mdzdel1f),Extended(),FitOptions(Save(kTRUE),PrintEvalErrors(0)));
But when I try to get the pull for my signal yield using:
RooPlot *frame3 = mcstudy->plotPull(num_sigf,FrameRange(-5.0,5.0));
I get following error:
RooDataSet::fitParData_mdzdel1f_mdzdel1g:fillHistogram: WARNING: data does not contain variable: num_sigfpull *** Break *** segmentation violation
Does anyone know how can I get the pull distribution for my fit variable num_sigf ?
Even if can somehow access the value of this variable for every toy fit, then i can simply plot
num_sigf[i]- constant/num_sigferr[i] .