]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding a simple checker to the FMD as well as rearranging the raw histos
authorhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Nov 2009 16:58:56 +0000 (16:58 +0000)
committerhdalsgaa <hdalsgaa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 9 Nov 2009 16:58:56 +0000 (16:58 +0000)
FMD/AliFMDQAChecker.cxx
FMD/AliFMDQAChecker.h
FMD/AliFMDQADataMakerRec.cxx

index a695130c151b78e8d311da57aeec8aa3c9d19eba..e08f3002c993a45121ff0fe62a914064326e20a1 100644 (file)
 #include <TIterator.h> 
 #include <TKey.h> 
 #include <TFile.h> 
+#include <iostream>
 
 // --- AliRoot header files ---
 #include "AliLog.h"
 #include "AliQAv1.h"
 #include "AliQAChecker.h"
 #include "AliFMDQAChecker.h"
+#include "AliRecoParam.h"
 
 ClassImp(AliFMDQAChecker)
 #if 0
 ; // This is for Emacs! - do not delete
 #endif
-
 //__________________________________________________________________
+Double_t* AliFMDQAChecker::Check(AliQAv1::ALITASK_t what, TObjArray ** list) {
+  
+  Double_t* rv = new Double_t[AliRecoParam::kNSpecies] ; 
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    rv[specie] = 0.0 ; 
+    if ( !AliQAv1::Instance()->IsEventSpecieSet(specie) ) 
+      continue ;
+    
+    if(!list[specie]) continue;
+    
+    TIter next1(list[specie]);
+    TH1F*  hist = 0;
+    
+    for(Int_t i= 0; i<list[specie]->GetEntriesFast(); i++) {
+      
+      hist = (TH1F*)list[specie]->At(i);
+      if(!hist) continue;
+      
+      if(what == AliQAv1::kESD) {
+       if(hist->GetMean() > 0)
+         rv[specie] = 1.;
+       else rv[specie] = 0.;
+      }
+      if(what == AliQAv1::kRAW) {
+       if(hist->GetMean() > 0)
+         rv[specie] = 1.;
+       else rv[specie] = 0.;
+      }
+      if(what == AliQAv1::kSIM) {
+       if(hist->GetMean() > 0)
+         rv[specie] = 1.;
+       else rv[specie] = 0.;
+      }
+      if(what == AliQAv1::kREC) {
+       if(hist->GetMean() > 0)
+         rv[specie] = 1.;
+       else rv[specie] = 0.;
+      }
+      
+    }
+  }
+  
+  return rv;
+  
+}
+
+
 
 //__________________________________________________________________
 //
index 1d311d79dcbfcfb4f2a74ff9a0ab5a63542dce0e..f130bfd86c8cee17bfa091b47c049788339681ca 100644 (file)
@@ -21,7 +21,7 @@ public:
   {}          
   /** Destructor */
   virtual ~AliFMDQAChecker() {}
-
+  Double_t * Check(AliQAv1::ALITASK_t what, TObjArray ** list);
 private:
   ClassDef(AliFMDQAChecker,0)  // Yves? what to do? 
 };
index 20250d89c4f1a59e9339ee67dd4716e844e8b552..1cf051aa5dc90eebebefb4567a18e9dc618d9db4 100644 (file)
@@ -157,7 +157,7 @@ void AliFMDQADataMakerRec::InitRaws()
                                 1024,0,1023);
       
       Int_t index1 = GetHalfringIndex(det, ring, 0,1);
-      Add2RawsList(hADCCounts, index1, expert, !image, !saveCorr);
+      Add2RawsList(hADCCounts, index1, !expert, image, !saveCorr);
       
       for(Int_t b = 0; b<=1;b++) {
        
@@ -172,7 +172,7 @@ void AliFMDQADataMakerRec::InitRaws()
        hADCCounts->SetXTitle("ADC counts");
        hADCCounts->SetYTitle("");
        Int_t index2 = GetHalfringIndex(det, ring, board/16,0);
-       Add2RawsList(hADCCounts, index2, !expert, image, !saveCorr);
+       Add2RawsList(hADCCounts, index2, expert, !image, !saveCorr);
 
       }
     }