- AliESDtrack * cp ;
- Int_t cpindex ;
- for (cpindex = 0 ; cpindex < esd->GetNumberOfTracks() ; cpindex++) {
- // get the charged tracks from central tracking
- cp = esd->GetTrack(cpindex) ;
- Match(part, cp, dist) ;
+ //loop over the events
+ Int_t nevt, evt = 0 ;
+ for (nevt = 0 ; nevt < nOfEvt ; nevt++) {
+ evt++ ;
+ lfn.SetEvt(evt) ;
+ TString fileName = lfn.GetLFN() ;
+
+ if (fileName.IsNull()) {
+ nevt-- ;
+ continue ;
+ }
+
+ printf(">>>>>>>>>>>> Processing %s-%s/%s/%s : run # %d event # %d \n",
+ kYear.Data(), kProd.Data(), kVers.Data(), type.Data(), run, evt) ;
+ AliPHOSGetter * gime = AliPHOSGetter::Instance(fileName) ;
+
+ Int_t nEvent = gime->MaxEvent() ;
+ Int_t event ;
+ AliESD * esd = 0 ;
+ for (event = 0 ; event < nEvent; event++) {
+ esd = gime->ESD(event) ;
+ if (!esd)
+ return kFALSE ;
+
+ //esd->Print();
+ Int_t caloindex ;
+ // Calorimeter tracks
+ AliESDCaloTrack * ct ;
+ for (caloindex = 0 ; caloindex < esd->GetNumberOfCaloTracks() ; caloindex++) {
+ // get the calorimeter type of particles (PHOS or EMCAL)
+ ct = esd->GetCaloTrack(caloindex) ;
+ TParticle * part = ct->GetRecParticle() ;
+
+ AliESDtrack * cp ;
+ Int_t cpindex ;
+ for (cpindex = 0 ; cpindex < esd->GetNumberOfTracks() ; cpindex++) {
+ // get the charged tracks from central tracking
+ cp = esd->GetTrack(cpindex) ;
+ Match(part, cp, dist) ;
+ }
+ heta->Fill( dist[1] ) ;
+ hphi->Fill( dist[2] ) ;