18 auto f1 =
new TF1(
"f1",
"crystalball",-5,5);
23 auto f2 =
new TF1(
"f2",
"ROOT::Math::crystalball_function(x, 2, 1, 1, 0)",-5,5);
26 auto f3 =
new TF1(
"f3",
"ROOT::Math::crystalball_function(x, 2, 2, 1, 0)",-5,5);
37 auto pdf1 =
new TF1(
"pdf",
"crystalballn",-5,5);
38 pdf1->SetParameters(2, 0, 1, 2, 3);
40 auto pdf2 =
new TF1(
"pdf",
"ROOT::Math::crystalball_pdf(x, 3, 1.01, 1, 0)",-5,5);
41 pdf2->SetLineColor(
kBlue);
43 auto pdf3 =
new TF1(
"pdf",
"ROOT::Math::crystalball_pdf(x, 2, 2, 1, 0)",-5,5);
44 pdf3->SetLineColor(
kGreen);
54 auto cdf =
new TF1(
"cdf",
"ROOT::Math::crystalball_cdf(x, 1.2, 2, 1, 0)",-5,5);
55 auto cdfc =
new TF1(
"cdfc",
"ROOT::Math::crystalball_cdf_c(x, 1.2, 2, 1, 0)",-5,5);
virtual void SetParameters(const Double_t *params)
This class displays a legend box (TPaveText) containing several legend entries.
virtual void Draw(Option_t *option="")
Draw this legend with its current attributes.
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
virtual void Draw(Option_t *option="")
Draw this function with its current attributes.
double cdf(double *x, double *p)
virtual void SetLineColor(Color_t lcolor)
TLegendEntry * AddEntry(const TObject *obj, const char *label="", Option_t *option="lpf")
Add a new entry to this legend.
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.