1)Terminate() method implemented in the frame. Simple examples on what to do with...
[u/mrichter/AliRoot.git] / PWG4 / PartCorrBase / AliAnalysisTaskParticleCorrelation.cxx
index 744405ffe08f1e496e538b1a252a85e86e8214d1..0a7172f885cb8dff0eed8830e163d022b6f7f3a8 100755 (executable)
@@ -44,6 +44,7 @@
 #include "AliAODHandler.h"
 #include "AliStack.h"
 #include "AliLog.h"
 #include "AliAODHandler.h"
 #include "AliStack.h"
 #include "AliLog.h"
+#include "AliPDG.h"
 
 ClassImp(AliAnalysisTaskParticleCorrelation)
 
 
 ClassImp(AliAnalysisTaskParticleCorrelation)
 
@@ -130,6 +131,10 @@ void AliAnalysisTaskParticleCorrelation::Init()
   if(!fAna)
     AliFatal("Analysis pointer not initialized, abort analysis!");
   
   if(!fAna)
     AliFatal("Analysis pointer not initialized, abort analysis!");
   
+  // Add different generator particles to PDG Data Base 
+  // to avoid problems when reading MC generator particles
+  AliPDG::AddParticlesToPdgDataBase();
+
   // Initialise analysis
   fAna->Init();
   
   // Initialise analysis
   fAna->Init();
   
@@ -166,8 +171,10 @@ void AliAnalysisTaskParticleCorrelation::UserExec(Option_t */*option*/)
 void AliAnalysisTaskParticleCorrelation::Terminate(Option_t */*option*/)
 {
   // Terminate analysis
 void AliAnalysisTaskParticleCorrelation::Terminate(Option_t */*option*/)
 {
   // Terminate analysis
+  // Do some plots
   //
   //
-  AliDebug(1,"Do nothing in Terminate");
-  //fAna->Terminate();
+  
+  fAna->Terminate();
+
 }
 
 }