L3 becomes HLT
[u/mrichter/AliRoot.git] / HLT / TPCLib / OnlineDisplay / AliHLTTPCDisplay.h
CommitLineData
9e0f7672 1// XEmacs -*-C++-*-
2// @(#) $Id$
4aa41877 3// Original: AliHLTDisplay.h,v 1.14 2004/06/30 08:30:14 loizides
9e0f7672 4
5#ifndef ALIHLTTPCDISPLAY_H
6#define ALIHLTTPCDISPLAY_H
7
8/** \class AliHLTTPCDisplay
9<pre>
10//_____________________________________________________________
11// AliHLTTPCDisplay
12//
13// Display class for the HLT TPC events.
14</pre>
15*/
16// Author: Jochen Thaeder <mailto:thaeder@kip.uni-heidelberg.de>
17// Anders Vestbo <mailto:vestbo@fi.uib.no>
18//*-- Copyright &copy ALICE HLT Group
19
20#include <TGeometry.h>
21#include <TObject.h>
22#include <TCanvas.h>
23#include <TH2.h>
24#include <TGraph.h>
25#include "AliHLTLogging.h"
26
27class AliHLTTPCSpacePointData;
28class AliHLTTPCTrackArray;
29
30class AliHLTTPCDisplay : public TObject, public AliHLTLogging {
31
32 public:
33 AliHLTTPCDisplay(Char_t *gfile="$(ALIHLT_BASEDIR)/geo/alice.geom") {InitDisplay(gfile);}
34 virtual ~AliHLTTPCDisplay();
35
36 void InitDisplay(Char_t *gfile);
37
38 // SETUP
39 void SetupHist();
40 void SetupCluster(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data);
41 void SetupTracks(AliHLTTPCTrackArray *tracks);
42
43 // HISTOGRAM FILL/RESET FUNCTIONS
44 void FillPadRow(Int_t patch, ULong_t dataBlock, ULong_t dataLen);
45 void ResetHistPadRow();
46 void ResetHistResiduals();
47 void ResetHistCharge();
48
49 // DRAWER
50 void Draw3D();
51 void DrawHistPadRow();
52 void DrawGeomSector(Int_t sector);
53 void DrawHistPad1();
54 void DrawHistPad2();
55 void DrawHistPad3();
56 void DrawHistResiduals(Bool_t ySwitch);
57 void DrawHistCharge();
58
59 // SETTER
60 void SetSlices(){fMinSlice = 0; fMaxSlice = 35; fSlicePair = kFALSE; SetSliceArray();}
61 void SetSlices(Int_t s){fMinSlice = s; fMaxSlice = s; fSlicePair = kFALSE; SetSliceArray();}
62 void SetSlices(Int_t mins, Int_t maxs){fMinSlice = mins; fMaxSlice = maxs; fSlicePair = kFALSE; SetSliceArray();}
63 void SetSlicesPair(Int_t s){fMinSlice = s; fMaxSlice = s; fSlicePair = kTRUE; SetSliceArray();}
64 void SetSlicesPair(Int_t mins, Int_t maxs){fMinSlice = mins; fMaxSlice = maxs; fSlicePair = kTRUE; SetSliceArray();}
65
66 void SetPad(Int_t f){fPad = f;}
67 void SetPadRow(Int_t f){fPadRow = f;}
68 void SetSlicePadRow(Int_t f){fSlicePadRow = f;}
69
70 void SetMinHits(Int_t f){fMinHits = f;}
71 void SetPtThreshold(Float_t f){fPtThreshold = f;}
72
73 void SetSwitches(Bool_t f1, Bool_t f2, Bool_t f3, Bool_t f4) {fSwitch3DTracks = f1; fSwitch3DCluster = f2; fSwitch3DPadRow = f3; fSwitch3DGeometry = f4;}
74 void Set3DSwitchTracks(Bool_t f1) {fSwitch3DTracks = f1;}
75 void Set3DSwitchCluster(Bool_t f1) {fSwitch3DCluster = f1;}
76 void Set3DSwitchPadRow(Bool_t f1) {fSwitch3DPadRow = f1;}
77 void Set3DSwitchGeometry(Bool_t f1) {fSwitch3DGeometry = f1;}
78
79 void SetSelectTrack(Int_t f) {fSelectTrack = f;}
80 void SetSelectTrackSlice(Int_t f) {fSelectTrackSlice = f;}
81 void SetSelectTrackSwitch(Bool_t f) {fSelectTrackSwitch = f;}
82 void SetSelectCluster(Int_t f) {fSelectCluster = f;}
83
84 void SetHistPadRowAxis();
85
86 void SetInvert() {Int_t tmp = fBackColor; fBackColor = fLineColor; fLineColor = tmp; }
87 void SetKeepView(Bool_t f){fKeepView = f;}
88
89 // GETTER
90 Int_t GetPadRow(){return fPadRow;}
91 Int_t GetSlicePadRow(){return fSlicePadRow;}
92 Int_t GetNPads(){return fNPads;}
93 Int_t GetBackColor(){return fBackColor;}
94 Bool_t GetKeepView(){return fKeepView;}
95
96 Bool_t Get3DSwitchTracks() {return fSwitch3DTracks;}
97 Bool_t Get3DSwitchCluster() {return fSwitch3DCluster;}
98 Bool_t Get3DSwitchPadRow() {return fSwitch3DPadRow;}
99
100 Bool_t GetSelectTrackSwitch() {return fSelectTrackSwitch;}
101
102 // EXECUTER
103 void ExecPadRow();
104
105 struct AliHLTTPCTrackParameter{
106 Int_t nHits;
107 Int_t charge;
108 Double_t kappa;
109 Double_t radius;
110 Double_t xyzF[3];
111 Double_t xyzL[3];
112 Int_t slice;
113 Double_t phi0;
114 Double_t psi;
115 Double_t lambda;
116 Double_t pt;
117 Int_t id;
118 Double_t bfield;
119 Double_t s;
120 };
121
122 AliHLTTPCTrackParameter fTrackParam;
123
124// ---------------------------------------------------
125// In order to be backward compatible
126// ---------------------------------------------------
127/*
128 AliHLTTPCDisplay(Int_t *slice, Char_t *gfile ) { InitDisplay(gfile);}
129
130 // SETUP
131 void SetupClusterDataForPatch(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data) {SetupCluster(slice, patch, nofClusters, data);}
132 void SetTracks(AliHLTTPCTrackArray *tracks) { SetupTracks(tracks);}
133 void DisplayClusters(Bool_t x3don=kTRUE,Float_t* etaRange=NULL);
134 void DisplayTracks(Int_t minhits=10,Bool_t x3don=kTRUE,Float_t thr=0.);
135 void DisplayAll(Int_t minhits=10,Bool_t clusterswitch=kTRUE,Bool_t trackswitch=kTRUE,Bool_t x3don=kTRUE, Float_t thr=0., Float_t* etaRange=NULL);
136*/
137// ---------------------------------------------------
138 private:
139// ---------------------------------------------------
140// In order to be backward compatible
141// ---------------------------------------------------
142/* TCanvas *fc1; */
143// ---------------------------------------------------
144 Bool_t LoadGeometrie(Char_t *gfile);
145 void SetSliceArray();
146
147 AliHLTTPCDisplay(const AliHLTTPCDisplay &/*d*/):TObject(){;}
148 AliHLTTPCDisplay& operator=(const AliHLTTPCDisplay &/*d*/){return *this;}
149
150 AliHLTTPCSpacePointData *fClusters[36][6];
151 AliHLTTPCTrackArray *fTracks;
152
153 UInt_t fNcl[36][6];//number of cluster
154
155 TH1F *fHistrawcl; // histogram for cluster in padrow
156 TH2F *fHistraw; // histogram for signals in padrow
157 TH1F *fHistpad1; // histogram for pad in padrow
158 TH1F *fHistpad2; // histogram for pad in padrow
159 TH1F *fHistpad3; // histogram for pad in padrow
160 TH1F *fHistallresidualsY;//histogram for all Y residuals
161 TH1F *fHistallresidualsZ;//histogram for all Z residuals
162 TH1F *fHistcharge; // histogram for clustercharge
163
164 TGraph *fGraphresidualsY; // graph of the Y residuals for one track
165 TGraph *fGraphresidualsZ; // graph of the Z residuals for one track
166 TGraph *fGraphresidualsYLength; // graph of the Y residuals for one track
167 TGraph *fGraphresidualsZLength; // graph of the Z residuals for one track
168
169
170 TGeometry *fGeom; // geometry
171 Int_t fBackColor; // Background color
172 Int_t fLineColor; // Line color
173 Bool_t fKeepView; // Keep View when redisplaying
174
175 Int_t fPad; // pad
176 Int_t fPadRow; // padrow
177 Int_t fSlicePadRow;// slice where padrow is in
178 Int_t fNPads; // number of pads in padrow
179 Int_t fNTimes; // number of timebins
180 Int_t fMinHits; // minimum cluster per track
181 Float_t fPtThreshold;// pt threshold for tracks
182
183 Bool_t fSelectTrackSwitch;// switch ti single track mode
184 Int_t fSelectTrack;// select single track
185 Int_t fSelectTrackSlice; // select slice for single track
186
187 Int_t fSelectCluster; // select all=0, used=1, unused=2 cluster
188
189 Int_t fMinSlice; //min slice
190 Int_t fMaxSlice; //max slice
191 Bool_t fSlicePair; //draw pair of slices;
192 Bool_t fSliceArray[36];//Array if slice should be drawn or not
193
194 Bool_t fDrawGeo;
195 Int_t fcolorbin[20]; // number of entries per colorbin
196 Int_t fbinct[20]; // index of colorbin
197 Float_t *fpmarr[20]; // contains point data
198
199 Bool_t fSwitch3DCluster;
200 Bool_t fSwitch3DTracks;
201 Bool_t fSwitch3DPadRow;
202 Bool_t fSwitch3DGeometry;
203
204 ClassDef(AliHLTTPCDisplay,1) //Display class
205};
206
207#endif