1 #ifndef ALIJETPARTICLESREADERESD_H
2 #define ALIJETPARTICLESREADERESD_H
4 //___________________________________________________________________________
5 /////////////////////////////////////////////////////////////////////////////
7 // File reader for ESD //
9 // This reader reads tracks from Event Summary Data //
10 // taken from Piotr.Skowronski@cern.ch //
11 // more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html //
13 // loizides@ikf.uni-frankfurt.de //
14 /////////////////////////////////////////////////////////////////////////////
17 #include <AliESDtrack.h>
18 #include "AliJetParticlesReader.h"
24 class AliJetParticlesReaderESD: public AliJetParticlesReader
27 AliJetParticlesReaderESD(const Char_t* esdfilename = "AliESDs.root") ;
28 AliJetParticlesReaderESD(TObjArray* dirs,const Char_t* esdfilename = "AliESDs.root");
30 void SetCompareFlag(ULong_t f){fPassFlag=f;}
31 void SetCompareFlagTPC() {fPassFlag=AliESDtrack::kTPCrefit;}
33 virtual ~AliJetParticlesReaderESD();
35 //Int_t Next(); //in base class
38 const AliESD* GetCurrentESD() const {return fESD;}
41 virtual Int_t ReadESD(AliESD* esd); //read esd file/objects
42 Int_t ReadNext(); //read the next event
43 TFile* OpenFile(Int_t evno); //opens file to be read for given event
44 Bool_t IsAcceptedParticle(Float_t px, Float_t py, Float_t pz) const;
46 TString fESDFileName; // name of the file with tracks
47 AliESD *fESD; //! pointer to current esd object
48 TFile* fFile; //! pointer to current ESD file
49 TTree* fTree; //! pointer to current tree with ESD objects
50 TIter* fKeyIterator; //! key iterator through file
51 ULong_t fPassFlag; //flag to compare esd flag with
53 ClassDef(AliJetParticlesReaderESD,1) //
56 inline Bool_t AliJetParticlesReaderESD::IsAcceptedParticle(Float_t pt, Float_t phi, Float_t eta) const
58 if((pt<fPtMin)||(pt>fPtMax)) return kFALSE;
59 if((eta<fEtaMin)||(eta>fEtaMax)) return kFALSE;
60 if((phi<fPhiMin)||(phi>fPhiMax)) return kFALSE;