36void rf709_BarlowBeeston()
42 RooRealVar meanG(
"meanG",
"meanG", 1, -10, 10);
49 std::unique_ptr<RooDataSet> sigData(
g.generate(
x, 50));
50 std::unique_ptr<RooDataSet> bkgData(u.generate(
x, 1000));
52 RooDataSet sumData(
"sumData",
"Gauss + Uniform",
x);
53 sumData.append(*sigData);
54 sumData.append(*bkgData);
61 std::unique_ptr<RooDataHist> dh_sig(
g.generateBinned(
x, 50) );
62 std::unique_ptr<RooDataHist> dh_bkg( u.generateBinned(
x, 10000) );
119 RooParamHistFunc p_ph_bkg2(
"p_ph_bkg2",
"p_ph_bkg2", *dh_bkg,
x, &p_ph_sig2,
true);
154 auto frame =
x.frame(
Title(
"No template uncertainties"));
156 sumData.plotOn(frame);
159 sumData.plotOn(frame);
164 model0.paramOn(frame);
170 "No template uncertainties",
171 "are taken into account.",
172 "This leads to low errors",
173 "for the parameters A, since",
174 "the only source of errors",
175 "are the data statistics."}) {
182 frame =
x.frame(
Title(
"Barlow Beeston for Sig & Bkg separately"));
183 sumData.plotOn(frame);
186 sumData.plotOn(frame);
197 "With gamma parameters, the",
198 "signal & background templates",
199 "can adapt to the data.",
200 "Note how the blue signal",
201 "template changes its shape.",
202 "This leads to higher errors",
203 "of the scale parameters A."}) {
209 frame =
x.frame(
Title(
"Barlow Beeston light for (Sig+Bkg)"));
210 sumData.plotOn(frame);
213 sumData.plotOn(frame);
224 "When signal and background",
225 "template share one gamma para-",
226 "meter per bin, they adapt less.",
227 "The errors of the A parameters",
228 "also shrink slightly."}) {
234 std::cout <<
"Asig [normal ] = " << Asig0.getVal() <<
" +/- " << Asig0.getError() << std::endl;
235 std::cout <<
"Asig [BB ] = " << Asig1.getVal() <<
" +/- " << Asig1.getError() << std::endl;
236 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.
Container class to hold unbinned data.
The RooHistConstraint implements constraint terms for a binned PDF with statistical uncertainties.
A real-valued function sampled from a multidimensional histogram.
A histogram function that assigns scale parameters to every bin.
Efficient implementation of a product of PDFs of the form.
Implements a PDF constructed from a sum of functions:
Variable that can be changed from the outside.
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
void Divide(Int_t nx=1, Int_t ny=1, Float_t xmargin=0.01, Float_t ymargin=0.01, Int_t color=0) override
Automatic pad generation by division.
RooCmdArg Parameters(const RooArgSet ¶ms)
RooCmdArg Title(const char *name)
RooCmdArg Conditional(const RooArgSet &pdfSet, const RooArgSet &depSet, bool depsAreCond=false)
RooCmdArg Save(bool flag=true)
RooCmdArg PrintLevel(Int_t code)
RooCmdArg Components(Args_t &&... argsOrArgSet)
RooCmdArg LineColor(TColorNumber color)
RooCmdArg VisualizeError(const RooDataSet ¶mData, double Z=1)
RooCmdArg MarkerColor(TColorNumber color)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...