A little task for checking the c*tau of the strange particles
[u/mrichter/AliRoot.git] / ACORDE / AliACORDEQAChecker.cxx
index 36b3cfb..e590936 100755 (executable)
@@ -51,7 +51,7 @@ Double_t * AliACORDEQAChecker::Check(AliQAv1::ALITASK_t /*index*/)
   return rv ;  
 }
 //____________________________________________________________________________
-Double_t * AliACORDEQAChecker::Check(AliQAv1::ALITASK_t /*index*/, TObjArray ** list, AliDetectorRecoParam * /*recoParam*/)
+Double_t * AliACORDEQAChecker::Check(AliQAv1::ALITASK_t /*index*/, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/)
 {
 
 // Close version to the final one for the ACORDE QA Checker
@@ -91,9 +91,12 @@ Double_t * AliACORDEQAChecker::Check(AliQAv1::ALITASK_t /*index*/, TObjArray **
                                {
                                        Float_t acoDataMax = hdata->GetMaximum();
                                        Int_t flagAcoQA = 0;
-                                       for(Int_t i=0;i<60;i++)
+                                       if (acoDataMax!=0)
                                        {
-                                               if ((hdata->GetBinContent(i)/acoDataMax) < 0.75) flagAcoQA++; 
+                                               for(Int_t i=0;i<60;i++)
+                                               {
+                                                       if ((hdata->GetBinContent(i)/acoDataMax) < 0.75) flagAcoQA++; 
+                                               }
                                        }
                                        Double_t simpleFlag = 1.-flagAcoQA/60.;
                                        if ( (simpleFlag >= 0.90) && (simpleFlag <= 1.0) ) acoTest[specie] = 0.75; // INFO
@@ -122,12 +125,11 @@ Double_t AliACORDEQAChecker::CheckAcordeRefHits(const TH1 * href, const TH1 * hd
        Int_t flag=0;
        for (Int_t i=0;i<60;i++)
        {
-               if (TMath::Abs(href->GetBinContent(i)-hdata->GetBinContent(i))) flag++;
-               flag++;
+               if (TMath::Abs(href->GetBinContent(i)-hdata->GetBinContent(i))>10) flag++;
        }
-       if ((flag/60>50)&&(flag/60<=60)) acoTest = -1.;
-       if ((flag/60>30)&&(flag/60<=50)) acoTest = 0.25;
-       if ((flag/60>10)&&(flag/60<=30)) acoTest = 0.5;
-       if ((flag/60>0)&&(flag/60<=10)) acoTest = 0.75;
+       if ((flag>50)&&(flag<=60)) acoTest = -1.;
+       if ((flag>30)&&(flag<=50)) acoTest = 0.25;
+       if ((flag>10)&&(flag<=30)) acoTest = 0.5;
+       if ((flag>0)&&(flag<=10)) acoTest = 0.75;
        return acoTest;
 }