19   auto f1  = 
new TF1(
"f1",
"crystalball",-5,5);
 
   24   auto f2 = 
new TF1(
"f2",
"ROOT::Math::crystalball_function(x, 2, 1, 1, 0)",-5,5);
 
   27   auto f3 = 
new TF1(
"f3",
"ROOT::Math::crystalball_function(x, 2, 2, 1, 0)",-5,5);
 
   28   f3->SetLineColor(
kBlue);
 
   32   legend->AddEntry(
f1,
"N=0.5 alpha=2",
"L");
 
   33   legend->AddEntry(f2,
"N=1   alpha=2",
"L");
 
   34   legend->AddEntry(f3,
"N=2   alpha=2",
"L");
 
   38   auto pdf1  = 
new TF1(
"pdf",
"crystalballn",-5,5);
 
   39   pdf1->SetParameters(2, 0, 1, 2, 3);
 
   41   auto pdf2 = 
new TF1(
"pdf",
"ROOT::Math::crystalball_pdf(x, 3, 1.01, 1, 0)",-5,5);
 
   42   pdf2->SetLineColor(
kBlue);
 
   44   auto pdf3 = 
new TF1(
"pdf",
"ROOT::Math::crystalball_pdf(x, 2, 2, 1, 0)",-5,5);
 
   49   legend->AddEntry(pdf1,
"N=3    alpha=2",
"L");
 
   50   legend->AddEntry(pdf2,
"N=1.01 alpha=3",
"L");
 
   55   auto cdf  = 
new TF1(
"cdf",
"ROOT::Math::crystalball_cdf(x, 1.2, 2, 1, 0)",-5,5);
 
   56   auto cdfc  = 
new TF1(
"cdfc",
"ROOT::Math::crystalball_cdf_c(x, 1.2, 2, 1, 0)",-5,5);
 
   65   legend->AddEntry(
cdf,
"N=1.2 alpha=2",
"L");
 
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
 
virtual void SetLineColor(Color_t lcolor)
Set the line color.
 
void Draw(Option_t *option="") override
Draw this function with its current attributes.
 
virtual void SetParameters(const Double_t *params)
 
This class displays a legend box (TPaveText) containing several legend entries.