From 326d0a7854dc0e602f423861f2016d48a7c44844 Mon Sep 17 00:00:00 2001 From: hristov Date: Thu, 14 May 2009 12:06:54 +0000 Subject: [PATCH] Updated fix for bug #50143: corrected calcualtion of the number of bins with entries in the fit region. Loglikelihood fit since the number of entries is small --- HMPID/AliHMPIDQAChecker.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HMPID/AliHMPIDQAChecker.cxx b/HMPID/AliHMPIDQAChecker.cxx index dbfdea7d08b..33a3f3c1c8d 100644 --- a/HMPID/AliHMPIDQAChecker.cxx +++ b/HMPID/AliHMPIDQAChecker.cxx @@ -145,7 +145,7 @@ Double_t AliHMPIDQAChecker::CheckRecPoints(TObjArray *listrec, TObjArray *listre while ( (histo = dynamic_cast(next())) ) { //PH The histogram should have at least 3 bins with entries Int_t nbinsabove = 0; - for (Int_t ibin=1; ibin<=50; ibin++) { //1,50 is the fit region, see histo->Fit("expo","Q0","",1,50); + for (Int_t ibin=histo->FindBin(1); ibin<=histo->FindBin(50); ibin++) { //1,50 is the fit region, see histo->Fit("expo","Q0","",1,50); if (histo->GetBinContent(ibin)>0) nbinsabove++; } @@ -153,7 +153,7 @@ Double_t AliHMPIDQAChecker::CheckRecPoints(TObjArray *listrec, TObjArray *listre else { TString h = histo->GetTitle(); if(h.Contains("Zoom")){ - histo->Fit("expo","Q0","",1,50); + histo->Fit("expo","LQ0","",1,50); if(histo->GetFunction("expo")->GetParameter(1) !=0 ) if(TMath::Abs((-1./(histo->GetFunction("expo"))->GetParameter(1)) - 35 ) > 5) counter++; } if(h.Contains("size MIP")) if(TMath::Abs(histo->GetMean()-5) > 2) counter++; -- 2.31.1