31void rf709_BarlowBeeston()
37 RooRealVar meanG(
"meanG",
"meanG", 1, -10, 10);
44 std::unique_ptr<RooDataSet> sigData(
g.generate(
x, 50));
45 std::unique_ptr<RooDataSet> bkgData(u.generate(
x, 1000));
47 RooDataSet sumData(
"sumData",
"Gauss + Uniform",
x);
48 sumData.append(*sigData);
49 sumData.append(*bkgData);
56 std::unique_ptr<RooDataHist> dh_sig(
g.generateBinned(
x, 50) );
57 std::unique_ptr<RooDataHist> dh_bkg( u.generateBinned(
x, 10000) );
114 RooParamHistFunc p_ph_bkg2(
"p_ph_bkg2",
"p_ph_bkg2", *dh_bkg, p_ph_sig2,
true);
149 auto frame =
x.frame(
Title(
"No template uncertainties"));
151 sumData.plotOn(frame);
154 sumData.plotOn(frame);
159 model0.paramOn(frame);
165 "No template uncertainties",
166 "are taken into account.",
167 "This leads to low errors",
168 "for the parameters A, since",
169 "the only source of errors",
170 "are the data statistics."}) {
177 frame =
x.frame(
Title(
"Barlow Beeston for Sig & Bkg separately"));
178 sumData.plotOn(frame);
181 sumData.plotOn(frame);
192 "With gamma parameters, the",
193 "signal & background templates",
194 "can adapt to the data.",
195 "Note how the blue signal",
196 "template changes its shape.",
197 "This leads to higher errors",
198 "of the scale parameters A."}) {
204 frame =
x.frame(
Title(
"Barlow Beeston light for (Sig+Bkg)"));
205 sumData.plotOn(frame);
208 sumData.plotOn(frame);
219 "When signal and background",
220 "template share one gamma para-",
221 "meter per bin, they adapt less.",
222 "The errors of the A parameters",
223 "also shrink slightly."}) {
229 std::cout <<
"Asig [normal ] = " << Asig0.getVal() <<
" +/- " << Asig0.getError() << std::endl;
230 std::cout <<
"Asig [BB ] = " << Asig1.getVal() <<
" +/- " << Asig1.getError() << std::endl;
231 std::cout <<
"Asig [BBlight] = " << Asig2.getVal() <<
" +/- " << Asig2.getError() << std::endl;
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
RooDataSet is a container class to hold unbinned data.
The RooHistConstraint implements constraint terms for a binned PDF with statistical uncertainties.
RooHistFunc implements a real-valued function sampled from a multidimensional histogram.
A histogram function that assigns scale parameters to every bin.
RooProdPdf is an efficient implementation of a product of PDFs of the form.
The class RooRealSumPdf implements a PDF constructed from a sum of functions:
RooRealVar represents a variable that can be changed from the outside.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad...
virtual void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0)
Automatic pad generation by division.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void Clear(Option_t *option="")
Clear all lines in this pavetext.
virtual void SetBorderSize(Int_t bordersize=4)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...
RooCmdArg VisualizeError(const RooDataSet ¶mData, Double_t Z=1)
RooCmdArg MarkerColor(Color_t color)
RooCmdArg Parameters(const RooArgSet ¶ms)
RooCmdArg Components(const RooArgSet &compSet)
RooCmdArg Save(Bool_t flag=kTRUE)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg LineColor(Color_t color)
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, Bool_t depsAreCond=kFALSE)