]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.h
TPC CA Global Merger component added
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCADisplay.h
1 //-*- Mode: C++ -*-
2 // @(#) $Id$
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                                *
7 //                                                                          *
8 //  AliHLTTPCCADisplay class is a debug utility.                            *
9 //  It is not used in the normal data processing.                           *
10 //                                                                          *
11 //***************************************************************************
12
13 #ifndef ALIHLTTPCCADISPLAY_H
14 #define ALIHLTTPCCADISPLAY_H
15
16
17 class AliHLTTPCCATracker;
18 class AliHLTTPCCAGBTracker;
19 class AliHLTTPCCATrack;
20 class AliHLTTPCCATrackParam;
21 class AliHLTTPCCAPerformance;
22 class TCanvas;
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"
30
31
32
33 /**
34  * @class AliHLTTPCCADisplay
35  */
36 class AliHLTTPCCADisplay
37 {
38
39  public:
40   
41   class AliHLTTPCCADisplayTmpHit;
42
43   static AliHLTTPCCADisplay &Instance();
44   
45   AliHLTTPCCADisplay();
46   AliHLTTPCCADisplay( const AliHLTTPCCADisplay& );
47   const AliHLTTPCCADisplay& operator=(const AliHLTTPCCADisplay&) const ;
48
49   virtual ~AliHLTTPCCADisplay();
50
51   void Init();
52   void Update();
53   void ClearView();
54   void Ask();
55   void SetSliceView();
56   void SetTPCView();
57   void SetCurrentSlice( AliHLTTPCCATracker *slice ); 
58   void SetGB( AliHLTTPCCAGBTracker * const GBTracker );   
59   void Set2Slices( AliHLTTPCCATracker * const slice );
60
61   Int_t GetColor( Int_t i ) const;
62   Int_t GetColorZ( Double_t z ) const ;
63   Int_t GetColorY( Double_t y ) const ;
64   Int_t GetColorK( Double_t k ) const ;
65   void Global2View( Double_t x, Double_t y, Double_t *xv, Double_t *yv ) const ;
66   void Slice2View( Double_t x, Double_t y, Double_t *xv, Double_t *yv ) const ;
67   Int_t GetTrackMC( const AliHLTTPCCADisplayTmpHit *vHits, Int_t NHits );
68
69   void DrawTPC();
70   void DrawSlice( AliHLTTPCCATracker *slice, Bool_t DrawRows=0 ); 
71   void DrawSliceOutTrack( Int_t itr, Int_t color=-1, Int_t width = -1  );
72   void DrawSliceOutTrack( AliHLTTPCCATrackParam &t, Double_t Alpha, Int_t itr, Int_t color=-1, Int_t width = -1  );
73   void DrawSliceTrack( Int_t itr, Int_t color=-1);
74   Bool_t DrawTrack( AliHLTTPCCATrackParam t, Double_t Alpha, const AliHLTTPCCADisplayTmpHit *vHits, 
75                     Int_t NHits, Int_t color=-1, Int_t width=-1, Bool_t pPoint=0 );
76
77   void DrawGBTrack( Int_t itr, Int_t color=-1, Int_t width=-1 );
78   void DrawGBTrackFast( AliHLTTPCCAGBTracker &tracker, Int_t itr, Int_t color=-1 );
79   Bool_t DrawTracklet( AliHLTTPCCATrackParam &track, const Int_t *hitstore, Int_t color=-1, Int_t width=-1, Bool_t pPoint=0 );
80  
81   void DrawGBHit( AliHLTTPCCAGBTracker &tracker, Int_t iHit, Int_t color=-1, Size_t width =-1 );
82   void DrawGBHits( AliHLTTPCCAGBTracker &tracker, Int_t color=-1, Size_t width =-1 );
83
84   void DrawSliceHit( Int_t iRow,Int_t iHit, Int_t color=-1, Size_t width=-1 );
85   void DrawSliceHits(Int_t color=-1, Size_t width=-1 );
86   void DrawSliceLinks(Int_t colorUp=-1, Int_t colorDn=-1,Int_t width=-1 );
87   void DrawSliceLink(Int_t iRow, Int_t iHit, Int_t colorUp=-1, Int_t colorDn=-1,Int_t width=-1 );
88
89 #ifdef XXXX
90
91   void DrawMergedHit( Int_t iRow, Int_t iHit, Int_t color=-1 );
92
93   void DrawTrack( AliHLTTPCCATrack &track, Int_t color=-1, Bool_t DrawCells=1 );
94   void DrawTrackletPoint( AliHLTTPCCATrackParam &t, Int_t color=-1 );
95 #endif // XXXX
96
97   void SetSliceTransform( Double_t alpha );
98
99   void SetSliceTransform( AliHLTTPCCATracker *slice );
100
101   TCanvas *CanvasYX() const { return fYX; }
102   TCanvas *CanvasZX() const { return fZX; }
103
104  protected:
105
106   TCanvas *fYX, *fZX;               // two views
107   Bool_t fAsk;                      // flag to ask for the pressing key
108   Bool_t 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_t fCos, fSin, fZMin, fZMax, fYMin, fYMax;// view parameters
113   Double_t fSliceCos, fSliceSin;        // current slice angle
114   Double_t fRInnerMin, fRInnerMax, fROuterMin, fROuterMax,fTPCZMin, fTPCZMax; // view parameters
115
116   TArc fArc;       // parameters of drawing objects are copied from this members
117   TLine fLine;     //!
118   TPolyLine fPLine;//!
119   TMarker fMarker; //!
120   TBox fBox;       //!
121   TCrown fCrown;   //!
122   TLatex fLatex;   //!
123
124   Bool_t fDrawOnlyRef; // draw only clusters from ref. mc tracks
125
126 };
127
128 #endif