Fitting with Vavilov distribution

Hi,

I am new to root and I want to fit a distribution with Vavilov pdf. I tried to fit with
h1->Fit("TMath::Vavilov) .
but did not work. Please give me some solution. I am using the root version 5.34/19 .

–Thanks
Divyakuttan

Try: [code]// Vavilov density function
TF1 *vavilov = new TF1(“vavilov”, “TMath::Vavilov(x, [0], [1])”, -5, 15);
vavilov->SetParNames(“kappa”, “beta2”);
vavilov->SetParameters(0.1, 0.5);

// Vavilov distribution function
TF1 *vavilovi = new TF1(“vavilovi”, “TMath::VavilovI(x, [0], [1])”, -5, 15);
vavilovi->SetParNames(“kappa”, “beta2”);
vavilovi->SetParameters(0.1, 0.5);

TCanvas *c = new TCanvas(“c”, “c”);
c->Divide(1, 2);
c->cd(1);
vavilov->Draw();
c->cd(2);
vavilovi->Draw();
c->cd(0);[/code] and then:
h1->Fit(vavilov); // using function’s pointer
h1->Fit(“vavilov”); // using function’s name
or:
h1->Fit(vavilovi); // using function’s pointer
h1->Fit(“vavilovi”); // using function’s name