Calculation of new variables needed for Non-id HBT added. (Z. Chajecki)
[u/mrichter/AliRoot.git] / JETAN / AliJetParticlesReader.h
CommitLineData
d7c6ab14 1#ifndef ALIJETPARTICLESREADER_H
2#define ALIJETPARTICLESREADER_H
3
4/* $Id$ */
5
6//_________________________________________________________________________
7///////////////////////////////////////////////////////////////////////////
5d60c8f9 8// //
9// class AliJetReader //
10// File reader for ESD //
11// //
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 //
15// //
16// loizides@ikf.uni-frankfurt.de //
d7c6ab14 17///////////////////////////////////////////////////////////////////////////
18
19#include <TNamed.h>
20#include <TObjArray.h>
21class TClonesArray;
22class TString;
23class AliJetEventParticles;
24
25class AliJetParticlesReader: public TNamed
26{
27 public:
28 AliJetParticlesReader();
29 AliJetParticlesReader(TObjArray* dirs);
30 virtual ~AliJetParticlesReader();
31
32 void SetDirs(TObjArray* dirs){fDirs = dirs;} //sets array directories names
33 void ReadEventsFromTo(Int_t first,Int_t last){fFirst = first; fLast = last;}
34
35 virtual Int_t Next(); //call this if you want the next event
36 virtual void Rewind() = 0;
37
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;}
46
47 const AliJetEventParticles* GetEventParticles() const {return fEventParticles;}
48 AliJetEventParticles* GetEventParticles(Bool_t o)
49 {fOwner=o; return fEventParticles;} //return particles and set ownership
50
b2760c9e 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;}
d7c6ab14 57
58 protected:
59
60 virtual Int_t ReadNext() = 0; //this methods reads next event and
5d60c8f9 61 //put result in fParticles
62
d7c6ab14 63 TString& GetDirName(Int_t entry);
64
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)
73
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
80
81 ClassDef(AliJetParticlesReader,1) // Basic AliJetParticles Reader class
82};
83
84#endif