]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - T0/AliT0QADataMakerSim.cxx
Handle friend chain name in GetChainForTestMode
[u/mrichter/AliRoot.git] / T0 / AliT0QADataMakerSim.cxx
index 9e9fd43e881330beffeb0c3c9cf2a59a8a41caba..ddb2ee1b2dc17e75b090574cc1ff9f39a114acb7 100644 (file)
@@ -98,9 +98,13 @@ void AliT0QADataMakerSim::InitHits()
   TString timename;
   
   TH2F *fhHitsTimeA = new TH2F("hHitsTimeA", "Hits Efficiency;#PMT; Time [ns];", 13, 12, 25, 100,12,15 );
+  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);
+  //
+  ClonePerTrigClass(AliQAv1::kHITS); // this should be the last line
 }
 
 //____________________________________________________________________________ 
@@ -111,14 +115,16 @@ 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);
-  
-  
-   
+  //
+  ClonePerTrigClass(AliQAv1::kDIGITS); // this should be the last line 
 }
 
 //____________________________________________________________________________
@@ -126,7 +132,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 +143,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,27 +153,27 @@ 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;
          }
          Int_t pmt=startHit->Pmt();
          Float_t time = 0.001 * startHit->Time();
-         if(pmt<13)GetHitsData(1)->Fill(pmt,time) ;
-         if(pmt>12)GetHitsData(0)->Fill(pmt,time) ;
+         if(pmt<13) FillHitsData(1,pmt,time) ;
+         if(pmt>12) FillHitsData(0,pmt,time) ;
        }
     }
   }
+  //
+  IncEvCountCycleHits();
+  IncEvCountTotalHits();
+  //
 }
 
 //____________________________________________________________________________
@@ -187,10 +196,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);
@@ -204,9 +209,9 @@ void AliT0QADataMakerSim::MakeDigits( TTree *digitsTree)
     {
       if (digCFD->At(i)>0) {
        Int_t cfd=digCFD->At(i)- refpoint;
-       GetDigitsData(0) ->Fill(i,cfd);
-       GetDigitsData(1) -> Fill(i,(digLED->At(i) - digCFD->At(i)));
-       GetDigitsData(2) -> Fill(i, (digQT1->At(i) - digQT0->At(i)));
+       FillDigitsData(0, i,cfd);
+       FillDigitsData(1, i,(digLED->At(i) - digCFD->At(i)));
+       FillDigitsData(2, i, (digQT1->At(i) - digQT0->At(i)));
 
       }
     }  
@@ -215,5 +220,8 @@ void AliT0QADataMakerSim::MakeDigits( TTree *digitsTree)
   delete digLED;
   delete digQT0;
   delete digQT1;
-
+  //
+  IncEvCountCycleDigits();
+  IncEvCountTotalDigits();
+  //
 }