]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALQADataMakerSim.cxx
added verbosity to QA histograms (Yves)
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALQADataMakerSim.cxx
index ef670610bd2cd04888a37bab0a5e3209a5f2a6b7..1eb61d970b3c612e5a7dd3618aa0d353c230d9c1 100644 (file)
 #include "AliEMCALHit.h"
 #include "AliEMCALQADataMakerSim.h"
 #include "AliQAChecker.h"
+#include "AliEMCALSDigitizer.h"
 
 ClassImp(AliEMCALQADataMakerSim)
            
 //____________________________________________________________________________ 
   AliEMCALQADataMakerSim::AliEMCALQADataMakerSim() : 
-  AliQADataMakerSim(AliQA::GetDetName(AliQA::kEMCAL), "EMCAL Quality Assurance Data Maker")
+  AliQADataMakerSim(AliQAv1::GetDetName(AliQAv1::kEMCAL), "EMCAL Quality Assurance Data Maker")
 {
   // ctor
 }
@@ -67,47 +68,56 @@ AliEMCALQADataMakerSim& AliEMCALQADataMakerSim::operator = (const AliEMCALQAData
 }
  
 //____________________________________________________________________________ 
-void AliEMCALQADataMakerSim::EndOfDetectorCycle(AliQA::TASKINDEX_t task, TObjArray * list)
+void AliEMCALQADataMakerSim::EndOfDetectorCycle(AliQAv1::TASKINDEX_t task, TObjArray ** list)
 {
   //Detector specific actions at end of cycle
   // do the QA checking
-  AliQAChecker::Instance()->Run(AliQA::kEMCAL, task, list) ;  
+  AliQAChecker::Instance()->Run(AliQAv1::kEMCAL, task, list) ;  
 }
 
 //____________________________________________________________________________ 
 void AliEMCALQADataMakerSim::InitHits()
 {
   // create Hits histograms in Hits subdir
-  TH1F * h0 = new TH1F("hEmcalHits",    "Hits energy distribution in EMCAL",       100, 0., 100.) ; 
+  const Bool_t expert   = kTRUE ; 
+  const Bool_t image    = kTRUE ; 
+  
+  TH1F * h0 = new TH1F("hEmcalHits",    "Hits energy distribution in EMCAL;Energy [MeV];Counts",       200, 0., 2.) ; //GeV
   h0->Sumw2() ;
-  Add2HitsList(h0, 0) ;
-  TH1I * h1  = new TH1I("hEmcalHitsMul", "Hits multiplicity distribution in EMCAL", 500, 0., 10000) ; 
+  Add2HitsList(h0, 0, !expert, image) ;
+  TH1I * h1  = new TH1I("hEmcalHitsMul", "Hits multiplicity distribution in EMCAL;# of Hits;Entries", 1000, 0, 10000) ; 
   h1->Sumw2() ;
-  Add2HitsList(h1, 1) ;
+  Add2HitsList(h1, 1, !expert, image) ;
 }
 
 //____________________________________________________________________________ 
 void AliEMCALQADataMakerSim::InitDigits()
 {
   // create Digits histograms in Digits subdir
-  TH1I * h0 = new TH1I("hEmcalDigits",    "Digits amplitude distribution in EMCAL",    500, 0, 5000) ; 
+  const Bool_t expert   = kTRUE ; 
+  const Bool_t image    = kTRUE ; 
+  
+  TH1I * h0 = new TH1I("hEmcalDigits",    "Digits amplitude distribution in EMCAL;Amplitude [ADC counts];Counts",    500, 0, 500) ; 
   h0->Sumw2() ;
-  Add2DigitsList(h0, 0) ;
-  TH1I * h1 = new TH1I("hEmcalDigitsMul", "Digits multiplicity distribution in EMCAL", 500, 0, 1000) ; 
+  Add2DigitsList(h0, 0, !expert, image) ;
+  TH1I * h1 = new TH1I("hEmcalDigitsMul", "Digits multiplicity distribution in EMCAL;# of Digits;Entries", 200, 0, 2000) ; 
   h1->Sumw2() ;
-  Add2DigitsList(h1, 1) ;
+  Add2DigitsList(h1, 1, !expert, image) ;
 }
 
 //____________________________________________________________________________ 
 void AliEMCALQADataMakerSim::InitSDigits()
 {
   // create SDigits histograms in SDigits subdir
-  TH1F * h0 = new TH1F("hEmcalSDigits",    "SDigits energy distribution in EMCAL",       100, 0., 100.) ; 
+  const Bool_t expert   = kTRUE ; 
+  const Bool_t image    = kTRUE ; 
+  
+  TH1F * h0 = new TH1F("hEmcalSDigits",    "SDigits energy distribution in EMCAL;Energy [MeV];Counts",       200, 0., 20.) ; 
   h0->Sumw2() ;
-  Add2SDigitsList(h0, 0) ;
-  TH1I * h1 = new TH1I("hEmcalSDigitsMul", "SDigits multiplicity distribution in EMCAL", 500, 0,  10000) ; 
+  Add2SDigitsList(h0, 0, !expert, image) ;
+  TH1I * h1 = new TH1I("hEmcalSDigitsMul", "SDigits multiplicity distribution in EMCAL;# of SDigits;Entries", 500, 0,  5000) ; 
   h1->Sumw2() ;
-  Add2SDigitsList(h1, 1) ;
+  Add2SDigitsList(h1, 1, !expert, image) ;
 }
 
 //____________________________________________________________________________
@@ -187,14 +197,18 @@ void AliEMCALQADataMakerSim::MakeDigits(TTree * digitTree)
 void AliEMCALQADataMakerSim::MakeSDigits(TClonesArray * sdigits)
 {
   // makes data from SDigits
-  
+  //Need a copy of the SDigitizer to calibrate the sdigit amplitude to
+  //energy in GeV
+  AliEMCALSDigitizer* sDigitizer = new AliEMCALSDigitizer();
+
   GetSDigitsData(1)->Fill(sdigits->GetEntriesFast()) ; 
   TIter next(sdigits) ; 
   AliEMCALDigit * sdigit ; 
   while ( (sdigit = dynamic_cast<AliEMCALDigit *>(next())) ) {
-    GetSDigitsData(0)->Fill( sdigit->GetAmp()) ;
+    GetSDigitsData(0)->Fill( sDigitizer->Calibrate(sdigit->GetAmp())) ;
   } 
 
+  delete sDigitizer;
 }
 
 //____________________________________________________________________________