]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDQAChecker.cxx
Added to AliITSMultReconstructor flagging of tracks
[u/mrichter/AliRoot.git] / TRD / AliTRDQAChecker.cxx
index f293e0bc8bfb2106331e6e2e8e1347cf3237f0f8..bf3b85e4377bdbc5b2fbd2f8dd0a873a656980c8 100644 (file)
 
 ////////////////////////////////////////////////////////////////////////////
 //                                                                        //
-//  Checks the quality assurance by comparing with reference data         //
-//                                                                        //
-//  Author:                                                               //
-//    Sylwester Radomski (radomski@physi.uni-heidelberg.de)               //
+//  Checks the quality assurance.                                         //
+//  By comparing with reference data                                      //
+//  S.Radomski Uni-Heidelberg October 2007                                //
 //                                                                        //
 ////////////////////////////////////////////////////////////////////////////
 
 
 // --- AliRoot header files ---
 #include "AliLog.h"
-#include "AliQA.h"
+#include "AliQAv1.h"
 #include "AliQAChecker.h"
-
 #include "AliTRDQAChecker.h"
 
 ClassImp(AliTRDQAChecker)
 
 //__________________________________________________________________
-AliTRDQAChecker& AliTRDQAChecker::operator = (const AliTRDQAChecker& qac )
+
+void AliTRDQAChecker::Check(Double_t * test, AliQAv1::ALITASK_t index, TObjArray ** list, const AliDetectorRecoParam* /*param*/) 
 {
-  //
-  // Equal operator.
-  //
 
-  this->~AliTRDQAChecker();
-  new(this) AliTRDQAChecker(qac);
-  return *this;
+  // Super-basic check on the QA histograms on the input list: 
+
+  for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) test[i] = 0.5; 
+
+  //Int_t count[AliRecoParam::kNSpecies] = { 0 }; 
+
+  if (index != AliQAv1::kREC) return;
+
+  const Double_t lowAmp = 30;
+  const Double_t highAmp = 50;
+
+  for (Int_t specie = 0 ; specie < AliRecoParam::kNSpecies ; specie++) {
+    
+    TH1D *hist = (TH1D*) list[specie]->At(12);
+    if (!hist) continue;
+    
+    Double_t value = hist->Integral(hist->FindBin(lowAmp), hist->FindBin(highAmp));
+    if (hist->GetSum())
+      test[specie] = value / hist->GetSum();
 
-}
+  }
+}  
 
+//____________________________________________________________________________