]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TOF/AliTOFQADataMakerRec.cxx
Fixes for bug #49914: Compilation breaks in trunk, and bug #48629: Trunk cannot read...
[u/mrichter/AliRoot.git] / TOF / AliTOFQADataMakerRec.cxx
index 44aaba24c49c66c5b525e3d230a1d1571b5d687a..cffb576e1a06a65753bf5d863f61e2ce3d10f354 100644 (file)
 ///////////////////////////////////////////////////////////////////////
 
 #include <TClonesArray.h>
-#include <TFile.h> 
-#include <TH1I.h> 
+//#include <TFile.h> 
+//#include <TH1I.h> 
 #include <TH1F.h> 
 #include <TH2F.h> 
+
+#include "AliLog.h"
 #include "AliESDEvent.h"
 #include "AliESDtrack.h"
-#include "AliTOFcluster.h"
-#include "AliTOFQADataMakerRec.h"
 #include "AliQAChecker.h"
 #include "AliRawReader.h"
+
+#include "AliTOFcluster.h"
+#include "AliTOFQADataMakerRec.h"
 #include "AliTOFRawStream.h"
 #include "AliTOFrawData.h"
-#include "AliLog.h"
+#include "AliTOFGeometry.h"
 
 ClassImp(AliTOFQADataMakerRec)
            
 //____________________________________________________________________________ 
   AliTOFQADataMakerRec::AliTOFQADataMakerRec() : 
-  AliQADataMakerRec(AliQA::GetDetName(AliQA::kTOF), "TOF Quality Assurance Data Maker")
+  AliQADataMakerRec(AliQAv1::GetDetName(AliQAv1::kTOF), "TOF Quality Assurance Data Maker")
 {
   //
   // ctor
@@ -75,20 +78,23 @@ void AliTOFQADataMakerRec::InitRaws()
   //
   // create Raws histograms in Raws subdir
   //
+
+  Bool_t expert = kFALSE;
+
   TH1F * h0 = new TH1F("hTOFRaws",    "Number of TOF Raws ",301, -1.02, 5.) ;   h0->Sumw2() ;
-  Add2RawsList(h0, 0) ;
+  Add2RawsList(h0, 0, expert) ;
 
   TH1F * h1  = new TH1F("hTOFRawsTime", "Raws Time Spectrum in TOF (ns)", 2000, 0., 200) ; 
   h1->Sumw2() ;
-  Add2RawsList(h1, 1) ;
+  Add2RawsList(h1, 1, expert) ;
 
   TH1F * h2  = new TH1F("hTOFRawsToT", "Raws ToT Spectrum in TOF (ns)", 500, 0., 50) ; 
   h2->Sumw2() ;
-  Add2RawsList(h2, 2) ;
+  Add2RawsList(h2, 2, expert) ;
 
   TH2F * h3  = new TH2F("hTOFRawsClusMap","Raws vs TOF eta-phi",183, -0.5, 182.5,865,-0.5,864.5) ; 
   h3->Sumw2() ;
-  Add2RawsList(h3, 3) ;
+  Add2RawsList(h3, 3, expert) ;
 
 }
 
@@ -98,24 +104,30 @@ void AliTOFQADataMakerRec::InitRecPoints()
   //
   // create RecPoints histograms in RecPoints subdir
   //
+
+  Bool_t expert = kFALSE;
+
   TH1F * h0 = new TH1F("hTOFRecPoints",    "Number of TOF RecPoints ",301, -1.02, 5.) ;   h0->Sumw2() ;
-  Add2RecPointsList(h0, 0) ;
+  Add2RecPointsList(h0, 0, expert) ;
 
   TH1F * h1  = new TH1F("hTOFRecPointsTime", "RecPoints Time Spectrum in TOF (ns)", 2000, 0., 200) ; 
   h1->Sumw2() ;
-  Add2RecPointsList(h1, 1) ;
+  Add2RecPointsList(h1, 1, expert) ;
 
   TH1F * h2  = new TH1F("hTOFRecPointsRawTime", "RecPoints raw Time Spectrum in TOF (ns)", 2000, 0., 200) ; 
   h2->Sumw2() ;
-  Add2RecPointsList(h2, 2) ;
+  Add2RecPointsList(h2, 2, expert) ;
 
   TH1F * h3  = new TH1F("hTOFRecPointsToT", "RecPoints ToT Spectrum in TOF (ns)", 500, 0., 50) ; 
   h3->Sumw2() ;
-  Add2RecPointsList(h3, 3) ;
+  Add2RecPointsList(h3, 3, expert) ;
 
-  TH2F * h4  = new TH2F("hTOFRecPointsClusMap","RecPoints vs TOF eta-phi",183, -0.5, 182.5,865,-0.5,864.5) ; 
+  TH2F * h4  = new TH2F("hTOFRecPointsClusMap","RecPoints vs TOF phi-eta",183, -0.5, 182.5,865,-0.5,864.5) ; 
   h4->Sumw2() ;
-  Add2RecPointsList(h4, 4) ;
+  h4->GetXaxis()->SetTitle("2*strip+padz (eta)");
+  h4->GetYaxis()->SetTitle("48*sector+padx (phi)");
+
+  Add2RecPointsList(h4, 4, expert) ;
 
 }
 
@@ -125,25 +137,28 @@ void AliTOFQADataMakerRec::InitESDs()
   //
   //create ESDs histograms in ESDs subdir
   //
+
+  Bool_t expert = kFALSE;
+
   TH1F * h0 = new TH1F("hTOFESDs",    "Number of matched TOF tracks over ESDs",       250, -1., 4.) ;  
   h0->Sumw2() ; 
-  Add2ESDsList(h0, 0) ;
+  Add2ESDsList(h0, 0, expert) ;
 
   TH1F * h1  = new TH1F("hTOFESDsTime", "Time Spectrum in TOF (ns)", 2000, 0., 200) ; 
   h1->Sumw2() ;
-  Add2ESDsList(h1, 1) ;
+  Add2ESDsList(h1, 1, expert) ;
 
   TH1F * h2  = new TH1F("hTOFESDsRawTime", "raw Time Spectrum in TOF (ns)", 2000, 0., 200) ; 
   h2->Sumw2() ;
-  Add2ESDsList(h2, 2) ;
+  Add2ESDsList(h2, 2, expert) ;
 
   TH1F * h3  = new TH1F("hTOFESDsToT", "ToT Spectrum in TOF (ns)", 500, 0., 50) ; 
   h3->Sumw2() ;
-  Add2ESDsList(h3, 3) ;
+  Add2ESDsList(h3, 3, expert) ;
 
-  TH1F * h4 = new TH1F("hTOFESDsPID",    "Fraction of matched TOF tracks with good PID glag", 100, 0., 1.) ;  
+  TH1F * h4 = new TH1F("hTOFESDsPID",    "Fraction of matched TOF tracks with good PID flag (%)", 101, 0., 101.) ;  
   h4->Sumw2() ; 
-  Add2ESDsList(h4, 4) ;
+  Add2ESDsList(h4, 4, expert) ;
 }
 
 //____________________________________________________________________________
@@ -217,7 +232,9 @@ void AliTOFQADataMakerRec::MakeRecPoints(TTree * clustersTree)
     return;
   }
 
-  TClonesArray dummy("AliTOFcluster",10000), *clusters=&dummy;
+  static TClonesArray dummy("AliTOFcluster",10000);
+  dummy.Clear();
+  TClonesArray *clusters=&dummy;
   branch->SetAddress(&clusters);
 
   // Import the tree
@@ -282,7 +299,8 @@ void AliTOFQADataMakerRec::MakeESDs(AliESDEvent * esd)
     GetESDsData(0)->Fill(TMath::Log10(nentries)) ;
   }
 
-  if(ntof>0)GetESDsData(4)->Fill(ntofpid/ntof) ;
+  Float_t ratio = (Float_t)ntofpid/(Float_t)ntof*100.;
+  if(ntof>0)GetESDsData(4)->Fill(ratio) ;
 
 }
 
@@ -295,12 +313,12 @@ void AliTOFQADataMakerRec::StartOfDetectorCycle()
 }
 
 //____________________________________________________________________________ 
-void AliTOFQADataMakerRec::EndOfDetectorCycle(AliQA::TASKINDEX task, TObjArray * list)
+void AliTOFQADataMakerRec::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
 
-  AliQAChecker::Instance()->Run(AliQA::kTOF, task, list) ;  
+  AliQAChecker::Instance()->Run(AliQAv1::kTOF, task, list) ;  
 }
 //____________________________________________________________________________
 void AliTOFQADataMakerRec::GetMapIndeces(Int_t* in , Int_t* out)