40 RooRealVar mean(
"mean",
"mean of gaussian", 0, -2., 1.8);
65 hist_chi2->
SetTitle(
"#chi^{2} values of all toy runs;#chi^{2}");
67 hist_prob->
SetTitle(
"Corresponding #chi^{2} probability;Prob(#chi^{2},ndof)");
74 RooRealVar mean2(
"mean2",
"mean of gaussian 2", 2.);
96 auto pullMeanFrame = mcs2->
plotPull(mean);
107 leg.AddEntry(hist2_chi2,
"Biased fit",
"L");
108 leg.SetBorderSize(0);
111 TCanvas *
c =
new TCanvas(
"rf802_mcstudy_addons",
"rf802_mcstudy_addons", 800, 400);
114 gPad->SetLeftMargin(0.15);
117 hist2_chi2->
Draw(
"esame");
120 gPad->SetLeftMargin(0.15);
123 hist2_prob->
Draw(
"esame");
125 pullMeanFrame->Draw();
TH1 * createHistogram(const char *name, const RooAbsRealLValue &xvar, const RooCmdArg &arg1={}, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={}) const
Calls createHistogram(const char *name, const RooAbsRealLValue& xvar, const RooLinkedList& argList) c...
RooChi2MCSModule is an add-on module to RooMCStudy that calculates the chi-squared of fitted p....
Helper class to facilitate Monte Carlo studies such as 'goodness-of-fit' studies, that involve fittin...
const RooDataSet & fitParDataSet()
Return a RooDataSet containing the post-fit parameters of each toy cycle.
bool generateAndFit(Int_t nSamples, Int_t nEvtPerSample=0, bool keepGenData=false, const char *asciiFilePat=nullptr)
Generate and fit 'nSamples' samples of 'nEvtPerSample' events.
RooPlot * plotPull(const RooRealVar ¶m, const RooCmdArg &arg1, const RooCmdArg &arg2={}, const RooCmdArg &arg3={}, const RooCmdArg &arg4={}, const RooCmdArg &arg5={}, const RooCmdArg &arg6={}, const RooCmdArg &arg7={}, const RooCmdArg &arg8={})
Plot the distribution of pull values for the specified parameter on a newly created frame.
void addModule(RooAbsMCStudyModule &module)
Insert given RooMCStudy add-on module to the processing chain of this MCStudy object.
Variable that can be changed from the outside.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
TH1 is the base class of all histogram classes in ROOT.
void SetTitle(const char *title) override
Change/set the title.
void Draw(Option_t *option="") override
Draw this histogram with options.
This class displays a legend box (TPaveText) containing several legend entries.
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
RooCmdArg FitModel(RooAbsPdf &pdf)
RooCmdArg AutoBinning(Int_t nbins=100, double marginFactor=0.1)
RooCmdArg Silence(bool flag=true)
RooCmdArg Binned(bool flag=true)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...