37void rf709_BarlowBeeston()
43 RooRealVar meanG(
"meanG",
"meanG", 1, -10, 10);
50 std::unique_ptr<RooDataSet> sigData(
g.generate(
x, 50));
51 std::unique_ptr<RooDataSet> bkgData(u.generate(
x, 1000));
53 RooDataSet sumData(
"sumData",
"Gauss + Uniform",
x);
54 sumData.append(*sigData);
55 sumData.append(*bkgData);
62 std::unique_ptr<RooDataHist> dh_sig(
g.generateBinned(
x, 50) );
63 std::unique_ptr<RooDataHist> dh_bkg( u.generateBinned(
x, 10000) );
120 RooParamHistFunc p_ph_bkg2(
"p_ph_bkg2",
"p_ph_bkg2", *dh_bkg, p_ph_sig2,
true);
155 auto frame =
x.frame(
Title(
"No template uncertainties"));
157 sumData.plotOn(frame);
160 sumData.plotOn(frame);
165 model0.paramOn(frame);
171 "No template uncertainties",
172 "are taken into account.",
173 "This leads to low errors",
174 "for the parameters A, since",
175 "the only source of errors",
176 "are the data statistics."}) {
183 frame =
x.frame(
Title(
"Barlow Beeston for Sig & Bkg separately"));
184 sumData.plotOn(frame);
187 sumData.plotOn(frame);
198 "With gamma parameters, the",
199 "signal & background templates",
200 "can adapt to the data.",
201 "Note how the blue signal",
202 "template changes its shape.",
203 "This leads to higher errors",
204 "of the scale parameters A."}) {
210 frame =
x.frame(
Title(
"Barlow Beeston light for (Sig+Bkg)"));
211 sumData.plotOn(frame);
214 sumData.plotOn(frame);
225 "When signal and background",
226 "template share one gamma para-",
227 "meter per bin, they adapt less.",
228 "The errors of the A parameters",
229 "also shrink slightly."}) {
235 std::cout <<
"Asig [normal ] = " << Asig0.getVal() <<
" +/- " << Asig0.getError() << std::endl;
236 std::cout <<
"Asig [BB ] = " << Asig1.getVal() <<
" +/- " << Asig1.getError() << std::endl;
237 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)
RooCmdArg Parameters(const RooArgSet ¶ms)
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, Bool_t depsAreCond=kFALSE)
RooCmdArg Save(Bool_t flag=kTRUE)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg VisualizeError(const RooDataSet ¶mData, Double_t Z=1)
RooCmdArg MarkerColor(Color_t color)
RooCmdArg Components(const RooArgSet &compSet)
RooCmdArg LineColor(Color_t color)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...