TF1 parameters

Hi, I need some help on retrieving a value from a fit performed. The value I want is where a straight line crosses the x-axis.

The fit to the attached histogram was found with the following function which is a convolution of a straight line and a gaussian:

Double_t function(Double_t x, Double_t par)
{
Double_t gConst = par[0]sqrt((par[1]**2)/(2TMath::pi()));
Double_t gauss = exp(-0.5
((x[0]-par[2])**2)/(par[1]**2));
Double_t eConst = 0.5
par[3](x[0]-par[2]);
Double_t erf = 1- (TMath::Erf((x[0]-par[2])/(sqrt(2
par[1]**2))));

Double_t fit = (gConst * gauss) - (eConst* erf);
return fit;
}

void prettyTemp3()
{
TFile *f =new TFile (“fullAODHisto.root”);
TCanvas * canvas1 = new TCanvas(“min1”);
TF1 *fitting = new TF1 (“function”,function,0,100,4);
fitting->SetRange(300,850);
fitting->SetParNames(“gradient1”,“sigma”,“mean”,“gradient2”);
fitting->SetParameters(1.0,minima1->GetRMS(),minima1->GetMean(),-2.0);

minima1->Fit(“function”,“R”);
canvas1->SaveAs (“min1.ps”);
}

I get the print out:

FCN=42.0818 FROM MIGRAD STATUS=CONVERGED 198 CALLS 199 TOTAL
EDM=4.84596e-10 STRATEGY= 1 ERROR MATRIX UNCERTAINTY 2.4 per cent
EXT PARAMETER STEP FIRST
NO. NAME VALUE ERROR SIZE DERIVATIVE
1 gradient1 9.25886e+00 3.17850e-01 -2.44253e-04 1.30779e-04
2 sigma 1.02028e+02 2.17455e+00 8.67626e-04 3.82347e-05
3 mean 4.97528e+02 3.30523e+00 6.48408e-04 1.57537e-05
4 gradient2 -3.97329e-02 7.33060e-02 2.42743e-06 -3.52323e-04
Info in TCanvas::Print: ps file min1.ps has been created

What I need to know is where the right side of the gaussian if it were a straight line would cross the x-axis which i have drawn on using the red line. So the variable I want to retrieve from the fit is 720 in this case.

I do not know how to do this with the parameters given. I thought if I could get the gradient of that side of the fit (which i thought was par[3]) I could calculate where the x axis is crossed, but the value for par[3]= 0.0397 which is not the gradient and its error is huge.

any ideas how i can retrieve this value of 720 systematically or have I made an error somewhere??
Thanks.
minima1.ps (12.7 KB)

Hello,

I have not fully understood how you derived your fitting function.
I guess you expect a true distribution which is a straight line between x1 and x2 and zero outside that range.
Then you have to perform a convolution only between a
values x1 and x2 where you expect to have a straight line pdf.
Make x1 and x2 parameters of your fit, your straight line will be something like:

f(x) = a * ( (x2-x1) - x)

and you make the convolution with a gaussian with mu = 0 and a sigma
which will be also determined from the fit.

The value of x2 will be the value you are interested.
However, remember that the gaussian smearing which shift the x2 value to the right. If you draw a line like in your plot you send you get an intercept which will be larger than the one obtained without gaussian smearing

Best Regards

Lorenzo