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 *
9 //* AliHLTTPCCADisplay class is a debug utility. *
10 //* It is not used in the normal data processing. *
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"
32 * @class AliHLTTPCCADisplay
34 class AliHLTTPCCADisplay
39 class AliHLTTPCCADisplayTmpHit{
42 Int_t ID() const { return fHitID; }
43 Double_t S() const { return fS; }
44 Double_t Z() const { return fZ; }
46 void SetID( Int_t v ){ fHitID = v; }
47 void SetS( Double_t v){ fS = v; }
48 void SetZ( Double_t v){ fZ = v; }
50 static Bool_t CompareHitDS( const AliHLTTPCCADisplayTmpHit &a,
51 const AliHLTTPCCADisplayTmpHit &b )
55 static Bool_t CompareHitZ( const AliHLTTPCCADisplayTmpHit &a,
56 const AliHLTTPCCADisplayTmpHit &b )
61 Int_t fHitID; // hit ID
62 Double_t fS; // hit position on the XY track curve
63 Double_t fZ; // hit Z position
66 static AliHLTTPCCADisplay &Instance();
69 AliHLTTPCCADisplay( const AliHLTTPCCADisplay& );
70 AliHLTTPCCADisplay& operator=(const AliHLTTPCCADisplay&);
72 virtual ~AliHLTTPCCADisplay();
80 void SetCurrentSlice( AliHLTTPCCATracker *slice );
81 void SetGB( AliHLTTPCCAGBTracker *GBTracker );
82 void Set2Slices( AliHLTTPCCATracker *slice );
84 Int_t GetColor( Int_t i ) const;
85 Int_t GetColorZ( Double_t z ) const ;
86 Int_t GetColorY( Double_t y ) const ;
87 Int_t GetColorK( Double_t k ) const ;
88 void Global2View( Double_t x, Double_t y, Double_t *xv, Double_t *yv ) const ;
89 void Slice2View( Double_t x, Double_t y, Double_t *xv, Double_t *yv ) const ;
90 Int_t GetTrackMC( AliHLTTPCCADisplayTmpHit *vHits, Int_t NHits );
93 void DrawSlice( AliHLTTPCCATracker *slice, Bool_t DrawRows=0 );
94 void DrawSliceOutTrack( Int_t itr, Int_t color=-1, Double_t width = -1 );
95 void DrawSliceOutTrack( AliHLTTPCCATrackParam &t, Double_t Alpha, Int_t itr, Int_t color=-1, Double_t width = -1 );
96 void DrawSliceTrack( Int_t itr, Int_t color=-1);
97 Bool_t DrawTrack( AliHLTTPCCATrackParam t, Double_t Alpha, AliHLTTPCCADisplayTmpHit *vHits,
98 Int_t NHits, Int_t color=-1, Double_t width=-1, Bool_t pPoint=0 );
100 void DrawGBTrack( Int_t itr, Int_t color=-1, Double_t width=-1 );
101 void DrawGBTrackFast( AliHLTTPCCAGBTracker &tracker, Int_t itr, Int_t color=-1 );
102 Bool_t DrawTracklet( AliHLTTPCCATrackParam &track, Int_t *hitstore, Int_t color=-1, Double_t width=-1, Bool_t pPoint=0 );
104 void DrawGBHit( AliHLTTPCCAGBTracker &tracker, Int_t iHit, Int_t color=-1, Double_t width =-1 );
105 void DrawGBHits( AliHLTTPCCAGBTracker &tracker, Int_t color=-1, Double_t width =-1 );
107 void DrawSliceHit( Int_t iRow,Int_t iHit, Int_t color=-1, Double_t width=-1 );
108 void DrawSliceHits(Int_t color=-1, Double_t width=-1 );
112 void DrawMergedHit( Int_t iRow, Int_t iHit, Int_t color=-1 );
114 void DrawTrack( AliHLTTPCCATrack &track, Int_t color=-1, Bool_t DrawCells=1 );
115 void DrawTrackletPoint( AliHLTTPCCATrackParam &t, Int_t color=-1 );
118 void SetSliceTransform( Double_t alpha );
120 void SetSliceTransform( AliHLTTPCCATracker *slice );
122 TCanvas *CanvasYX(){ return fYX; }
123 TCanvas *CanvasZX(){ return fZX; }
127 TCanvas *fYX, *fZX; // two views
128 Bool_t fAsk; // flag to ask for the pressing key
129 Bool_t fSliceView; // switch between slice/TPC zoom
130 AliHLTTPCCATracker *fSlice; // current CA tracker, includes slice geometry
131 AliHLTTPCCAGBTracker *fGB; // the global tracker
132 AliHLTTPCCAPerformance *fPerf; // Performance class (mc labels etc)
133 Double_t fCos, fSin, fZMin, fZMax, fYMin, fYMax;// view parameters
134 Double_t fSliceCos, fSliceSin; // current slice angle
135 Double_t fRInnerMin, fRInnerMax, fROuterMin, fROuterMax,fTPCZMin, fTPCZMax; // view parameters
137 TArc fArc; // parameters of drawing objects are copied from this members
145 Bool_t fDrawOnlyRef; // draw only clusters from ref. mc tracks