Hi, I have arrays of histogram define like TH1F *Dca[8]; Dca[0] = new TH1F("Dca_0"," ",24000,-1.2,1.2); Dca[1] = new TH1F("Dca_1"," ",24000,-1.2,1.2); ...... ....... In my code when i am filling these histograms i am facing no problem, but when i am trying to fit these histograms like for(Int_t i=0; i<8; i++) { gausfit(Dca[i],sigma,errsigma,chisq,ndf); Sigdca [i] = sigma ; Errsigdca[i] = errsigma ; Chisq_1a[i] = chisq; Ndf_1a[i] = ndf ; } where gausfit is defined like void gausfit( TH1F *histname,Double_t &sigma, Double_t &errsigma, Double_t &chisq, Double_t &ndf) I am getting following error message -------------------------------------------------------- FCN=19.9171 FROM MIGRAD STATUS=CONVERGED 248 CALLS 249 TOTAL EDM=2.10802e-09 STRATEGY= 1 ERROR MATRIX ACCURATE EXT PARAMETER STEP FIRST NO. NAME VALUE ERROR SIZE DERIVATIVE 1 Constant 1.06828e+00 6.35883e-02 1.35696e-04 8.02646e-04 2 Mean 4.51991e-02 9.17302e-01 1.96188e-03 -5.30292e-05 3 Sigma 1.55634e+00 1.40853e+00 9.03530e-03** at limit ** <TCanvas::MakeDefCanvas>: created default TCanvas with name c1 *** Break *** segmentation violation Root > Function gausfit() busy flag cleared Function Loop() busy flag cleared ----------------------------------------------------------------- This fit function works fine if I use different historgams (not arrays of historgams) Please let me know what should be the correct way of doing this. Thanks Avdhesh
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:22 MET