16void rf619_discrete_profiling()
24 RooRealVar c0(
"c0",
"Cheby coeff 0", -1.0, -1.0, 1.0);
37 RooRealVar mean(
"mean",
"shared mean", 25, 0, 50);
39 RooRealVar sigmaL(
"sigmaL",
"Landau width", 3.0, 1.0, 8.0);
80 frame0->GetXaxis()->SetTitle(
"Observable");
81 frame0->GetYaxis()->SetTitle(
"Events");
84 leg0->AddEntry(
frame0->getObject(0),
"Data",
"lep");
85 leg0->AddEntry(
frame0->getObject(1),
"Expo ",
"l");
86 leg0->AddEntry(
frame0->getObject(2),
"Poly",
"l");
96 frame1->GetXaxis()->SetTitle(
"Observable");
97 frame1->GetYaxis()->SetTitle(
"Events");
101 leg1->AddEntry(
frame1->getObject(0),
"Data",
"lep");
102 leg1->AddEntry(
frame1->getObject(1),
"Gauss",
"l");
103 leg1->AddEntry(
frame1->getObject(2),
"Landau",
"l");
110 for (
int i = 0; i <
data0->numEntries(); ++i) {
111 x.setVal(
data0->get(i)->getRealValue(
"x"));
115 for (
int i = 0; i <
data1->numEntries(); ++i) {
116 x.setVal(
data1->get(i)->getRealValue(
"x"));
125 minim.setStrategy(1);
127 minim.setPrintLevel(-1);
136 for (
int i = 0; i <
pdfIndex0.size(); ++i) {
143 TCanvas *
c =
new TCanvas(
"c_rf619",
"NLL vs Mean for Different Discrete Combinations", 1200, 400);
148 int markers[] = {20, 21, 22, 23, 33};
151 std::vector<TGraph *> graphs;
156 for (
size_t idx = 0; idx <
combosToPlot.size(); ++idx) {
158 g->SetLineColor(
colors[idx % 5]);
159 g->SetMarkerColor(
colors[idx % 5]);
160 g->SetMarkerStyle(
markers[idx % 5]);
194 mean.setConstant(
true);
198 minim.minimize(
"Minuit2",
"Migrad");
207 mean.setConstant(
false);
211 mean.setConstant(
true);
214 minim.minimize(
"Minuit2",
"Migrad");
222 gPad->SetLeftMargin(0.15);
223 frame0->GetYaxis()->SetTitleOffset(1.4);
230 gPad->SetLeftMargin(0.15);
231 frame1->GetYaxis()->SetTitleOffset(1.4);
237 gPad->SetLeftMargin(0.15);
240 for (
auto &
g : graphs) {
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void data
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
Efficient implementation of a sum of PDFs of the form.
RooArgList is a container object that can hold multiple RooAbsArg objects.
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Object to represent discrete states.
Chebychev polynomial p.d.f.
Container class to hold unbinned data.
Landau distribution p.d.f.
Wrapper class around ROOT::Math::Minimizer that provides a seamless interface between the minimizer f...
The class RooMultiPdf allows for the creation of a RooMultiPdf object, which can switch between previ...
Plot frame and a container for graphics objects within that frame.
Variable that can be changed from the outside.
Facilitates simultaneous fitting of multiple PDFs to subsets of a given dataset.
virtual void SetTitleOffset(Float_t offset=1)
Set distance between the axis and the axis title.
A TGraph is an object made of two arrays X and Y with npoints each.
This class displays a legend box (TPaveText) containing several legend entries.
A TMultiGraph is a collection of TGraph (or derived) objects.
virtual void Add(TGraph *graph, Option_t *chopt="")
Add a new graph to the list of graphs.
void Draw(Option_t *chopt="") override
Draw this multigraph with its current attributes.
TAxis * GetYaxis()
Get y axis of the graph.
TAxis * GetXaxis()
Get x axis of the graph.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
RooCmdArg LineColor(TColorNumber color)
The namespace RooFit contains mostly switches that change the behaviour of functions of PDFs (or othe...