#include "AliHBTReaderESD.h"
+//____________________________________________________________________
+//////////////////////////////////////////////////////////////////////
+// //
+// class AliHBTReaderESD //
+// //
+// reader for ALICE Event Summary Data (ESD). //
+// //
+// Piotr.Skowronski@cern.ch //
+// //
+//////////////////////////////////////////////////////////////////////
#include <TPDGCode.h>
#include <TString.h>
AliHBTReaderESD::~AliHBTReaderESD()
{
//desctructor
- delete fFile;
delete fRunLoader;
+ delete fFile;
}
/**********************************************************/
Int_t AliHBTReaderESD::ReadNext()
delete fFile;//we have to assume there is no more ESD objects in the fFile
delete fRunLoader;
fFile = 0x0;
+ fRunLoader = 0x0;
continue;
}
AliStack* stack = 0x0;
Error("Next","Can not get track %d", i);
continue;
}
+
+ if (esdtrack->HasVertexParameters() == kFALSE)
+ {
+ if (AliHBTParticle::fgDebug > 2)
+ Info("ReadNext","Particle skipped: Data at vertex not available.");
+ continue;
+ }
+
if ((esdtrack->GetStatus()&AliESDtrack::kESDpid) == kFALSE)
{
if (AliHBTParticle::fgDebug > 2)
Info("ReadNext","Particle skipped: PID BIT is not set.");
continue;
}
-
+
esdtrack->GetESDpid(pidtable);
- esdtrack->GetPxPyPz(mom);
- esdtrack->GetXYZ(pos);
+ esdtrack->GetVertexPxPyPz(mom[0],mom[1],mom[2]);
+ esdtrack->GetVertexXYZ(pos[0],pos[1],pos[2]);
Double_t extx;
Double_t extp[5];
for (Int_t s = 0; s<kNSpecies; s++)
{
- if (w[s] == 0.0) continue;
+ Float_t pp = w[s];
+ if (pp == 0.0) continue;
Int_t pdgcode = charge*GetSpeciesPdgCode((ESpecies)s);
if(Pass(pdgcode)) continue; //check if we are intersted with particles of this type
}//for (Int_t i = 0;i<ntr; i++) -- loop over tracks
Info("ReadNext","Read %d tracks and %d particles from event %d (event %d in dir %d).",
- fParticlesEvent->GetNumberOfParticles(), fTracksEvent->GetNumberOfParticles(),
+ fTracksEvent->GetNumberOfParticles(), fParticlesEvent->GetNumberOfParticles(),
fNEventsRead,fCurrentEvent,fCurrentDir);
fCurrentEvent++;
/**********************************************************/
void AliHBTReaderESD::Rewind()
{
+ //rewinds reading
delete fFile;
fFile = 0;
delete fRunLoader;
fCurrentDir = 0;
fNEventsRead = 0;
fCurrentEvent++;
-
}
/**********************************************************/