]> git.uio.no Git - u/mrichter/AliRoot.git/blame - JETAN/AliJetParticlesReader.h
Renove the clusterizer after Reconstruct. Use as much the runloader instead of the...
[u/mrichter/AliRoot.git] / JETAN / AliJetParticlesReader.h
CommitLineData
d7c6ab14 1#ifndef ALIJETPARTICLESREADER_H
2#define ALIJETPARTICLESREADER_H
3
4/* $Id$ */
5
6//_________________________________________________________________________
7///////////////////////////////////////////////////////////////////////////
8//
9// class AliJetReader
10//
11// loizides@ikf.uni-frankfurt.de
12///////////////////////////////////////////////////////////////////////////
13
14#include <TNamed.h>
15#include <TObjArray.h>
16class TClonesArray;
17class TString;
18class AliJetEventParticles;
19
20class AliJetParticlesReader: public TNamed
21{
22 public:
23 AliJetParticlesReader();
24 AliJetParticlesReader(TObjArray* dirs);
25 virtual ~AliJetParticlesReader();
26
27 void SetDirs(TObjArray* dirs){fDirs = dirs;} //sets array directories names
28 void ReadEventsFromTo(Int_t first,Int_t last){fFirst = first; fLast = last;}
29
30 virtual Int_t Next(); //call this if you want the next event
31 virtual void Rewind() = 0;
32
33 void SetPtCut(Float_t ptmin=0, Float_t ptmax=1000)
34 {fPtMin=ptmin;fPtMax=ptmax;}
35 void SetPhiCut(Float_t phi=2*TMath::Pi()){SetPhiCut(0,phi);}
36 void SetPhiCut(Float_t phimin, Float_t phimax)
37 {fPhiMin=phimin;fPhiMax=phimax;}
38 void SetEtaCut(Float_t e=1){SetEtaCut(-e,e);}
39 void SetEtaCut(Float_t emin, Float_t emax)
40 {fEtaMin=emin;fEtaMax=emax;}
41
42 const AliJetEventParticles* GetEventParticles() const {return fEventParticles;}
43 AliJetEventParticles* GetEventParticles(Bool_t o)
44 {fOwner=o; return fEventParticles;} //return particles and set ownership
45
46 Int_t GetNumberOfDirs() const {return (fDirs)?fDirs->GetEntries():0;}
47 Int_t GetCurEventNumber() const {return fCurrentEvent;}
48 Int_t GetCurDirNumber() const {return fCurrentDir;}
49 Int_t GetTotEventsRead() const {return fNEventsRead;}
50 Int_t GetFirstEvent() const {return fFirst;}
51 Int_t GetLastEvent() const {return fLast;}
52
53 protected:
54
55 virtual Int_t ReadNext() = 0; //this methods reads next event and
56 //put result in fParticles
57 TString& GetDirName(Int_t entry);
58
59 AliJetEventParticles* fEventParticles; //array with read particles
60 Bool_t fOwner; //ownership of particles
61 TObjArray* fDirs; //array with directories to read data from
62 Int_t fCurrentEvent; //number of current event in current file
63 Int_t fCurrentDir; //number of current directory in array
64 Int_t fNEventsRead; //total number of processed events
65 Int_t fFirst; //first event to return (all before are skipped)
66 Int_t fLast; //last event to return (relative to total number)
67
68 Float_t fPtMin; //min pt cut
69 Float_t fPtMax; //max pt cut
70 Float_t fEtaMin; //min eta cut
71 Float_t fEtaMax; //max eta cut
72 Float_t fPhiMin; //min phi cut
73 Float_t fPhiMax; //max phi cut
74
75 ClassDef(AliJetParticlesReader,1) // Basic AliJetParticles Reader class
76};
77
78#endif