]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliKFParticleTest.C
reading RAW without data
[u/mrichter/AliRoot.git] / STEER / AliKFParticleTest.C
index b209ca1d6a13d4bf624ea68c44890248dcc72987..f64062b7acb604d17d91fd2b76d2159a48685dae 100644 (file)
@@ -35,7 +35,7 @@
 
   #include "AliRun.h"
   #include "AliStack.h"
-  #include "AliESD.h"
+  #include "AliESDEvent.h"
   #include "AliTracker.h"
   #include "AliKFParticle.h"
   #include "AliKFVertex.h"
@@ -131,7 +131,7 @@ public:
   Int_t mcMotherID;        //* Monte Carlo ID of its mother
 };
 
-void RunV0(  AliESD *event )
+void RunV0(  AliESDEvent *event )
 {
   //* V0 finder
 
@@ -168,7 +168,7 @@ void RunV0(  AliESD *event )
       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  
       { 
@@ -344,7 +344,7 @@ Int_t AliKFParticleTest(Int_t n1=0,Int_t n2=1000,char *dire="/d/alice10/sma/my_v
     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");
@@ -353,7 +353,7 @@ Int_t AliKFParticleTest(Int_t n1=0,Int_t n2=1000,char *dire="/d/alice10/sma/my_v
     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();