Get number of particles and clusters from containers
authormverweij <marta.verweij@cern.ch>
Tue, 2 Sep 2014 12:15:19 +0000 (14:15 +0200)
committermverweij <marta.verweij@cern.ch>
Tue, 2 Sep 2014 13:25:26 +0000 (15:25 +0200)
PWGJE/EMCALJetTasks/AliAnalysisTaskRhoBase.cxx

index 3e08755..891e573 100644 (file)
@@ -13,6 +13,8 @@
 #include "AliLog.h"
 #include "AliRhoParameter.h"
 #include "AliEmcalJet.h"
+#include "AliParticleContainer.h"
+#include "AliClusterContainer.h"
 
 #include "AliAnalysisTaskRhoBase.h"
 
@@ -274,10 +276,10 @@ Bool_t AliAnalysisTaskRhoBase::FillHistograms()
   Int_t Ntracks   = 0;
   Int_t Nclusters = 0;
 
-  if (fTracks)
-    Ntracks = fTracks->GetEntries();
-  if (fCaloClusters)
-    Nclusters = fCaloClusters->GetEntries();
+  if (GetParticleContainer(0))
+    Ntracks = GetParticleContainer(0)->GetNAcceptedParticles();
+  if (GetClusterContainer(0))
+    Nclusters = GetClusterContainer(0)->GetNAcceptedClusters();
 
   if (fJets) {
     Int_t    Njets         = fJets->GetEntries();