Hi @RAJESH_KUMAR_MAITI, sorry for the very late reply!
There is no way to get the numerical values of the pull distribution fit parameters when you use RooMCStudy::plotPull. But you can copy-paste the relevant code from said function where the Gaussian fit is done, and write your own function that returns the pull distribution fit results. It could look like this:
std::pair<double,double> fitMCStudyPulls(
RooMCStudy& mcStudy, RooAbsReal const& param) {
using namespace RooFit;
auto& fitParData = const_cast<RooDataSet&>(mcStudy.fitParDataSet());
auto pullName = std::string(param.GetName()) + "pull";
auto pullTitle = std::string(param.GetTitle()) + " Pull";
RooRealVar pvar(pullName.c_str(), pullTitle.c_str(), -100, 100) ;
pvar.setBins(100) ;
RooRealVar pullMean("pullMean","Mean of pull",0,-10,10) ;
RooRealVar pullSigma("pullSigma","Width of pull",1,0.1,5) ;
RooGenericPdf pullGauss("pullGauss","Gaussian of pull",
"exp(-0.5*(@0-@1)*(@0-@1)/(@2*@2))",
RooArgSet(pvar,pullMean,pullSigma)) ;
pullGauss.fitTo(fitParData, Minos(0), PrintLevel(-1)) ;
return {pullMean.getVal(), pullSigma.getVal()};
// Or have some sort of output structure where you can
// also return the uncertainty if you want. You can get them like
// pullMean.getError(), pullSigma.getError()
};
You would use it like this:
auto pullFitParams = fitMCStudyPulls(*mcstudy, mean);
std::cout << "Pull mean: " << pullFitParams.first << std::endl;
std::cout << "Pull sigma: " << pullFitParams.second << std::endl;
Instead of printing the results, you can dump them into a text file or whatever you like.
I hope this helps! Please let me know if something is unclear or if you have any further questions.
Cheers,
Jonas