Hi all,
I have got a problem with minimization using ROOT. I get slightly diffrenet results from ROOT 4 and ROOT 5.
I wrote a script in which I define a histogram
hf = new TH1F("hf", "Photoelectrons Spectrum", 200, 0., 1000.);
I fill it
hf->Fill(data[ev_count]);
and then fit it with a function called "Linear"
TF1 *f1 = new TF1("f1", Linear, 0., 1000., 2);
f1->SetParameter(0, 1.); f1->SetParName(0, "Rho"); f1->SetParameter(1, 1.); f1->SetParName(1, "L.Y. (p.e./keV)"); c1->cd(1); hf->Fit("f1", "L", "", threshold, 1000.); hf->Draw("e");
and "Linear" is
Double_t Linear(Double_t *x, Double_t *par) {
Double_t arg = 0;
if (par[1] != 0) arg = x[0]/par[1];
Double_t fitval = par[0]*dNdE(x[0]/par[1])/par[1];
return fitval;
}
If I run it on ROOT 4 I get
FCN=134.135 FROM MIGRAD STATUS=CONVERGED 65 CALLS 66 TOTAL
EDM=2.13358e-10 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Rho 1.78512e+00 6.83244e-02 4.69665e-04 -2.69615e-042 L.Y. (p.e./keV) 1.12079e+00 4.27042e-02 2.93564e-04 6.41165e-05
while if i run ROOT 5 I get
FCN=493.398 FROM MIGRAD STATUS=CONVERGED 53 CALLS 54 TOTAL EDM=5.30182e-08 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Rho 1.72045e+00 6.75899e-02 4.36268e-04 4.58320e-032 L.Y. (p.e./keV) 1.19107e+00 5.01150e-02 3.24074e-04 1.03245e-02
The results are different as the FCN values. Any suggestion? Received on Thu Sep 14 2006 - 15:11:15 MEST
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET