2 // Original: AliL3Display.h,v 1.14 2004/06/30 08:30:14 loizides
4 #ifndef ALIHLTTPCDISPLAY_H
5 #define ALIHLTTPCDISPLAY_H
7 /** \class AliHLTTPCDisplay
9 //_____________________________________________________________
12 // Display class for the HLT TPC events.
15 // Author: Jochen Thaeder <mailto:thaeder@kip.uni-heidelberg.de>
16 // Anders Vestbo <mailto:vestbo@fi.uib.no>
17 //*-- Copyright © ALICE HLT Group
19 #include <TGeometry.h>
24 #include "AliHLTLogging.h"
26 class AliHLTTPCSpacePointData;
27 class AliHLTTPCTrackArray;
29 class AliHLTTPCDisplay : public TObject, public AliHLTLogging {
32 AliHLTTPCDisplay(Char_t *gfile="$(ALIHLT_BASEDIR)/geo/alice.geom") {InitDisplay(gfile);}
33 virtual ~AliHLTTPCDisplay();
35 void InitDisplay(Char_t *gfile);
39 void SetupCluster(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data);
40 void SetupTracks(AliHLTTPCTrackArray *tracks);
42 // HISTOGRAM FILL/RESET FUNCTIONS
43 void FillPadRow(Int_t patch, ULong_t dataBlock, ULong_t dataLen);
44 void ResetHistPadRow();
45 void ResetHistResiduals();
46 void ResetHistCharge();
50 void DrawHistPadRow();
51 void DrawGeomSector(Int_t sector);
55 void DrawHistResiduals(Bool_t ySwitch);
56 void DrawHistCharge();
59 void SetSlices(){fMinSlice = 0; fMaxSlice = 35; fSlicePair = kFALSE; SetSliceArray();}
60 void SetSlices(Int_t s){fMinSlice = s; fMaxSlice = s; fSlicePair = kFALSE; SetSliceArray();}
61 void SetSlices(Int_t mins, Int_t maxs){fMinSlice = mins; fMaxSlice = maxs; fSlicePair = kFALSE; SetSliceArray();}
62 void SetSlicesPair(Int_t s){fMinSlice = s; fMaxSlice = s; fSlicePair = kTRUE; SetSliceArray();}
63 void SetSlicesPair(Int_t mins, Int_t maxs){fMinSlice = mins; fMaxSlice = maxs; fSlicePair = kTRUE; SetSliceArray();}
65 void SetPad(Int_t f){fPad = f;}
66 void SetPadRow(Int_t f){fPadRow = f;}
67 void SetSlicePadRow(Int_t f){fSlicePadRow = f;}
69 void SetMinHits(Int_t f){fMinHits = f;}
70 void SetPtThreshold(Float_t f){fPtThreshold = f;}
72 void SetSwitches(Bool_t f1, Bool_t f2, Bool_t f3, Bool_t f4) {fSwitch3DTracks = f1; fSwitch3DCluster = f2; fSwitch3DPadRow = f3; fSwitch3DGeometry = f4;}
73 void Set3DSwitchTracks(Bool_t f1) {fSwitch3DTracks = f1;}
74 void Set3DSwitchCluster(Bool_t f1) {fSwitch3DCluster = f1;}
75 void Set3DSwitchPadRow(Bool_t f1) {fSwitch3DPadRow = f1;}
76 void Set3DSwitchGeometry(Bool_t f1) {fSwitch3DGeometry = f1;}
78 void SetSelectTrack(Int_t f) {fSelectTrack = f;}
79 void SetSelectTrackSlice(Int_t f) {fSelectTrackSlice = f;}
80 void SetSelectTrackSwitch(Bool_t f) {fSelectTrackSwitch = f;}
81 void SetSelectCluster(Int_t f) {fSelectCluster = f;}
83 void SetHistPadRowAxis();
85 void SetInvert() {Int_t tmp = fBackColor; fBackColor = fLineColor; fLineColor = tmp; }
86 void SetKeepView(Bool_t f){fKeepView = f;}
89 Int_t GetPadRow(){return fPadRow;}
90 Int_t GetSlicePadRow(){return fSlicePadRow;}
91 Int_t GetNPads(){return fNPads;}
92 Int_t GetBackColor(){return fBackColor;}
93 Bool_t GetKeepView(){return fKeepView;}
95 Bool_t Get3DSwitchTracks() {return fSwitch3DTracks;}
96 Bool_t Get3DSwitchCluster() {return fSwitch3DCluster;}
97 Bool_t Get3DSwitchPadRow() {return fSwitch3DPadRow;}
99 Bool_t GetSelectTrackSwitch() {return fSelectTrackSwitch;}
104 struct AliHLTTPCTrackParameter{
121 AliHLTTPCTrackParameter fTrackParam;
123 // ---------------------------------------------------
124 // In order to be backward compatible
125 // ---------------------------------------------------
127 AliHLTTPCDisplay(Int_t *slice, Char_t *gfile ) { InitDisplay(gfile);}
130 void SetupClusterDataForPatch(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data) {SetupCluster(slice, patch, nofClusters, data);}
131 void SetTracks(AliHLTTPCTrackArray *tracks) { SetupTracks(tracks);}
132 void DisplayClusters(Bool_t x3don=kTRUE,Float_t* etaRange=NULL);
133 void DisplayTracks(Int_t minhits=10,Bool_t x3don=kTRUE,Float_t thr=0.);
134 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 // ---------------------------------------------------
138 // ---------------------------------------------------
139 // In order to be backward compatible
140 // ---------------------------------------------------
142 // ---------------------------------------------------
143 Bool_t LoadGeometrie(Char_t *gfile);
144 void SetSliceArray();
146 AliHLTTPCDisplay(const AliHLTTPCDisplay &/*d*/):TObject(){;}
147 AliHLTTPCDisplay& operator=(const AliHLTTPCDisplay &/*d*/){return *this;}
149 AliHLTTPCSpacePointData *fClusters[36][6];
150 AliHLTTPCTrackArray *fTracks;
152 UInt_t fNcl[36][6];//number of cluster
154 TH1F *fHistrawcl; // histogram for cluster in padrow
155 TH2F *fHistraw; // histogram for signals in padrow
156 TH1F *fHistpad1; // histogram for pad in padrow
157 TH1F *fHistpad2; // histogram for pad in padrow
158 TH1F *fHistpad3; // histogram for pad in padrow
159 TH1F *fHistallresidualsY;//histogram for all Y residuals
160 TH1F *fHistallresidualsZ;//histogram for all Z residuals
161 TH1F *fHistcharge; // histogram for clustercharge
163 TGraph *fGraphresidualsY; // graph of the Y residuals for one track
164 TGraph *fGraphresidualsZ; // graph of the Z residuals for one track
165 TGraph *fGraphresidualsYLength; // graph of the Y residuals for one track
166 TGraph *fGraphresidualsZLength; // graph of the Z residuals for one track
169 TGeometry *fGeom; // geometry
170 Int_t fBackColor; // Background color
171 Int_t fLineColor; // Line color
172 Bool_t fKeepView; // Keep View when redisplaying
175 Int_t fPadRow; // padrow
176 Int_t fSlicePadRow;// slice where padrow is in
177 Int_t fNPads; // number of pads in padrow
178 Int_t fNTimes; // number of timebins
179 Int_t fMinHits; // minimum cluster per track
180 Float_t fPtThreshold;// pt threshold for tracks
182 Bool_t fSelectTrackSwitch;// switch ti single track mode
183 Int_t fSelectTrack;// select single track
184 Int_t fSelectTrackSlice; // select slice for single track
186 Int_t fSelectCluster; // select all=0, used=1, unused=2 cluster
188 Int_t fMinSlice; //min slice
189 Int_t fMaxSlice; //max slice
190 Bool_t fSlicePair; //draw pair of slices;
191 Bool_t fSliceArray[36];//Array if slice should be drawn or not
194 Int_t fcolorbin[20]; // number of entries per colorbin
195 Int_t fbinct[20]; // index of colorbin
196 Float_t *fpmarr[20]; // contains point data
198 Bool_t fSwitch3DCluster;
199 Bool_t fSwitch3DTracks;
200 Bool_t fSwitch3DPadRow;
201 Bool_t fSwitch3DGeometry;
203 ClassDef(AliHLTTPCDisplay,1) //Display class