]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliReaderESD.h
Was wrong file.
[u/mrichter/AliRoot.git] / ANALYSIS / AliReaderESD.h
1 #ifndef AliReaderESD_H
2 #define AliReaderESD_H
3 //___________________________________________________________________________
4 /////////////////////////////////////////////////////////////////////////////
5 //                                                                         //
6 // Multi file reader for ESD                                               //
7 //                                                                         //
8 // This reader reads tracks from Event Summary Data                        //
9 // do not read particles                                                   //
10 // Piotr.Skowronski@cern.ch                                                //
11 // more info: http://aliweb.cern.ch/people/skowron/analyzer/index.html    //
12 //                                                                         //
13 /////////////////////////////////////////////////////////////////////////////
14
15 #include "AliReader.h"
16 #include "AliTrackPoints.h"
17 #include <TString.h>
18 class TFile;
19 class AliRunLoader;
20 class AliESD;
21 class AliESDtrack;
22
23 class AliReaderESD: public AliReader
24 {
25   public:
26     AliReaderESD(const Char_t* esdfilename = "AliESDs.root", const Char_t* galfilename = "galice.root");
27
28     AliReaderESD(TObjArray* dirs,const Char_t* esdfilename = "AliESDs.root", const Char_t* galfilename = "galice.root");
29
30     virtual ~AliReaderESD();
31     
32     void          Rewind();
33     
34     void          ReadSimulatedData(Bool_t flag){fReadSim = flag;}//switches reading MC data
35     Bool_t        ReadsRec() const {return kTRUE;}
36     Bool_t        ReadsSim() const {return fReadSim;}
37     void          SetCheckParticlePID(Bool_t flag){fCheckParticlePID = flag;}
38     void          SetReadMostProbableOnly(Bool_t flag){fReadMostProbableOnly = flag;}
39             
40     void          ReadDataTPC(){}
41     void          ReadDataITS(){}
42
43     void          SetTPCNClustersRange(Int_t min,Int_t max);
44     void          SetTPCChi2PerCluserRange(Float_t min, Float_t max);
45     
46     void          SetChi2Range(Float_t min, Float_t max);
47     void          SetC00Range(Float_t min, Float_t max);
48     void          SetC11Range(Float_t min, Float_t max);
49     void          SetC22Range(Float_t min, Float_t max);
50     void          SetC33Range(Float_t min, Float_t max);
51     void          SetC44Range(Float_t min, Float_t max);
52     void          SetNumberOfTrackPoints(Int_t n = 5,Float_t dr = 30.0) {fNTrackPoints = n; fdR = dr;}
53     Int_t         GetNumberOfTrackPoints() const {return fNTrackPoints;}
54     void          SetClusterMap(Bool_t flag = kTRUE){fClusterMap = flag;}
55     void          SetITSTrackPoints(Bool_t flag, AliTrackPoints::ETypes type)
56                                    {fITSTrackPoints = flag; fITSTrackPointsType = type;}
57     void          MustTPC(Bool_t flag){fMustTPC = flag;}
58
59     void          SetReadCentralBarrel(Bool_t flag){fReadCentralBarrel = flag;}
60     void          SetReadMuon(Bool_t flag){fReadMuon = flag;}
61     void          SetReadPHOS(Bool_t flag){fReadPHOS = flag;}
62
63     enum ESpecies {kESDElectron = 0, kESDMuon, kESDPion, kESDKaon, kESDProton, kNSpecies};
64     static Int_t  GetSpeciesPdgCode(ESpecies spec);
65     
66     Int_t         ReadESD(AliESD* esd);
67     Int_t         ReadESDCentral(AliESD* esd);
68     Int_t         ReadESDMuon(AliESD* esd);
69     Int_t         ReadESDPHOS(AliESD* /*esd*/){return 0;}
70
71   protected:
72     virtual Int_t         ReadNext();
73  
74     virtual TFile*        OpenFile(Int_t evno);//opens files to be read for given event
75
76     Bool_t        CheckTrack(AliESDtrack* t) const;
77     
78     TString       fESDFileName;//name of the file with tracks
79     TString       fGAlFileName;//name of the file with tracks
80     TFile*        fFile;//! pointer to current ESD file
81     AliRunLoader* fRunLoader;//!Run Loader
82     TIter*        fKeyIterator;//!iterator over keys in ESD file
83     Bool_t        fReadSim;//flag indicating wether to read particles from kinematics
84     Bool_t        fCheckParticlePID;//flag indicating to perform the check on PID of simulated particle - usefull in resoluion analysis
85     Bool_t        fReadMostProbableOnly;//flag indicating to read ony one incarnation with the highest probability
86     Int_t         fNTrackPoints;//number of track points; if==0 track points are not created
87     Float_t       fdR;//spacing between points (along radius) in cm
88                       //Track Points are needed for Anti-Merging Cut
89     
90     Bool_t        fClusterMap;//Flag indicating if Claster Map should be created for each track
91                               //Claster map is needed for Anti-Splitting Cut
92
93     
94     Bool_t        fITSTrackPoints; //Flag indicalting if track positions in ITS are to be read
95                                   //currently we use only position at first pixels wich are
96                       //used by anti-merging cut in non-id analysis
97     AliTrackPoints::ETypes  fITSTrackPointsType;//defines the way track points are calculated
98     
99     Bool_t        fMustTPC;// must be reconstructed in TPC -> reject tracks reconstructed ITS stand alone
100
101     Bool_t        fReadCentralBarrel; // Flag for reading ESD central track 
102     Bool_t        fReadMuon;// Flag for reading ESD Muon track 
103     Bool_t        fReadPHOS;// Flag for reading ESD Phos 
104
105     //Cut Parameters specific to TPC tracks
106         
107     Int_t         fNTPCClustMin;//Number of clusters min value
108     Int_t         fNTPCClustMax;//Number of clusters max value
109     
110     Float_t       fTPCChi2PerClustMin;//Chi^2 per number of clusters min value
111     Float_t       fTPCChi2PerClustMax;//Chi^2 per number of clusters max value
112
113
114     // Required parameters at vertex
115     Float_t       fChi2Min;//Chi^2 min value
116     Float_t       fChi2Max;//Chi^2 max value
117
118     Float_t       fC00Min;//C00 (0th diagonal element of covariance matrix) min value
119     Float_t       fC00Max;//C00 (0th diagonal element of covariance matrix) max value
120             
121     Float_t       fC11Min;//C11 (1th diagonal element of covariance matrix) min value
122     Float_t       fC11Max;//C11 (1th diagonal element of covariance matrix) max value
123     
124     Float_t       fC22Min;//C22 (2th diagonal element of covariance matrix) min value
125     Float_t       fC22Max;//C22 (2th diagonal element of covariance matrix) max value
126     
127     Float_t       fC33Min;//C33 (3th diagonal element of covariance matrix) min value
128     Float_t       fC33Max;//C33 (3th diagonal element of covariance matrix) max value
129     
130     Float_t       fC44Min;//C44 (4th diagonal element of covariance matrix) min value
131     Float_t       fC44Max;//C44 (4th diagonal element of covariance matrix) max value
132
133     // Required parameters at TPC Inner Layer
134     Float_t       fTPCC00Min;//C00 (0th diagonal element of covariance matrix) min value
135     Float_t       fTPCC00Max;//C00 (0th diagonal element of covariance matrix) max value
136             
137     Float_t       fTPCC11Min;//C11 (1th diagonal element of covariance matrix) min value
138     Float_t       fTPCC11Max;//C11 (1th diagonal element of covariance matrix) max value
139     
140     Float_t       fTPCC22Min;//C22 (2th diagonal element of covariance matrix) min value
141     Float_t       fTPCC22Max;//C22 (2th diagonal element of covariance matrix) max value
142     
143     Float_t       fTPCC33Min;//C33 (3th diagonal element of covariance matrix) min value
144     Float_t       fTPCC33Max;//C33 (3th diagonal element of covariance matrix) max value
145     
146     Float_t       fTPCC44Min;//C44 (4th diagonal element of covariance matrix) min value
147     Float_t       fTPCC44Max;//C44 (4th diagonal element of covariance matrix) max value
148     
149   private:
150     AliReaderESD(const AliReaderESD&); // Not implemented
151     AliReaderESD& operator=(const AliReaderESD&); // Not implemented
152
153     ClassDef(AliReaderESD,1)
154 };
155
156
157 #endif