]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Make sure that the histogram has at least 3 bins with entries in the fit region
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 May 2009 14:19:09 +0000 (14:19 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 12 May 2009 14:19:09 +0000 (14:19 +0000)
HMPID/AliHMPIDQAChecker.cxx

index 3992b3e030dcfd6be54fefa18fe1d5825d4beec3..dbfdea7d08b500e88f320d74dd6b2187c4e680c5 100644 (file)
@@ -143,7 +143,13 @@ Double_t AliHMPIDQAChecker::CheckRecPoints(TObjArray *listrec, TObjArray *listre
    TIter next(listrec) ;
    TH1* histo;
    while ( (histo = dynamic_cast<TH1 *>(next())) ) {
-   if( histo->GetEntries() < 3 ) counter++;
+     //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);
+       if (histo->GetBinContent(ibin)>0) nbinsabove++;
+     }
+
+   if( nbinsabove < 3 ) counter++;
    else {
     TString h = histo->GetTitle();
     if(h.Contains("Zoom")){