I am trying to calculate integral of a pdf funtion in a given range. I have saved the function in a RooWorkspace and I am able to load the pdf and the variable as below -
RooWorkspace w = (RooWorkspace )SR->Get(“pol2”);
RooAbsPdf pol2SR = w->pdf(“pol2”);
RooRealVar normSR = w->var(“norm”);
RooRealVar* massSR = w->var(“mass”);
massSR.setRange(“bin1”,14., 15. );
auto shape = pol2SR->createIntegral(massSR, RooFit::NormSet(massSR), RooFit::Range(“bin1”));
However, since massSR is not of the form RooArgSet& as required by NormSet, it is not working. Is there a way to fix this issue ?