Dear Rooters,
to fit a gaussian distribution with a random noise by a gaus, as defined in TMath, the following code only generates a popup window with a graph, when the last line is uncommented.
TF1* myGaus = new TF1(“myGaus”,“gaus”,-5,5);
myH1->FillRandom(“gaus”,6000);
myH1->Fit(“myGaus”);
//myH1->Draw();
Whereas, when using a custom defined function, always a popup window with a graph appears.
TF1* myGaus = new TF1(“myGaus”,CustomDefinedGaus,-5,5,3);
myH1->FillRandom(“gaus”,6000);
myH1->Fit(“myGaus”);
In my application, I need a complicated custom defined function, however do not want a graph window to appear. How can I do this?
Many thanks in advance,
Daniel