3 // *************************************************************************
4 // This file is property of and copyright by the ALICE HLT Project *
5 // ALICE Experiment at CERN, All rights reserved. *
6 // See cxx source for full Copyright notice *
8 // AliHLTTPCCADisplay class is a debug utility. *
9 // It is not used in the normal data processing. *
11 //***************************************************************************
13 #ifndef ALIHLTTPCCADISPLAY_H
14 #define ALIHLTTPCCADISPLAY_H
17 class AliHLTTPCCATracker;
18 class AliHLTTPCCAGBTracker;
19 class AliHLTTPCCATrack;
20 class AliHLTTPCCATrackParam;
21 class AliHLTTPCCAPerformance;
25 #include "TPolyLine.h"
34 * @class AliHLTTPCCADisplay
36 class AliHLTTPCCADisplay
41 class AliHLTTPCCADisplayTmpHit;
43 static AliHLTTPCCADisplay &Instance();
46 AliHLTTPCCADisplay( const AliHLTTPCCADisplay& );
47 const AliHLTTPCCADisplay& operator=( const AliHLTTPCCADisplay& ) const ;
49 virtual ~AliHLTTPCCADisplay();
57 void SetCurrentSlice( AliHLTTPCCATracker *slice );
58 void SetGB( AliHLTTPCCAGBTracker * const GBTracker );
59 void Set2Slices( AliHLTTPCCATracker * const slice );
61 int GetColor( int i ) const;
62 int GetColorZ( double z ) const ;
63 int GetColorY( double y ) const ;
64 int GetColorK( double k ) const ;
65 void Global2View( double x, double y, double *xv, double *yv ) const ;
66 void Slice2View( double x, double y, double *xv, double *yv ) const ;
67 int GetTrackMC( const AliHLTTPCCADisplayTmpHit *vHits, int NHits );
70 void DrawSlice( AliHLTTPCCATracker *slice, bool DrawRows = 0 );
71 void DrawSliceOutTrack( int itr, int color = -1, int width = -1 );
72 void DrawSliceOutTrack( AliHLTTPCCATrackParam &t, double Alpha, int itr, int color = -1, int width = -1 );
73 void DrawSliceTrack( int itr, int color = -1 );
74 bool DrawTrack( AliHLTTPCCATrackParam t, double Alpha, const AliHLTTPCCADisplayTmpHit *vHits,
75 int NHits, int color = -1, int width = -1, bool pPoint = 0 );
77 void DrawGBTrack( int itr, int color = -1, int width = -1 );
78 void DrawGBTrackFast( AliHLTTPCCAGBTracker &tracker, int itr, int color = -1 );
79 bool DrawTracklet( AliHLTTPCCATrackParam &track, const int *hitstore, int color = -1, int width = -1, bool pPoint = 0 );
81 void DrawGBHit( AliHLTTPCCAGBTracker &tracker, int iHit, int color = -1, Size_t width = -1 );
82 void DrawGBHits( AliHLTTPCCAGBTracker &tracker, int color = -1, Size_t width = -1 );
84 void DrawSliceHit( int iRow, int iHit, int color = -1, Size_t width = -1 );
85 void DrawSliceHits( int color = -1, Size_t width = -1 );
86 void DrawSliceLinks( int colorUp = -1, int colorDn = -1, int width = -1 );
87 void DrawSliceLink( int iRow, int iHit, int colorUp = -1, int colorDn = -1, int width = -1 );
91 void DrawMergedHit( int iRow, int iHit, int color = -1 );
93 void DrawTrack( AliHLTTPCCATrack &track, int color = -1, bool DrawCells = 1 );
94 void DrawTrackletPoint( AliHLTTPCCATrackParam &t, int color = -1 );
97 void SetSliceTransform( double alpha );
99 void SetSliceTransform( AliHLTTPCCATracker *slice );
101 TCanvas *CanvasYX() const { return fYX; }
102 TCanvas *CanvasZX() const { return fZX; }
106 TCanvas *fYX, *fZX; // two views
107 bool fAsk; // flag to ask for the pressing key
108 bool fSliceView; // switch between slice/TPC zoom
109 AliHLTTPCCATracker *fSlice; // current CA tracker, includes slice geometry
110 AliHLTTPCCAGBTracker *fGB; // the global tracker
111 AliHLTTPCCAPerformance *fPerf; // Performance class (mc labels etc)
112 double fCos, fSin, fZMin, fZMax, fYMin, fYMax;// view parameters
113 double fSliceCos, fSliceSin; // current slice angle
114 double fRInnerMin, fRInnerMax, fROuterMin, fROuterMax, fTPCZMin, fTPCZMax; // view parameters
116 TArc fArc; // parameters of drawing objects are copied from this members
124 bool fDrawOnlyRef; // draw only clusters from ref. mc tracks