I have variables like
RooRealVar Xmass(“Xmass”, “Xmass”, 3.09, 4.25) ;
RooRealVar x1(“x1”,“x1”, 1.9, 99.);
RooRealVar x2(“x2”,“x2”, 1.9, 99.);
RooRealVar x3(“x3”,“x3”, 1.9, 99.);
and I read the values from txt file
RooDataSet * dataSet= (RooDataSet::read(FileName,RooArgSet(Xmass, x1, x2, x3), “Q”));
and apply roofit on Xmass such like
mytotalPdf.fitTo(*dataSet,“mer”);
RooPlot *frame = Xmass.frame(60);
mytotalPdf.plotOn(frame);
then I select the signal range within 1.5 sigma for both signal and background.
double myXsigma = Bp_width.getVal();
Xmass.setRange(“selection”,3.59-1.5myXsigma, 3.59+1.5myXsigma);
RooAbsReal* pdfBpsignalreg=pdfBp->createIntegral(RooArgSet(Xmass),“selection”);
RooAbsReal* BkgPolPdfreg=BkgPolPdf->createIntegral(RooArgSet(Xmass),“selection”);
Now, what I want to do is, filling variables(x1, x2, x3) into a histogram if myXsigma is within selected range. Long story short, I need the distribution of variables within 1.5 sigma of my signal region. Any help would be appreciated.