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