]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New QA checking procedure by Sylwester
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Jun 2009 09:47:51 +0000 (09:47 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Jun 2009 09:47:51 +0000 (09:47 +0000)
TRD/AliTRDQAChecker.cxx
TRD/AliTRDQAChecker.h

index caf703bbc5f00a386afef572b446b400cc3c2550..14ae0b68c4bc61de2454ecd1abc8b2f930f8a488 100644 (file)
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-  Checks the quality assurance. 
-  By comparing with reference data
-  S.Radomski Uni-Heidelberg October 2007
-*/
+/* $Id$ */
+
+////////////////////////////////////////////////////////////////////////////
+//                                                                        //
+//  Checks the quality assurance.                                         //
+//  By comparing with reference data                                      //
+//  S.Radomski Uni-Heidelberg October 2007                                //
+//                                                                        //
+////////////////////////////////////////////////////////////////////////////
 
 // --- ROOT system ---
 #include <TClass.h>
 ClassImp(AliTRDQAChecker)
 
 //__________________________________________________________________
+
+Double_t * AliTRDQAChecker::Check(AliQAv1::ALITASK_t index, TObjArray ** list) 
+{
+
+  // Super-basic check on the QA histograms on the input list: 
+
+  Double_t * test  = new Double_t[AliRecoParam::kNSpecies];
+  for(Int_t i=0; i<AliRecoParam::kNSpecies; i++) test[i] = 0.5; 
+
+  //Int_t count[AliRecoParam::kNSpecies] = { 0 }; 
+
+  if (index != AliQAv1::kRECPOINTS) return test;
+
+  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));
+    test[specie] = value / hist->GetSum();
+
+  }
+  return test ; 
+}  
+
+//____________________________________________________________________________
index d7fa324b1c16e54763d1b1fd3b431d51d3c2c418..84be75aff3d3e8b5a474015ba120890a3e81e52d 100644 (file)
@@ -3,14 +3,15 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-//////////////////////////////////////////////////////
-//
-//  Checks the quality assurance. 
-//  By comparing with reference data
-//  S. Radomski Uni-Heidelberg October 2007
-//
-///////////////////////////////////////////////////////
+/* $Id$ */
 
+////////////////////////////////////////////////////////////////////////////
+//                                                                        //
+//  Checks the quality assurance.                                         //
+//  By comparing with reference data                                      //
+//  S.Radomski Uni-Heidelberg October 2007                                //
+//                                                                        //
+////////////////////////////////////////////////////////////////////////////
 
 // --- ROOT system ---
 class TFile ; 
@@ -35,7 +36,7 @@ public:
 
   virtual Double_t * Check(AliQAv1::ALITASK_t /*index*/) {return NULL;}
   virtual Double_t * Check(TList * /*list*/) {return NULL;}
-  virtual Double_t * Check(AliQAv1::ALITASK_t /*index*/, TObjArray ** /*list*/) {return NULL;}
+  virtual Double_t * Check(AliQAv1::ALITASK_t /*index*/, TObjArray ** /*list*/);
   virtual Double_t * Check(AliQAv1::ALITASK_t /*index*/, TNtupleD** /*nt*/)     {return NULL;}
 
 private: