Adapted to new AliMCEvent interface.
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Oct 2007 15:01:56 +0000 (15:01 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Oct 2007 15:01:56 +0000 (15:01 +0000)
JETAN/AliAnalysisTaskJets.cxx
JETAN/AliJetKineReader.cxx

index 8aee781..6305e18 100644 (file)
 #include "AliJetFinder.h"
 #include "AliJetHistos.h"
 #include "AliESDEvent.h"
+#include "AliESD.h"
 #include "AliAODEvent.h"
 #include "AliAODHandler.h"
 #include "AliMCEventHandler.h"
+#include "AliMCEvent.h"
 #include "AliStack.h"
 
 
@@ -121,13 +123,14 @@ void AliAnalysisTaskJets::Exec(Option_t */*option*/)
     AliMCEventHandler*    mctruth = (AliMCEventHandler*) 
        ((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
     if (mctruth) {
-       AliStack* stack = mctruth->Stack();
+       AliStack* stack = mctruth->MCEvent()->Stack();
        printf("AliAnalysisTaskJets: Number of tracks on stack %5d\n", stack->GetNtrack());
     }
     
     AliESD* old = fESD->GetAliESDOld();
     if (old) {
        fESD->CopyFromOldESD();
+       old->Reset();
     }
     
     Long64_t ientry = fChain->GetReadEntry();
index c36e9a0..548c7e0 100644 (file)
@@ -33,6 +33,7 @@
 #include "AliJetKineReaderHeader.h"
 #include "AliJetKineReader.h"
 #include "AliMCEventHandler.h"
+#include "AliMCEvent.h"
 #include "AliStack.h"
 #include "AliHeader.h"
 #include "AliGenPythiaEventHeader.h"
@@ -78,7 +79,7 @@ Bool_t AliJetKineReader::FillMomentumArray(Int_t event)
   
     ClearArray();
     // Get the stack
-    AliStack* stack = fMCEventHandler->Stack();
+    AliStack* stack = fMCEventHandler->MCEvent()->Stack();
     // Number of primaries
     Int_t nt = stack->GetNprimary();
       
@@ -86,7 +87,7 @@ Bool_t AliJetKineReader::FillMomentumArray(Int_t event)
     Double_t ptMin = ((AliJetKineReaderHeader*) fReaderHeader)->GetPtCut();
     Float_t etaMin = fReaderHeader->GetFiducialEtaMin();
     Float_t etaMax = fReaderHeader->GetFiducialEtaMax();  
-    fAliHeader = fMCEventHandler->Header();
+    fAliHeader = fMCEventHandler->MCEvent()->Header();
       
     
     TLorentzVector p4;