]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0QADataMakerSim.cxx
Fixes for cmake
[u/mrichter/AliRoot.git] / T0 / AliT0QADataMakerSim.cxx
index a5ce970b9f0983a73c3939efa09011e39622681e..d6eb86cb1a6a077c007e77ae2bc9c9efcaa297de 100644 (file)
@@ -1,4 +1,4 @@
-;/**************************************************************************
+/**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
  * Author: The ALICE Off-line Project.                                    *
@@ -98,8 +98,10 @@ void AliT0QADataMakerSim::InitHits()
   TString timename;
   
   TH2F *fhHitsTimeA = new TH2F("hHitsTimeA", "Hits Efficiency;#PMT; Time [ns];", 13, 12, 25, 100,12,15 );
-  Add2HitsList(fhHitsTimeA,0, !expert, image);
+  fhHitsTimeA->SetOption("COLZ");
+ Add2HitsList(fhHitsTimeA,0, !expert, image);
   TH2F *fhHitsTimeC = new TH2F("hHitsTimeC", "Hits Efficiency;#PMT; Time [ns];", 13, 0, 13, 100,2,5 );
+  fhHitsTimeC->SetOption("COLZ");
   Add2HitsList(fhHitsTimeC,1, !expert, image);
 }
 
@@ -111,10 +113,13 @@ void AliT0QADataMakerSim::InitDigits()
   const Bool_t image    = kTRUE ; 
   
   TH2F * fhDigCFD = new TH2F("fhDigCFD", " CFD digits; #PMT; CFD time [#channel]",25,-0.5,24.5,100,0,1000);
+  fhDigCFD->SetOption("COLZ");
   Add2DigitsList( fhDigCFD,0);
   TH2F *fhDigLEDamp = new TH2F("fhDigLEDamp", " LED-CFD digits; #PMT; amplitude  LED-CFD [#channel]",25,-0.5,24.5,100,100,1000);
+  fhDigLEDamp->SetOption("COLZ");
   Add2DigitsList( fhDigLEDamp,1, !expert, image);
   TH2F * fhDigQTC = new TH2F("fhDigQTC", " QTC digits; #PMT; amplitude QTC [#channel]",25,-0.5,24.5,200,500,10000);
+  fhDigQTC->SetOption("COLZ");
   Add2DigitsList( fhDigQTC,2, !expert, image);
   
   
@@ -126,7 +131,10 @@ void AliT0QADataMakerSim::InitDigits()
 void AliT0QADataMakerSim::MakeHits(TTree *hitTree)
 {
   //fills QA histos for Hits
-  TClonesArray * hits = new TClonesArray("AliT0hit", 1000);
+  if (fHitsArray) 
+    fHitsArray->Clear() ; 
+  else 
+    fHitsArray = new TClonesArray("AliT0hit", 1000);
   
   TBranch * branch = hitTree->GetBranch("T0") ;
   if ( ! branch ) {
@@ -134,7 +142,7 @@ void AliT0QADataMakerSim::MakeHits(TTree *hitTree)
   } else {
 
    if (branch) {
-      branch->SetAddress(&hits);
+      branch->SetAddress(&fHitsArray);
     }else{
       AliError("Branch T0 hit not found");
       exit(111);
@@ -144,16 +152,12 @@ void AliT0QADataMakerSim::MakeHits(TTree *hitTree)
     if (ntracks<=0) return;
     // Start loop on tracks in the hits containers
 
-    // Check id histograms already created for this Event Specie
-    if ( ! GetHitsData(0) )
-      InitHits() ;
-
     for (Int_t track=0; track<ntracks;track++) {
       branch->GetEntry(track);
-      Int_t nhits = hits->GetEntriesFast();
+      Int_t nhits = fHitsArray->GetEntriesFast();
       for (Int_t ihit=0;ihit<nhits;ihit++) 
        {
-         AliT0hit  * startHit   = (AliT0hit*) hits->UncheckedAt(ihit);
+         AliT0hit  * startHit   = (AliT0hit*) fHitsArray->UncheckedAt(ihit);
          if (!startHit) {
            AliError("The unchecked hit doesn't exist");
            continue;
@@ -187,10 +191,6 @@ void AliT0QADataMakerSim::MakeDigits( TTree *digitsTree)
      return;
   }
 
-  // Check id histograms already created for this Event Specie
-  if ( ! GetDigitsData(0) )
-    InitDigits() ;
-
   digitsTree->GetEvent(0);
   digitsTree->GetEntry(0);
   brDigits->GetEntry(0);