]>
Commit | Line | Data |
---|---|---|
326c2d4b | 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 | // AliHLTTPCCADisplay class is a debug utility. * | |
9 | // It is not used in the normal data processing. * | |
10 | // * | |
11 | //*************************************************************************** | |
326c2d4b | 12 | |
13 | #ifndef ALIHLTTPCCADISPLAY_H | |
14 | #define ALIHLTTPCCADISPLAY_H | |
15 | ||
00d07bcd | 16 | |
326c2d4b | 17 | class AliHLTTPCCATracker; |
326c2d4b | 18 | class AliHLTTPCCATrack; |
d54804bf | 19 | class AliHLTTPCCATrackParam; |
693d2443 | 20 | class AliHLTTPCCAPerformance; |
6de2bc40 | 21 | |
dc4788ec | 22 | class TCanvas; |
326c2d4b | 23 | #include "TArc.h" |
24 | #include "TLine.h" | |
25 | #include "TPolyLine.h" | |
26 | #include "TBox.h" | |
27 | #include "TCrown.h" | |
28 | #include "TMarker.h" | |
29 | #include "TLatex.h" | |
326c2d4b | 30 | |
ce565086 | 31 | |
e1f2d1c3 | 32 | |
326c2d4b | 33 | /** |
34 | * @class AliHLTTPCCADisplay | |
35 | */ | |
00d07bcd | 36 | class AliHLTTPCCADisplay |
326c2d4b | 37 | { |
693d2443 | 38 | |
fbb9b71b | 39 | public: |
40 | ||
41 | class AliHLTTPCCADisplayTmpHit; | |
42 | ||
43 | static AliHLTTPCCADisplay &Instance(); | |
44 | ||
45 | AliHLTTPCCADisplay(); | |
fbb9b71b | 46 | |
47 | virtual ~AliHLTTPCCADisplay(); | |
48 | ||
49 | void Init(); | |
50 | void Update(); | |
51 | void ClearView(); | |
52 | void Ask(); | |
53 | void SetSliceView(); | |
54 | void SetTPCView(); | |
b8139972 | 55 | void SetCurrentSlice( AliHLTTPCCATracker *slice ); |
fbb9b71b | 56 | void Set2Slices( AliHLTTPCCATracker * const slice ); |
57 | ||
58 | int GetColor( int i ) const; | |
59 | int GetColorZ( double z ) const ; | |
60 | int GetColorY( double y ) const ; | |
61 | int GetColorK( double k ) const ; | |
62 | void Global2View( double x, double y, double *xv, double *yv ) const ; | |
63 | void Slice2View( double x, double y, double *xv, double *yv ) const ; | |
64 | int GetTrackMC( const AliHLTTPCCADisplayTmpHit *vHits, int NHits ); | |
65 | ||
66 | void DrawTPC(); | |
67 | void DrawSlice( AliHLTTPCCATracker *slice, bool DrawRows = 0 ); | |
68 | void DrawSliceOutTrack( int itr, int color = -1, int width = -1 ); | |
69 | void DrawSliceOutTrack( AliHLTTPCCATrackParam &t, double Alpha, int itr, int color = -1, int width = -1 ); | |
70 | void DrawSliceTrack( int itr, int color = -1 ); | |
71 | bool DrawTrack( AliHLTTPCCATrackParam t, double Alpha, const AliHLTTPCCADisplayTmpHit *vHits, | |
4acc2401 | 72 | int NHits, int color = -1, int width = -1, bool pPoint = 0 ); |
fbb9b71b | 73 | |
fbb9b71b | 74 | bool DrawTracklet( AliHLTTPCCATrackParam &track, const int *hitstore, int color = -1, int width = -1, bool pPoint = 0 ); |
75 | ||
fbb9b71b | 76 | void DrawSliceHit( int iRow, int iHit, int color = -1, Size_t width = -1 ); |
77 | void DrawSliceHits( int color = -1, Size_t width = -1 ); | |
78 | void DrawSliceLinks( int colorUp = -1, int colorDn = -1, int width = -1 ); | |
79 | void DrawSliceLink( int iRow, int iHit, int colorUp = -1, int colorDn = -1, int width = -1 ); | |
f0fb467d | 80 | void SliceHitXYZ(int iRow, int iHit, double &x, double &y, double &z ); |
d54804bf | 81 | |
d54804bf | 82 | |
fbb9b71b | 83 | void SetSliceTransform( double alpha ); |
d54804bf | 84 | |
fbb9b71b | 85 | void SetSliceTransform( AliHLTTPCCATracker *slice ); |
d54804bf | 86 | |
fbb9b71b | 87 | TCanvas *CanvasYX() const { return fYX; } |
88 | TCanvas *CanvasZX() const { return fZX; } | |
326c2d4b | 89 | |
fbb9b71b | 90 | protected: |
326c2d4b | 91 | |
fbb9b71b | 92 | TCanvas *fYX, *fZX; // two views |
93 | bool fAsk; // flag to ask for the pressing key | |
94 | bool fSliceView; // switch between slice/TPC zoom | |
b8139972 | 95 | AliHLTTPCCATracker *fSlice; // current CA tracker, includes slice geometry |
fbb9b71b | 96 | AliHLTTPCCAPerformance *fPerf; // Performance class (mc labels etc) |
97 | double fCos, fSin, fZMin, fZMax, fYMin, fYMax;// view parameters | |
98 | double fSliceCos, fSliceSin; // current slice angle | |
99 | double fRInnerMin, fRInnerMax, fROuterMin, fROuterMax, fTPCZMin, fTPCZMax; // view parameters | |
326c2d4b | 100 | |
fbb9b71b | 101 | TArc fArc; // parameters of drawing objects are copied from this members |
102 | TLine fLine; //! | |
103 | TPolyLine fPLine;//! | |
104 | TMarker fMarker; //! | |
105 | TBox fBox; //! | |
106 | TCrown fCrown; //! | |
107 | TLatex fLatex; //! | |
326c2d4b | 108 | |
fbb9b71b | 109 | bool fDrawOnlyRef; // draw only clusters from ref. mc tracks |
326c2d4b | 110 | |
d4704ce5 | 111 | private: |
112 | /// copy constructor prohibited | |
113 | AliHLTTPCCADisplay( const AliHLTTPCCADisplay& ); | |
114 | /// assignment operator prohibited | |
c8c0a3a2 | 115 | AliHLTTPCCADisplay& operator=( const AliHLTTPCCADisplay& ); |
d4704ce5 | 116 | |
326c2d4b | 117 | }; |
118 | ||
31649d4b | 119 | #endif //ALIHLTTPCCADISPLAY_H |