]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0QAChecker.cxx
material cherenkov properties adopted to TGeo according Savannah bug #67031, done...
[u/mrichter/AliRoot.git] / T0 / AliT0QAChecker.cxx
index e7ab24d5c0542a91e387df179276d40546a819d2..8eee2eb0211f6166127060000f05b1f50114380c 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);
@@ -113,7 +111,7 @@ Double_t * AliT0QAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list)
             fhRawEff[ir] = hdata;
           }
         }
-       if((ir>207 && ir<210)  && specie == 4) {
+       if((ir>207 && ir<210)  && specie == AliRecoParam::kCalib) {
          h =  (TH2*) list[specie]->UncheckedAt(ir);
          if(h) {
            cname = h->GetName();
@@ -146,7 +144,7 @@ Double_t * AliT0QAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list)
 
     //raw data
 
-      if (index == AliQAv1::kRAW && specie == 4){
+      if (index == AliQAv1::kRAW && specie == AliRecoParam::kCalib){
        test[specie] = CheckRaw(list[specie],dynamic_cast<TObjArray*>(dynamic_cast<TList *>(QARefRec->GetObject())->First()));
       }
       
@@ -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,7 +253,7 @@ 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;