]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0QAChecker.cxx
Warning fixed, thanks Cvetan
[u/mrichter/AliRoot.git] / T0 / AliT0QAChecker.cxx
index 761422fcf64321f47ba01eff568836674b36ba3c..a906b7fedb900a132795a7eca113d0939fcad681 100644 (file)
 ClassImp(AliT0QAChecker)
 
 //__________________________________________________________________
-Double_t * AliT0QAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list)
+void AliT0QAChecker::Check(Double_t *  test, AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam * /*recoParam*/)
 {
 
   // Super-basic check on the QA histograms on the input list:
   // look whether they are empty!
-  
-  Double_t * test = new Double_t[AliRecoParam::kNSpecies] ; 
-  
+    
   char * detOCDBDir = Form("T0/%s/%s", AliQAv1::GetRefOCDBDirName(), AliQAv1::GetRefDataDirName()) ; 
 
   AliCDBEntry *QARefRec = AliQAManager::QAManager()->Get(detOCDBDir);
@@ -164,8 +162,8 @@ Double_t * AliT0QAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list)
                          fhRecDiff[icase]->GetName(), icase, idet, mean,rms)); 
                  
             if(TMath::Abs(mean) >1.5 || rms >1){
-              AliDebug(AliQAv1::GetQADebugLevel(), Form(" calibration is nor perfect; test=%f", test)) ;
               test[specie]=0.25;
+              AliDebug(AliQAv1::GetQADebugLevel(), Form(" calibration is nor perfect; test=%f", test[specie])) ;
             }
             if(mean>3 || rms >5) {
               test[specie] = 0.1;
@@ -180,7 +178,7 @@ Double_t * AliT0QAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list)
           Double_t rmsVertex = fhESD[icase]->GetRMS();
           Double_t meanVertex = fhESD[icase]->GetMean();
           test[specie]=1;
-          AliDebug(AliQAv1::GetQADebugLevel(), Form("numentries %d meanVertex %f rmsVertex %f", fhESD[icase]->GetEntries(), meanVertex, rmsVertex));
+          AliDebug(AliQAv1::GetQADebugLevel(), Form("numentries %f meanVertex %f rmsVertex %f", fhESD[icase]->GetEntries(), meanVertex, rmsVertex));
           if (TMath::Abs(rmsVertex)>3) {
             test[specie]=0.25;
             AliDebug(AliQAv1::GetQADebugLevel(), Form("Vertex position resolution not good  , rms= %f test=%f",
@@ -196,27 +194,25 @@ Double_t * AliT0QAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list)
     } //  if (list->GetEntries() != 0
     AliDebug(AliQAv1::GetQADebugLevel(), Form("Test Result = %f", test[specie])) ;
   } 
-  
-  return test ;
 }
 
 //--------------------------------------------------------------------------
 Double_t AliT0QAChecker::CheckRaw(TObjArray *listrec , TObjArray *listref) const
 {
   
-  TH1 *fhRawEff;
-  TH1 *fhRawRef;
+    //TH1 *fhRawEff;
+    //TH1 *fhRawRef;
   TH2 *fhRawRec2d;
   TH2 *fhTime;
 
   TIter next(listref) ;
-  Int_t counter=0;
+    //Int_t counter=0;
   Float_t refmean[50][25]; 
   Float_t refrms[50][25]; 
   Float_t checkr = 0;
   
-  Int_t nref = listref->GetEntries(); 
-  Int_t nrec = listrec->GetEntries(); 
+    //Int_t nref = listref->GetEntries(); 
+    //Int_t nrec = listrec->GetEntries(); 
   
   for (Int_t iii=4; iii<6; iii++){
     fhRawRec2d =(TH2*) listref->At(iii); 
@@ -240,12 +236,11 @@ Double_t AliT0QAChecker::CheckRaw(TObjArray *listrec , TObjArray *listref) const
     fhTime = (TH2*) listrec->At(icase);
     for (Int_t idet=1; idet<25; idet++) {
       Double_t binmean = fhTime->
-       ProjectionY(Form("%s_py_%i_%i",                                                              fhTime ->GetName(), idet,icase),
+      ProjectionY(Form("%s_py_%i_%i",                                                              fhTime ->GetName(), idet,icase),
                    idet,idet+1)->GetMean();
-      Double_t rms= fhTime ->
-       ProjectionY(Form("%s_py%i_%i", 
-                        fhTime ->GetName(), idet,icase),
-                   idet,idet+1)->GetRMS();
+//        Double_t rms= fhTime ->ProjectionY(Form("%s_py%i_%i", 
+//                                              fhTime ->GetName(), idet,icase),
+//                                         idet,idet+1)->GetRMS();
       Double_t diffmean = binmean-refmean[icase-208][idet];
       
       if (TMath::Abs(diffmean) < 2 ) {
@@ -258,13 +253,13 @@ Double_t AliT0QAChecker::CheckRaw(TObjArray *listrec , TObjArray *listref) const
        checkr = 0.5;
        // printf(" Laser calibration signal shifted by  %f ps for PMT %s %i : check = %f\n",  diffmean*24.4, nameDev[icase-208].Data(),idet, checkr);
        AliDebug(AliQAv1::GetQADebugLevel(),
-               Form(" Laser calibration signal shifted by  %f ps (%f channels) for PMT %s %i : check = %f\n",  diffmean*24.4 ,diffmean , nameDev[icase-208],idet, checkr)) ; 
+               Form(" Laser calibration signal shifted by  %f ps (%f channels) for PMT %s %i : check = %f\n",  diffmean*24.4 ,diffmean , nameDev[icase-208].Data(),idet, checkr)) ; 
       }
      if (TMath::Abs(diffmean) > 5) { 
        checkr = 0.25;
        //   printf(" Big problems :laser calibration signal shifted by  %f ps (%f channels) for PMT %s %i : check = %f\n",  diffmean*24.4, diffmean, nameDev[icase-208].Data(),idet, checkr);
        AliDebug(AliQAv1::GetQADebugLevel(),
-               Form(" Big problems :laser calibration signal shifted by  %f ps (%f channels) for PMT %s %i : check = %i\n",  diffmean*24.4, diffmean, nameDev[icase-208].Data(),idet, checkr)) ; 
+               Form(" Big problems :laser calibration signal shifted by  %f ps (%f channels) for PMT %s %i : check = %f\n",  diffmean*24.4, diffmean, nameDev[icase-208].Data(),idet, checkr)) ; 
        
      }