constrain fit to prevent crashes
authormkrzewic <mkrzewic@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Jun 2013 09:37:52 +0000 (09:37 +0000)
committermkrzewic <mkrzewic@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 20 Jun 2013 09:37:52 +0000 (09:37 +0000)
PWGPP/TPC/AliTreeDraw.cxx

index 3630be6..2430cf7 100644 (file)
@@ -481,6 +481,7 @@ TH1F* AliTreeDraw::CreateResHistoII(TH2F* hRes2, TH1F **phMean, Int_t integ,  Bo
  
   // create the fit function
   TF1 * fitFunc = new TF1("G","[0]*exp(-(x-[1])*(x-[1])/(2.*[2]*[2]))",-3,3);
+  fitFunc->SetParLimits(2,0.0001,100.);
   
   fitFunc->SetLineWidth(2);
   fitFunc->SetFillStyle(0);