]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/tracking-ca/AliHLTTPCCADisplay.h
added offline wrapper for HLT TPC CA tracker (Sergey)
[u/mrichter/AliRoot.git] / HLT / TPCLib / tracking-ca / AliHLTTPCCADisplay.h
CommitLineData
326c2d4b 1//-*- Mode: C++ -*-
2// @(#) $Id$
3
dc4788ec 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//* *
9//* AliHLTTPCCADisplay class is a debug utility. *
10//* It is not used in the normal data processing. *
11//* *
326c2d4b 12
13#ifndef ALIHLTTPCCADISPLAY_H
14#define ALIHLTTPCCADISPLAY_H
15
16class AliHLTTPCCATracker;
17class AliHLTTPCCACell;
18class AliHLTTPCCATrack;
d54804bf 19class AliHLTTPCCATrackParam;
dc4788ec 20class TCanvas;
d54804bf 21#include "TObject.h"
326c2d4b 22#include "TArc.h"
23#include "TLine.h"
24#include "TPolyLine.h"
25#include "TBox.h"
26#include "TCrown.h"
27#include "TMarker.h"
28#include "TLatex.h"
29
30
31/**
32 * @class AliHLTTPCCADisplay
33 */
d54804bf 34class AliHLTTPCCADisplay:public TObject
326c2d4b 35{
36 public:
37
38 static AliHLTTPCCADisplay &Instance();
39
40 AliHLTTPCCADisplay();
41 AliHLTTPCCADisplay( const AliHLTTPCCADisplay& );
42 AliHLTTPCCADisplay& operator=(const AliHLTTPCCADisplay&);
43
44 virtual ~AliHLTTPCCADisplay();
45
46 void Init();
47 void Update();
d54804bf 48 void ClearView();
326c2d4b 49 void Ask();
d54804bf 50 void SetSliceView();
326c2d4b 51 void SetTPCView();
d54804bf 52 void SetCurrentSlice( AliHLTTPCCATracker *slice );
53 void Set2Slices( AliHLTTPCCATracker *slice );
326c2d4b 54
55 Int_t GetColor( Double_t z ) const ;
56 void Global2View( Double_t x, Double_t y, Double_t *xv, Double_t *yv ) const ;
d54804bf 57 void Slice2View( Double_t x, Double_t y, Double_t *xv, Double_t *yv ) const ;
326c2d4b 58
59 void DrawTPC();
d54804bf 60 void DrawSlice( AliHLTTPCCATracker *slice );
326c2d4b 61
62 void DrawHit( Int_t iRow,Int_t iHit, Int_t color=-1 );
63 void DrawCell( Int_t iRow, AliHLTTPCCACell &cell, Int_t width=1, Int_t color=-1 );
64 void DrawCell( Int_t iRow, Int_t iCell, Int_t width=1, Int_t color=-1 );
65
d54804bf 66 void DrawEndPoint( Int_t ID, Float_t R, Int_t width=1, Int_t color=-1 );
67 void ConnectEndPoints( Int_t iID, Int_t jID, Float_t R, Int_t width=1, Int_t color=-1 );
68
326c2d4b 69 void ConnectCells( Int_t iRow1, AliHLTTPCCACell &cell1, Int_t iRow2, AliHLTTPCCACell &cell2, Int_t color=-1 );
70
d54804bf 71 void DrawTrack1( AliHLTTPCCATrack &track, Int_t color=-1, Bool_t DrawCells=1 );
72 void DrawTrackletPoint( AliHLTTPCCATrackParam &t, Int_t color=-1 );
73
74 void SetSliceTransform( Double_t alpha );
75
76 void SetSliceTransform( AliHLTTPCCATracker *slice );
77
326c2d4b 78
79 protected:
80
dc4788ec 81 TCanvas *fYX, *fZX; // two views
326c2d4b 82 Bool_t fAsk; // flag to ask for the pressing key
d54804bf 83 Bool_t fSliceView; // switch between slice/TPC zoom
84 AliHLTTPCCATracker *fSlice; // current CA tracker, includes slice geometry
326c2d4b 85 Double_t fCos, fSin, fZMin, fZMax;// view parameters
d54804bf 86 Double_t fSliceCos, fSliceSin; // current slice angle
326c2d4b 87 Double_t fRInnerMin, fRInnerMax, fROuterMin, fROuterMax,fTPCZMin, fTPCZMax; // view parameters
88
89 TArc fArc; // parameters of drawing objects are copied from this members
90 TLine fLine; //!
91 TPolyLine fPLine;//!
92 TMarker fMarker; //!
93 TBox fBox; //!
94 TCrown fCrown; //!
95 TLatex fLatex; //!
96
dc4788ec 97 class AliHLTTPCCADisplayTmpCell{
d54804bf 98
dc4788ec 99 public:
d54804bf 100 Int_t &ID(){ return fCellID; }
dc4788ec 101 Double_t &S(){ return fS; }
d54804bf 102 Double_t &Z(){ return fZ; }
dc4788ec 103
104 static Bool_t CompareCellDS( const AliHLTTPCCADisplayTmpCell &a,
105 const AliHLTTPCCADisplayTmpCell &b )
106 {
107 return (a.fS < b.fS);
108 }
d54804bf 109 static Bool_t CompareCellZ( const AliHLTTPCCADisplayTmpCell &a,
110 const AliHLTTPCCADisplayTmpCell &b )
111 {
112 return (a.fZ < b.fZ);
113 }
dc4788ec 114 protected:
d54804bf 115 Int_t fCellID; // cell ID
116 Double_t fS; // cell position on the XY track curve
117 Double_t fZ; // cell Z position
dc4788ec 118 };
119
120
326c2d4b 121 ClassDef(AliHLTTPCCADisplay,1);
122
123};
124
125#endif