Bugfixes again for HLT.
[u/mrichter/AliRoot.git] / JETAN / AliJetParticlesReaderESD.cxx
index 7f9b813ae4dfdef10f01fadad1542f545bdfe2e1..735e174364a73514370835a946968cfa6a6b911d 100644 (file)
@@ -83,12 +83,14 @@ Int_t AliJetParticlesReaderESD::ReadESD(AliESD* esd)
      return kFALSE;
    }
 
-  //TDatabasePDG* pdgdb = TDatabasePDG::Instance();
-  //if (pdgdb == 0)
-  //{
-  //   Error("ReadESD","Can not get PDG Database Instance.");
-  //   return kFALSE;
-  // }
+  /*
+  TDatabasePDG* pdgdb = TDatabasePDG::Instance();
+  if (pdgdb == 0)
+  {
+     Error("ReadESD","Can not get PDG Database Instance.");
+     return kFALSE;
+  }
+  */
    
   Float_t mf = esd->GetMagneticField(); 
   if (mf <= 0.0)  
@@ -98,7 +100,7 @@ Int_t AliJetParticlesReaderESD::ReadESD(AliESD* esd)
   }
   AliKalmanTrack::SetMagneticField(mf/10.);
 
-  Info("ReadESD","Reading Event %d",fCurrentEvent);
+  Info("ReadESD","Reading Event %d",fCurrentDir*1000+fCurrentEvent);
   if((!fOwner) || (fEventParticles==0)) 
     fEventParticles = new AliJetEventParticles();
 
@@ -142,8 +144,8 @@ Int_t AliJetParticlesReaderESD::ReadESD(AliESD* esd)
      ULong_t cmptest=(kesdtrack->GetStatus() & fPassFlag);
      if (cmptest!=fPassFlag)
       {
-       //cout << i << " "; PrintESDtrack(kesdtrack); cout << endl;
        Info("ReadNext","Particle %d skipped: %u.",i,kesdtrack->GetStatus());
+       cout << i << " "; PrintESDtrack(kesdtrack); cout << endl;
         continue;
       }
 
@@ -154,8 +156,8 @@ Int_t AliJetParticlesReaderESD::ReadESD(AliESD* esd)
        kesdtrack->GetConstrainedPxPyPz(mom);
        kesdtrack->GetConstrainedXYZ(xyz);
      } else {
-       kesdtrack->GetPxPyPz(mom);
-       kesdtrack->GetXYZ(xyz);
+       if(!kesdtrack->GetPxPyPzAt(0,mom)) continue;
+       kesdtrack->GetXYZAt(0, xyz);
      }
      const Float_t kmass=kesdtrack->GetMass();
      const Float_t kp2=mom[0]*mom[0]+mom[1]*mom[1]+mom[2]*mom[2];