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