]>
Commit | Line | Data |
---|---|---|
d7c6ab14 | 1 | #ifndef ALIJETPARTICLESREADERESD_H |
2 | #define ALIJETPARTICLESREADERESD_H | |
3 | ||
4 | //___________________________________________________________________________ | |
5 | ///////////////////////////////////////////////////////////////////////////// | |
6 | // // | |
5d60c8f9 | 7 | // File reader for ESD // |
d7c6ab14 | 8 | // // |
9 | // This reader reads tracks from Event Summary Data // | |
5d60c8f9 | 10 | // taken from Piotr.Skowronski@cern.ch // |
d7c6ab14 | 11 | // more info: http://alisoft.cern.ch/people/skowron/analyzer/index.html // |
12 | // // | |
5d60c8f9 | 13 | // loizides@ikf.uni-frankfurt.de // |
d7c6ab14 | 14 | ///////////////////////////////////////////////////////////////////////////// |
15 | ||
16 | #include <TString.h> | |
17 | #include <AliESDtrack.h> | |
18 | #include "AliJetParticlesReader.h" | |
19 | ||
20 | class TFile; | |
5d60c8f9 | 21 | class TTree; |
d7c6ab14 | 22 | class AliESD; |
23 | ||
24 | class AliJetParticlesReaderESD: public AliJetParticlesReader | |
25 | { | |
26 | public: | |
301a24f1 | 27 | AliJetParticlesReaderESD(Bool_t constrained,const Char_t* esdfilename = "AliESDs.root") ; |
28 | AliJetParticlesReaderESD(Bool_t constrained,TObjArray* dirs,const Char_t* esdfilename = "AliESDs.root"); | |
d7c6ab14 | 29 | |
30 | void SetCompareFlag(ULong_t f){fPassFlag=f;} | |
5d60c8f9 | 31 | void SetCompareFlagTPC() {fPassFlag=AliESDtrack::kTPCrefit;} |
d7c6ab14 | 32 | |
33 | virtual ~AliJetParticlesReaderESD(); | |
34 | ||
5d60c8f9 | 35 | //Int_t Next(); //in base class |
d7c6ab14 | 36 | void Rewind(); |
37 | ||
5d60c8f9 | 38 | const AliESD* GetCurrentESD() const {return fESD;} |
39 | ||
d7c6ab14 | 40 | protected: |
5d60c8f9 | 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 | |
d7c6ab14 | 44 | Bool_t IsAcceptedParticle(Float_t px, Float_t py, Float_t pz) const; |
45 | ||
301a24f1 | 46 | Bool_t fConstrained; // use constrained track parameters |
d7c6ab14 | 47 | TString fESDFileName; // name of the file with tracks |
5d60c8f9 | 48 | AliESD *fESD; //! pointer to current esd object |
d7c6ab14 | 49 | TFile* fFile; //! pointer to current ESD file |
5d60c8f9 | 50 | TTree* fTree; //! pointer to current tree with ESD objects |
d7c6ab14 | 51 | TIter* fKeyIterator; //! key iterator through file |
52 | ULong_t fPassFlag; //flag to compare esd flag with | |
53 | ||
301a24f1 | 54 | ClassDef(AliJetParticlesReaderESD,2) // |
d7c6ab14 | 55 | }; |
56 | ||
57 | inline Bool_t AliJetParticlesReaderESD::IsAcceptedParticle(Float_t pt, Float_t phi, Float_t eta) const | |
58 | { | |
59 | if((pt<fPtMin)||(pt>fPtMax)) return kFALSE; | |
60 | if((eta<fEtaMin)||(eta>fEtaMax)) return kFALSE; | |
61 | if((phi<fPhiMin)||(phi>fPhiMax)) return kFALSE; | |
62 | ||
63 | return kTRUE; | |
64 | } | |
65 | #endif |