3 // Original: AliHLTDisplay.h,v 1.14 2004/06/30 08:30:14 loizides
5 #ifndef ALIHLTTPCDISPLAY_H
6 #define ALIHLTTPCDISPLAY_H
8 /** \class AliHLTTPCDisplay
10 //_____________________________________________________________
13 // Display class for the HLT TPC events.
16 // Author: Jochen Thaeder <mailto:thaeder@kip.uni-heidelberg.de>
17 // Anders Vestbo <mailto:vestbo@fi.uib.no>
18 //*-- Copyright © ALICE HLT Group
20 #include <TGeometry.h>
25 #include "AliHLTLogging.h"
27 class AliHLTTPCSpacePointData;
28 class AliHLTTPCTrackArray;
30 class AliHLTTPCDisplay : public TObject, public AliHLTLogging {
33 AliHLTTPCDisplay(Char_t *gfile="$(ALIHLT_BASEDIR)/geo/alice.geom") {InitDisplay(gfile);}
34 virtual ~AliHLTTPCDisplay();
36 void InitDisplay(Char_t *gfile);
40 void SetupCluster(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data);
41 void SetupTracks(AliHLTTPCTrackArray *tracks);
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();
51 void DrawHistPadRow();
52 void DrawGeomSector(Int_t sector);
56 void DrawHistResiduals(Bool_t ySwitch);
57 void DrawHistCharge();
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();}
66 void SetPad(Int_t f){fPad = f;}
67 void SetPadRow(Int_t f){fPadRow = f;}
68 void SetSlicePadRow(Int_t f){fSlicePadRow = f;}
70 void SetMinHits(Int_t f){fMinHits = f;}
71 void SetPtThreshold(Float_t f){fPtThreshold = f;}
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;}
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;}
84 void SetHistPadRowAxis();
86 void SetInvert() {Int_t tmp = fBackColor; fBackColor = fLineColor; fLineColor = tmp; }
87 void SetKeepView(Bool_t f){fKeepView = f;}
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;}
96 Bool_t Get3DSwitchTracks() {return fSwitch3DTracks;}
97 Bool_t Get3DSwitchCluster() {return fSwitch3DCluster;}
98 Bool_t Get3DSwitchPadRow() {return fSwitch3DPadRow;}
100 Bool_t GetSelectTrackSwitch() {return fSelectTrackSwitch;}
105 struct AliHLTTPCTrackParameter{
122 AliHLTTPCTrackParameter fTrackParam;
124 // ---------------------------------------------------
125 // In order to be backward compatible
126 // ---------------------------------------------------
128 AliHLTTPCDisplay(Int_t *slice, Char_t *gfile ) { InitDisplay(gfile);}
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);
137 // ---------------------------------------------------
139 // ---------------------------------------------------
140 // In order to be backward compatible
141 // ---------------------------------------------------
143 // ---------------------------------------------------
144 Bool_t LoadGeometrie(Char_t *gfile);
145 void SetSliceArray();
147 AliHLTTPCDisplay(const AliHLTTPCDisplay &/*d*/):TObject(){;}
148 AliHLTTPCDisplay& operator=(const AliHLTTPCDisplay &/*d*/){return *this;}
150 AliHLTTPCSpacePointData *fClusters[36][6];
151 AliHLTTPCTrackArray *fTracks;
153 UInt_t fNcl[36][6];//number of cluster
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
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
170 TGeometry *fGeom; // geometry
171 Int_t fBackColor; // Background color
172 Int_t fLineColor; // Line color
173 Bool_t fKeepView; // Keep View when redisplaying
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
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
187 Int_t fSelectCluster; // select all=0, used=1, unused=2 cluster
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
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
199 Bool_t fSwitch3DCluster;
200 Bool_t fSwitch3DTracks;
201 Bool_t fSwitch3DPadRow;
202 Bool_t fSwitch3DGeometry;
204 ClassDef(AliHLTTPCDisplay,1) //Display class