#include "AliRun.h"
#include "AliStack.h"
- #include "AliESD.h"
+ #include "AliESDEvent.h"
#include "AliTracker.h"
#include "AliKFParticle.h"
#include "AliKFVertex.h"
Int_t mcMotherID; //* Monte Carlo ID of its mother
};
-void RunV0( AliESD *event )
+void RunV0( AliESDEvent *event )
{
//* V0 finder
if ( !( pTrack->GetStatus()&AliESDtrack::kITSrefit ) ) continue;
Int_t indi[12];
if( pTrack->GetITSclusters(indi) <5 ) continue;
- Int_t PDG = ( pTrack->Get1Pt() <0 ) ?321 :211;
+ Int_t PDG = ( pTrack->GetSigned1Pt() <0 ) ?321 :211;
//* take MC PDG
{
if (!ef || !ef->IsOpen()) {cerr<<"Error open AliESDs.root !\n"; continue ;}
//create event object
- AliESD *event = new AliESD;
+ AliESD *event = new AliESDEvent;
//Set pointer to the esd tree in the file
TTree* tree = (TTree*) ef->Get("esdTree");
if (!tree) {cerr<<"no ESD tree found\n"; continue;};
//Set pointer to the esd object in the tree
- tree->SetBranchAddress("ESD", &event);
+ event->ReadFromTree(event);
//Number of events
Int_t nevents=tree->GetEntriesFast();