Special pdf's: using a product of an (acceptance) efficiency and a pdf as pdf
{
RooEffProd modelEff(
"modelEff",
"model with efficiency", model, eff);
eff.plotOn(frame1, LineColor(
kRed));
RooPlot *frame2 = t.
frame(Title(
"Pdf with and without efficiency"));
model.plotOn(frame2, LineStyle(
kDashed));
modelEff.plotOn(frame2);
std::unique_ptr<RooDataSet>
data{modelEff.generate(t, 10000)};
modelEff.fitTo(*
data, PrintLevel(-1));
RooPlot *frame3 = t.
frame(Title(
"Fitted pdf with efficiency"));
modelEff.plotOn(frame3);
TCanvas *
c =
new TCanvas(
"rf703_effpdfprod",
"rf703_effpdfprod", 1200, 400);
gPad->SetLeftMargin(0.15);
gPad->SetLeftMargin(0.15);
gPad->SetLeftMargin(0.15);
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
The class RooEffProd implements the product of a PDF with an efficiency function.
Plot frame and a container for graphics objects within that frame.
static RooPlot * frame(const RooAbsRealLValue &var, double xmin, double xmax, Int_t nBins)
Create a new frame for a given variable in x.
void Draw(Option_t *options=nullptr) override
Draw this plot and all of the elements it contains.
Variable that can be changed from the outside.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
[#1] INFO:NumericIntegration -- RooRealIntegral::init(modelEff_Int[t]) using numeric integrator RooIntegrator1D to calculate Int(t)
[#1] INFO:Fitting -- RooAbsPdf::fitTo(modelEff_over_modelEff_Int[t]) fixing normalization set for coefficient determination to observables in data
[#1] INFO:Fitting -- using CPU computation library compiled with -mavx2
[#1] INFO:Fitting -- RooAddition::defaultErrorLevel(nll_modelEff_over_modelEff_Int[t]_modelEffData) Summation contains a RooNLLVar, using its error level
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: activating const optimization
[#1] INFO:NumericIntegration -- RooRealIntegral::init(modelEff_Int[t]) using numeric integrator RooIntegrator1D to calculate Int(t)
[#1] INFO:Minimization -- RooAbsMinimizerFcn::setOptimizeConst: deactivating const optimization
[#1] INFO:NumericIntegration -- RooRealIntegral::init(modelEff_Int[t]) using numeric integrator RooIntegrator1D to calculate Int(t)
- Date
- July 2008
- Author
- Wouter Verkerke
Definition in file rf703_effpdfprod.C.