2 // This macro prints all details of each track for each AliRsnEvent in a file
3 // which is assumed to be saved in the same directory where this is executed.
6 void AliRsnPrintTracks(const char *fileName = "AliRsnEventsESD.root")
9 gSystem->Load("libANALYSIS");
10 gSystem->Load("libANALYSISalice.so");
11 gSystem->Load("libPWG2resonances.so");
13 TFile *file = TFile::Open(fileName);
14 TTree *tree = (TTree*)file->Get("aodTree");
16 Int_t i, last, nEvents = (Int_t)tree->GetEntries();
18 AliRsnEvent *event = 0;
19 tree->SetBranchAddress("rsnEvents", &event);
21 for (i = 0; i < nEvents; i++) {
22 cout << "*** Event " << i << " ***" << endl;
25 last = event->GetLastFastTrack(1.0);
28 cout << "...Tracks from 0 to " << last << " have Pt > 1.0 GeV" << endl << endl;
31 cout << "...NO tracks with Pt > 1.0 GeV" << endl << endl;