1 #ifndef ALIJETPARTICLESREADER_H
2 #define ALIJETPARTICLESREADER_H
6 //_________________________________________________________________________
7 ///////////////////////////////////////////////////////////////////////////
9 // class AliJetReader //
10 // File reader for ESD //
12 // This reader reads tracks from Event Summary Data //
13 // taken from Piotr.Skowronski@cern.ch //
14 // more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html //
16 // loizides@ikf.uni-frankfurt.de //
17 ///////////////////////////////////////////////////////////////////////////
20 #include <TObjArray.h>
23 class AliJetEventParticles;
25 class AliJetParticlesReader: public TNamed
28 AliJetParticlesReader();
29 AliJetParticlesReader(TObjArray* dirs);
30 virtual ~AliJetParticlesReader();
32 void SetDirs(TObjArray* dirs){fDirs = dirs;} //sets array directories names
33 void ReadEventsFromTo(Int_t first,Int_t last){fFirst = first; fLast = last;}
35 virtual Int_t Next(); //call this if you want the next event
36 virtual void Rewind() = 0;
38 void SetPtCut(Float_t ptmin=0, Float_t ptmax=1000)
39 {fPtMin=ptmin;fPtMax=ptmax;}
40 void SetPhiCut(Float_t phi=2*TMath::Pi()){SetPhiCut(0,phi);}
41 void SetPhiCut(Float_t phimin, Float_t phimax)
42 {fPhiMin=phimin;fPhiMax=phimax;}
43 void SetEtaCut(Float_t e=1){SetEtaCut(-e,e);}
44 void SetEtaCut(Float_t emin, Float_t emax)
45 {fEtaMin=emin;fEtaMax=emax;}
47 const AliJetEventParticles* GetEventParticles() const {return fEventParticles;}
48 AliJetEventParticles* GetEventParticles(Bool_t o)
49 {fOwner=o; return fEventParticles;} //return particles and set ownership
51 Int_t GetNumberOfDirs() const {return (fDirs)?fDirs->GetEntries():0;}
52 Int_t GetCurEventNumber() const {return fCurrentEvent;}
53 Int_t GetCurDirNumber() const {return fCurrentDir;}
54 Int_t GetTotEventsRead() const {return fNEventsRead;}
55 Int_t GetFirstEvent() const {return fFirst;}
56 Int_t GetLastEvent() const {return fLast;}
60 virtual Int_t ReadNext() = 0; //this methods reads next event and
61 //put result in fParticles
63 TString& GetDirName(Int_t entry);
65 AliJetEventParticles* fEventParticles; //array with read particles
66 Bool_t fOwner; //ownership of particles
67 TObjArray* fDirs; //array with directories to read data from
68 Int_t fCurrentEvent; //number of current event in current file
69 Int_t fCurrentDir; //number of current directory in array
70 Int_t fNEventsRead; //total number of processed events
71 Int_t fFirst; //first event to return (all before are skipped)
72 Int_t fLast; //last event to return (relative to total number)
74 Float_t fPtMin; //min pt cut
75 Float_t fPtMax; //max pt cut
76 Float_t fEtaMin; //min eta cut
77 Float_t fEtaMax; //max eta cut
78 Float_t fPhiMin; //min phi cut
79 Float_t fPhiMax; //max phi cut
81 ClassDef(AliJetParticlesReader,1) // Basic AliJetParticles Reader class