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