3 #ifndef ALIHLTTPCDISPLAY_H
4 #define ALIHLTTPCDISPLAY_H
6 /** \class AliHLTTPCDisplay
8 //_____________________________________________________________
11 // Display class for the HLT TPC events.
14 // Author: Jochen Thaeder <mailto:thaeder@kip.uni-heidelberg.de>
15 // Anders Vestbo <mailto:vestbo@fi.uib.no>
16 //*-- Copyright © ALICE HLT Group
18 #include <TGeometry.h>
24 class AliHLTTPCSpacePointData;
25 class AliHLTTPCTrackArray;
27 class AliHLTTPCDisplay : public TObject {
30 AliHLTTPCDisplay(Char_t *gfile="$(ALIHLT_BASEDIR)/geo/alice.geom") {InitDisplay(gfile);}
31 virtual ~AliHLTTPCDisplay();
33 void InitDisplay(Char_t *gfile);
37 void SetupCluster(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data);
38 void SetupTracks(AliHLTTPCTrackArray *tracks);
40 // HISTOGRAM FILL/RESET FUNCTIONS
41 void FillPadRow(Int_t patch, ULong_t dataBlock, ULong_t dataLen);
42 void ResetHistPadRow();
43 void ResetHistResiduals();
44 void ResetHistCharge();
48 void DrawHistPadRow();
49 void DrawGeomSector(Int_t sector);
53 void DrawHistResiduals(Bool_t ySwitch);
54 void DrawHistCharge();
57 void SetSlices(){fMinSlice = 0; fMaxSlice = 35; fSlicePair = kFALSE; SetSliceArray();}
58 void SetSlices(Int_t s){fMinSlice = s; fMaxSlice = s; fSlicePair = kFALSE; SetSliceArray();}
59 void SetSlices(Int_t mins, Int_t maxs){fMinSlice = mins; fMaxSlice = maxs; fSlicePair = kFALSE; SetSliceArray();}
60 void SetSlicesPair(Int_t s){fMinSlice = s; fMaxSlice = s; fSlicePair = kTRUE; SetSliceArray();}
61 void SetSlicesPair(Int_t mins, Int_t maxs){fMinSlice = mins; fMaxSlice = maxs; fSlicePair = kTRUE; SetSliceArray();}
63 void SetPad(Int_t f){fPad = f;}
64 void SetPadRow(Int_t f){fPadRow = f;}
65 void SetSlicePadRow(Int_t f){fSlicePadRow = f;}
67 void SetMinHits(Int_t f){fMinHits = f;}
68 void SetPtThreshold(Float_t f){fPtThreshold = f;}
70 void SetSwitches(Bool_t f1, Bool_t f2, Bool_t f3, Bool_t f4) {fSwitch3DTracks = f1; fSwitch3DCluster = f2; fSwitch3DPadRow = f3; fSwitch3DGeometry = f4;}
71 void Set3DSwitchTracks(Bool_t f1) {fSwitch3DTracks = f1;}
72 void Set3DSwitchCluster(Bool_t f1) {fSwitch3DCluster = f1;}
73 void Set3DSwitchPadRow(Bool_t f1) {fSwitch3DPadRow = f1;}
74 void Set3DSwitchGeometry(Bool_t f1) {fSwitch3DGeometry = f1;}
76 void SetSelectTrack(Int_t f) {fSelectTrack = f;}
77 void SetSelectTrackSlice(Int_t f) {fSelectTrackSlice = f;}
78 void SetSelectTrackSwitch(Bool_t f) {fSelectTrackSwitch = f;}
79 void SetSelectCluster(Int_t f) {fSelectCluster = f;}
81 void SetHistPadRowAxis();
83 void SetInvert() {Int_t tmp = fBackColor; fBackColor = fLineColor; fLineColor = tmp; }
84 void SetKeepView(Bool_t f){fKeepView = f;}
87 Int_t GetPadRow(){return fPadRow;}
88 Int_t GetSlicePadRow(){return fSlicePadRow;}
89 Int_t GetNPads(){return fNPads;}
90 Int_t GetBackColor(){return fBackColor;}
91 Bool_t GetKeepView(){return fKeepView;}
93 Bool_t Get3DSwitchTracks() {return fSwitch3DTracks;}
94 Bool_t Get3DSwitchCluster() {return fSwitch3DCluster;}
95 Bool_t Get3DSwitchPadRow() {return fSwitch3DPadRow;}
97 Bool_t GetSelectTrackSwitch() {return fSelectTrackSwitch;}
99 struct AliHLTTPCTrackParameter{
116 AliHLTTPCTrackParameter fTrackParam;
118 // ---------------------------------------------------
119 // In order to be backward compatible
120 // ---------------------------------------------------
122 AliHLTTPCDisplay(Int_t *slice, Char_t *gfile ) { InitDisplay(gfile);}
125 void SetupClusterDataForPatch(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data) {SetupCluster(slice, patch, nofClusters, data);}
126 void SetTracks(AliHLTTPCTrackArray *tracks) { SetupTracks(tracks);}
127 void DisplayClusters(Bool_t x3don=kTRUE,Float_t* etaRange=NULL);
128 void DisplayTracks(Int_t minhits=10,Bool_t x3don=kTRUE,Float_t thr=0.);
129 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);
131 // ---------------------------------------------------
133 // ---------------------------------------------------
134 // In order to be backward compatible
135 // ---------------------------------------------------
137 // ---------------------------------------------------
138 Bool_t LoadGeometrie(Char_t *gfile);
139 void SetSliceArray();
141 AliHLTTPCDisplay(const AliHLTTPCDisplay &/*d*/):TObject(){;}
142 AliHLTTPCDisplay& operator=(const AliHLTTPCDisplay &/*d*/){return *this;}
144 AliHLTTPCSpacePointData *fClusters[36][6];
145 AliHLTTPCTrackArray *fTracks;
147 UInt_t fNcl[36][6];//number of cluster
149 TH1F *fHistrawcl; // histogram for cluster in padrow
150 TH2F *fHistraw; // histogram for signals in padrow
151 TH1F *fHistpad1; // histogram for pad in padrow
152 TH1F *fHistpad2; // histogram for pad in padrow
153 TH1F *fHistpad3; // histogram for pad in padrow
154 TH1F *fHistallresidualsY;//histogram for all Y residuals
155 TH1F *fHistallresidualsZ;//histogram for all Z residuals
156 TH1F *fHistcharge; // histogram for clustercharge
158 TGraph *fGraphresidualsY; // graph of the Y residuals for one track
159 TGraph *fGraphresidualsZ; // graph of the Z residuals for one track
160 TGraph *fGraphresidualsYLength; // graph of the Y residuals for one track
161 TGraph *fGraphresidualsZLength; // graph of the Z residuals for one track
164 TGeometry *fGeom; // geometry
165 Int_t fBackColor; // Background color
166 Int_t fLineColor; // Line color
167 Bool_t fKeepView; // Keep View when redisplaying
170 Int_t fPadRow; // padrow
171 Int_t fSlicePadRow;// slice where padrow is in
172 Int_t fNPads; // number of pads in padrow
173 Int_t fNTimes; // number of timebins
174 Int_t fMinHits; // minimum cluster per track
175 Float_t fPtThreshold;// pt threshold for tracks
177 Bool_t fSelectTrackSwitch;// switch ti single track mode
178 Int_t fSelectTrack;// select single track
179 Int_t fSelectTrackSlice; // select slice for single track
181 Int_t fSelectCluster; // select all=0, used=1, unused=2 cluster
183 Int_t fMinSlice; //min slice
184 Int_t fMaxSlice; //max slice
185 Bool_t fSlicePair; //draw pair of slices;
186 Bool_t fSliceArray[36];//Array if slice should be drawn or not
189 Int_t fcolorbin[20]; // number of entries per colorbin
190 Int_t fbinct[20]; // index of colorbin
191 Float_t *fpmarr[20]; // contains point data
193 Bool_t fSwitch3DCluster;
194 Bool_t fSwitch3DTracks;
195 Bool_t fSwitch3DPadRow;
196 Bool_t fSwitch3DGeometry;
198 ClassDef(AliHLTTPCDisplay,1) //Display class