]>
Commit | Line | Data |
---|---|---|
d54804bf | 1 | //-*- Mode: C++ -*- |
2 | // $Id$ | |
ce565086 | 3 | // ************************************************************************ |
fbb9b71b | 4 | // This file is property of and copyright by the ALICE HLT Project * |
ce565086 | 5 | // ALICE Experiment at CERN, All rights reserved. * |
6 | // See cxx source for full Copyright notice * | |
7 | // * | |
8 | //************************************************************************* | |
d54804bf | 9 | |
10 | #ifndef ALIHLTTPCCAPERFORMANCE_H | |
11 | #define ALIHLTTPCCAPERFORMANCE_H | |
12 | ||
00d07bcd | 13 | #include "AliHLTTPCCADef.h" |
ce565086 | 14 | #include "Riostream.h" |
d54804bf | 15 | |
00d07bcd | 16 | class TObject; |
d54804bf | 17 | class TParticle; |
18 | class AliHLTTPCCAMCTrack; | |
eb30eb49 | 19 | class AliHLTTPCCAMCPoint; |
d54804bf | 20 | class AliHLTTPCCAGBTracker; |
21 | class TDirectory; | |
22 | class TH1D; | |
eb30eb49 | 23 | class TH2D; |
d54804bf | 24 | class TProfile; |
25 | ||
26 | /** | |
27 | * @class AliHLTTPCCAPerformance | |
fbb9b71b | 28 | * |
d54804bf | 29 | * Does performance evaluation of the HLT Cellular Automaton-based tracker |
fbb9b71b | 30 | * It checks performance for AliHLTTPCCATracker slice tracker |
d54804bf | 31 | * and for AliHLTTPCCAGBTracker global tracker |
32 | * | |
33 | */ | |
00d07bcd | 34 | class AliHLTTPCCAPerformance |
d54804bf | 35 | { |
36 | ||
fbb9b71b | 37 | public: |
38 | ||
39 | struct AliHLTTPCCAHitLabel { | |
40 | int fLab[3]; //* array of 3 MC labels | |
41 | }; | |
42 | ||
43 | AliHLTTPCCAPerformance(); | |
44 | AliHLTTPCCAPerformance( const AliHLTTPCCAPerformance& ); | |
45 | const AliHLTTPCCAPerformance &operator=( const AliHLTTPCCAPerformance& ) const; | |
46 | ||
47 | virtual ~AliHLTTPCCAPerformance(); | |
48 | ||
49 | static AliHLTTPCCAPerformance &Instance(); | |
50 | ||
51 | void SetTracker( AliHLTTPCCAGBTracker * const Tracker ); | |
52 | void StartEvent(); | |
53 | void SetNHits( int NHits ); | |
54 | void SetNMCTracks( int NMCTracks ); | |
55 | void SetNMCPoints( int NMCPoints ); | |
56 | ||
57 | void ReadHitLabel( int HitID, | |
58 | int lab0, int lab1, int lab2 ); | |
59 | void ReadMCTrack( int index, const TParticle *part ); | |
60 | void ReadMCTPCTrack( int index, float X, float Y, float Z, | |
61 | float Px, float Py, float Pz ); | |
62 | ||
63 | void ReadMCPoint( int TrackID, float X, float Y, float Z, float Time, int iSlice ); | |
64 | ||
65 | void CreateHistos(); | |
66 | void WriteHistos(); | |
67 | void SlicePerformance( int iSlice, bool PrintFlag ); | |
68 | void SliceTrackletPerformance( int iSlice, bool PrintFlag ); | |
69 | void SliceTrackCandPerformance( int iSlice, bool PrintFlag ); | |
70 | ||
71 | void Performance( fstream *StatFile = 0 ); | |
72 | ||
73 | void WriteMCEvent( ostream &out ) const; | |
74 | void ReadMCEvent( istream &in ); | |
75 | void WriteMCPoints( ostream &out ) const; | |
76 | void ReadMCPoints( istream &in ); | |
77 | bool DoClusterPulls() const { return fDoClusterPulls; } | |
78 | void SetDoClusterPulls( bool v ) { fDoClusterPulls = v; } | |
79 | AliHLTTPCCAHitLabel *HitLabels() const { return fHitLabels;} | |
80 | AliHLTTPCCAMCTrack *MCTracks() const { return fMCTracks; } | |
81 | int NMCTracks() const { return fNMCTracks; } | |
82 | ||
83 | TH1D *HNHitsPerSeed() const { return fhNHitsPerSeed;} | |
84 | TH1D *HNHitsPerTrackCand() const { return fhNHitsPerTrackCand; } | |
85 | ||
86 | TH1D *LinkChiRight( int i ) const { return fhLinkChiRight[i]; } | |
87 | TH1D *LinkChiWrong( int i ) const { return fhLinkChiWrong[i]; } | |
88 | ||
89 | void LinkPerformance( int iSlice ); | |
90 | ||
91 | protected: | |
92 | ||
93 | AliHLTTPCCAGBTracker *fTracker; //* pointer to the tracker | |
94 | ||
95 | ||
96 | AliHLTTPCCAHitLabel *fHitLabels; //* array of hit MC labels | |
97 | int fNHits; //* number of hits | |
98 | AliHLTTPCCAMCTrack *fMCTracks; //* array of MC tracks | |
99 | int fNMCTracks; //* number of MC tracks | |
100 | AliHLTTPCCAMCPoint *fMCPoints; //* array of MC points | |
101 | int fNMCPoints; //* number of MC points | |
102 | bool fDoClusterPulls; //* do cluster pulls (very slow) | |
103 | int fStatNEvents; //* n of events proceed | |
104 | double fStatTime; //* reco time; | |
105 | ||
106 | int fStatSeedNRecTot; //* total n of reconstructed tracks | |
107 | int fStatSeedNRecOut; //* n of reconstructed tracks in Out set | |
108 | int fStatSeedNGhost;//* n of reconstructed tracks in Ghost set | |
109 | int fStatSeedNMCAll;//* n of MC tracks | |
110 | int fStatSeedNRecAll; //* n of reconstructed tracks in All set | |
111 | int fStatSeedNClonesAll;//* total n of reconstructed tracks in Clone set | |
112 | int fStatSeedNMCRef; //* n of MC reference tracks | |
113 | int fStatSeedNRecRef; //* n of reconstructed tracks in Ref set | |
114 | int fStatSeedNClonesRef; //* n of reconstructed clones in Ref set | |
115 | ||
116 | int fStatCandNRecTot; //* total n of reconstructed tracks | |
117 | int fStatCandNRecOut; //* n of reconstructed tracks in Out set | |
118 | int fStatCandNGhost;//* n of reconstructed tracks in Ghost set | |
119 | int fStatCandNMCAll;//* n of MC tracks | |
120 | int fStatCandNRecAll; //* n of reconstructed tracks in All set | |
121 | int fStatCandNClonesAll;//* total n of reconstructed tracks in Clone set | |
122 | int fStatCandNMCRef; //* n of MC reference tracks | |
123 | int fStatCandNRecRef; //* n of reconstructed tracks in Ref set | |
124 | int fStatCandNClonesRef; //* n of reconstructed clones in Ref set | |
125 | ||
126 | int fStatNRecTot; //* total n of reconstructed tracks | |
127 | int fStatNRecOut; //* n of reconstructed tracks in Out set | |
128 | int fStatNGhost;//* n of reconstructed tracks in Ghost set | |
129 | int fStatNMCAll;//* n of MC tracks | |
130 | int fStatNRecAll; //* n of reconstructed tracks in All set | |
131 | int fStatNClonesAll;//* total n of reconstructed tracks in Clone set | |
132 | int fStatNMCRef; //* n of MC reference tracks | |
133 | int fStatNRecRef; //* n of reconstructed tracks in Ref set | |
134 | int fStatNClonesRef; //* n of reconstructed clones in Ref set | |
135 | ||
136 | int fStatGBNRecTot; //* global tracker: total n of reconstructed tracks | |
137 | int fStatGBNRecOut; //* global tracker: n of reconstructed tracks in Out set | |
138 | int fStatGBNGhost;//* global tracker: n of reconstructed tracks in Ghost set | |
139 | int fStatGBNMCAll;//* global tracker: n of MC tracks | |
140 | int fStatGBNRecAll; //* global tracker: n of reconstructed tracks in All set | |
141 | int fStatGBNClonesAll;//* global tracker: total n of reconstructed tracks in Clone set | |
142 | int fStatGBNMCRef; //* global tracker: n of MC reference tracks | |
143 | int fStatGBNRecRef; //* global tracker: n of reconstructed tracks in Ref set | |
144 | int fStatGBNClonesRef; //* global tracker: n of reconstructed clones in Ref set | |
145 | ||
146 | TDirectory *fHistoDir; //* ROOT directory with histogramms | |
147 | ||
148 | TH1D | |
149 | *fhResY, //* track Y resolution at the TPC entrance | |
150 | *fhResZ, //* track Z resolution at the TPC entrance | |
151 | *fhResSinPhi, //* track SinPhi resolution at the TPC entrance | |
152 | *fhResDzDs, //* track DzDs resolution at the TPC entrance | |
153 | *fhResPt, //* track Pt relative resolution at the TPC entrance | |
154 | *fhPullY, //* track Y pull at the TPC entrance | |
155 | *fhPullZ, //* track Z pull at the TPC entrance | |
156 | *fhPullSinPhi, //* track SinPhi pull at the TPC entrance | |
157 | *fhPullDzDs, //* track DzDs pull at the TPC entrance | |
158 | *fhPullQPt, //* track Q/Pt pull at the TPC entrance | |
159 | *fhPullYS, //* sqrt(chi2/ndf) deviation of the track parameters Y and SinPhi at the TPC entrance | |
160 | *fhPullZT; //* sqrt(chi2/ndf) deviation of the track parameters Z and DzDs at the TPC entrance | |
161 | ||
162 | TH1D | |
163 | *fhHitErrY, //* hit error in Y | |
164 | *fhHitErrZ,//* hit error in Z | |
d54804bf | 165 | *fhHitResY,//* hit resolution Y |
166 | *fhHitResZ,//* hit resolution Z | |
d54804bf | 167 | *fhHitPullY,//* hit pull Y |
eb30eb49 | 168 | *fhHitPullZ;//* hit pull Z |
fbb9b71b | 169 | TProfile *fhHitShared; //* ratio of the shared clusters |
eb30eb49 | 170 | |
fbb9b71b | 171 | TH1D |
eb30eb49 | 172 | *fhHitResY1,//* hit resolution Y, pt>1GeV |
173 | *fhHitResZ1,//* hit resolution Z, pt>1GeV | |
174 | *fhHitPullY1,//* hit pull Y, pt>1GeV | |
175 | *fhHitPullZ1;//* hit pull Z, pt>1GeV | |
176 | ||
fbb9b71b | 177 | TH1D |
d54804bf | 178 | *fhCellPurity,//* cell purity |
179 | *fhCellNHits//* cell n hits | |
180 | ; | |
181 | ||
fbb9b71b | 182 | TProfile |
00d07bcd | 183 | *fhCellPurityVsN, //* cell purity vs N hits |
184 | *fhCellPurityVsPt,//* cell purity vs MC Pt | |
185 | *fhEffVsP, //* reconstruction efficiency vs P plot | |
ce565086 | 186 | *fhSeedEffVsP, //* reconstruction efficiency vs P plot |
187 | *fhCandEffVsP, //* reconstruction efficiency vs P plot | |
00d07bcd | 188 | *fhGBEffVsP, //* global reconstruction efficiency vs P plot |
4687b8fc | 189 | *fhGBEffVsPt, //* global reconstruction efficiency vs P plot |
fbb9b71b | 190 | *fhNeighQuality, // quality for neighbours finder |
00d07bcd | 191 | *fhNeighEff,// efficiency for neighbours finder |
192 | *fhNeighQualityVsPt,// quality for neighbours finder vs track Pt | |
193 | *fhNeighEffVsPt;// efficiency for neighbours finder vs track Pt | |
fbb9b71b | 194 | TH1D |
195 | *fhNeighDy, // dy for neighbours | |
00d07bcd | 196 | *fhNeighDz,// dz for neighbours |
197 | *fhNeighChi;// chi2^0.5 for neighbours | |
fbb9b71b | 198 | TH2D |
00d07bcd | 199 | *fhNeighDyVsPt, // dy for neighbours vs track Pt |
200 | *fhNeighDzVsPt,// dz for neighbours vs track Pt | |
201 | *fhNeighChiVsPt, // chi2^0.5 for neighbours vs track Pt | |
202 | *fhNeighNCombVsArea; // N neighbours in the search area | |
d54804bf | 203 | |
fbb9b71b | 204 | TH1D |
693d2443 | 205 | *fhNHitsPerSeed, // n hits per track seed |
206 | *fhNHitsPerTrackCand; // n hits per track candidate | |
207 | ||
fbb9b71b | 208 | TH1D |
693d2443 | 209 | *fhTrackLengthRef, // reconstructed track length, % |
210 | *fhRefRecoX,// parameters of non-reconstructed ref. mc track | |
211 | *fhRefRecoY,// parameters of non-reconstructed ref. mc track | |
212 | *fhRefRecoZ,// parameters of non-reconstructed ref. mc track | |
213 | *fhRefRecoP, // parameters of non-reconstructed ref. mc track | |
214 | *fhRefRecoPt,// parameters of non-reconstructed ref. mc track | |
215 | *fhRefRecoAngleY,// parameters of non-reconstructed ref. mc track | |
216 | *fhRefRecoAngleZ,// parameters of non-reconstructed ref. mc track | |
217 | *fhRefRecoNHits,// parameters of non-reconstructed ref. mc track | |
218 | *fhRefNotRecoX,// parameters of non-reconstructed ref. mc track | |
219 | *fhRefNotRecoY,// parameters of non-reconstructed ref. mc track | |
220 | *fhRefNotRecoZ,// parameters of non-reconstructed ref. mc track | |
221 | *fhRefNotRecoP, // parameters of non-reconstructed ref. mc track | |
222 | *fhRefNotRecoPt,// parameters of non-reconstructed ref. mc track | |
223 | *fhRefNotRecoAngleY,// parameters of non-reconstructed ref. mc track | |
224 | *fhRefNotRecoAngleZ,// parameters of non-reconstructed ref. mc track | |
225 | *fhRefNotRecoNHits;// parameters of non-reconstructed ref. mc track | |
226 | ||
fbb9b71b | 227 | TProfile * fhLinkEff[4]; // link efficiency |
228 | TH1D *fhLinkAreaY[4]; // area in Y for the link finder | |
229 | TH1D *fhLinkAreaZ[4]; // area in Z for the link finder | |
230 | TH1D *fhLinkChiRight[4]; // sqrt(chi^2) for right neighbours | |
231 | TH1D *fhLinkChiWrong[4]; // sqrt(chi^2) for wrong neighbours | |
232 | ||
233 | static void WriteDir2Current( TObject *obj ); | |
ce565086 | 234 | |
d54804bf | 235 | }; |
236 | ||
237 | #endif |