Add counters for trigger type vs. run
authorprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 7 Jan 2012 23:58:57 +0000 (23:58 +0000)
committerprino <prino@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 7 Jan 2012 23:58:57 +0000 (23:58 +0000)
PWG3/vertexingHF/AliAnalysisTaskSEHFQA.cxx

index dbe3ab2..4ac187a 100644 (file)
@@ -420,9 +420,14 @@ void AliAnalysisTaskSEHFQA::UserCreateOutputObjects()
     secondEstimator->AddRubric("run",500000);
     secondEstimator->AddRubric("centralityclass","-10_0/0_10/10_20/20_30/30_40/40_50/50_60/60_70/70_80/80_90/90_100/-990_-980");
     secondEstimator->Init();
+    AliCounterCollection *trigCounter=new AliCounterCollection("trigCounter");
+    trigCounter->AddRubric("run",500000);
+    trigCounter->AddRubric("triggerType","Any/MB/Cent/SemiCent/EMCAL");
+    trigCounter->Init();
 
     fOutputCounters->Add(stdEstimator);
     fOutputCounters->Add(secondEstimator);
+    fOutputCounters->Add(trigCounter);
 
     //Centrality (Checks)
     fOutputCheckCentrality=new TList();
@@ -739,15 +744,20 @@ void AliAnalysisTaskSEHFQA::UserExec(Option_t */*option*/)
   UInt_t evSelMask=((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected();
   Double_t centrality=fCuts->GetCentrality(aod);
   Double_t multiplicity=aod->GetHeader()->GetRefMultiplicity();
+  Int_t runNumber = aod->GetRunNumber();
+
   TH2F* hTrigC=(TH2F*)fOutputEvSelection->FindObject("hTrigCent");
   TH2F* hTrigM=(TH2F*)fOutputEvSelection->FindObject("hTrigMul");
+  AliCounterCollection* trigCount=(AliCounterCollection*)fOutputCounters->FindObject("trigCounter");
 
   hTrigC->Fill(0.,centrality);
   hTrigM->Fill(0.,multiplicity);
+  trigCount->Count(Form("triggerType:Any/Run:%d",runNumber));
   
   if(evSelMask & AliVEvent::kMB){
     hTrigC->Fill(1.,centrality);
     hTrigM->Fill(1.,multiplicity);
+    trigCount->Count(Form("triggerType:MB/Run:%d",runNumber));
   }
   if(evSelMask & AliVEvent::kINT7){ 
     hTrigC->Fill(2.,centrality);
@@ -760,10 +770,12 @@ void AliAnalysisTaskSEHFQA::UserExec(Option_t */*option*/)
   if(evSelMask & AliVEvent::kCentral){
     hTrigC->Fill(4.,centrality);
     hTrigM->Fill(4.,multiplicity);
+    trigCount->Count(Form("triggerType:Cent/Run:%d",runNumber));
   }
   if(evSelMask & AliVEvent::kSemiCentral){ 
     hTrigC->Fill(5.,centrality);
     hTrigM->Fill(5.,multiplicity);
+    trigCount->Count(Form("triggerType:SemiCent/Run:%d",runNumber));
   }
   if(evSelMask & (AliVEvent::kEMC1 | AliVEvent::kEMC7)){
     hTrigC->Fill(6.,centrality);
@@ -772,6 +784,7 @@ void AliAnalysisTaskSEHFQA::UserExec(Option_t */*option*/)
   if(evSelMask & (AliVEvent::kEMCEJE | AliVEvent::kEMCEGA)){
     hTrigC->Fill(7.,centrality);
     hTrigM->Fill(7.,multiplicity);
+    trigCount->Count(Form("triggerType:EMCAL/Run:%d",runNumber));
   }
   if(evSelMask & (((AliVEvent::kCMUS5 | AliVEvent::kMUSH7) | (AliVEvent::kMUL7 | AliVEvent::kMUU7)) |  (AliVEvent::kMUS7 | AliVEvent::kMUON))){
     hTrigC->Fill(8.,centrality);
@@ -807,7 +820,6 @@ void AliAnalysisTaskSEHFQA::UserExec(Option_t */*option*/)
   //TString trigclass=aod->GetFiredTriggerClasses();
   //if(trigclass.Contains("C0SMH-B-NOPF-ALLNOTRD") || trigclass.Contains("C0SMH-B-NOPF-ALL")) fNEntries->Fill(5); //tmp
 
-  Int_t runNumber = aod->GetRunNumber();