3 // Original: AliHLTDisplay.h,v 1.14 2004/06/30 08:30:14 loizides
5 //* This file is property of and copyright by the ALICE HLT Project *
6 //* ALICE Experiment at CERN, All rights reserved. *
7 //* See cxx source for full Copyright notice *
9 /** @file AliHLTTPCDisplay.h
10 @author Jochen Thaeder, Anders Vestbo
12 @brief Display class for the HLT TPC events.
15 #ifndef ALIHLTTPCDISPLAY_H
16 #define ALIHLTTPCDISPLAY_H
18 #include <TGeometry.h>
23 #include "AliHLTLogging.h"
25 class AliHLTTPCSpacePointData;
26 class AliHLTTPCTrackArray;
28 class AliHLTTPCDisplay : public TObject, public AliHLTLogging {
31 AliHLTTPCDisplay(Char_t *gfile="$(ALIHLT_BASEDIR)/geo/alice.geom") {InitDisplay(gfile);}
32 virtual ~AliHLTTPCDisplay();
34 void InitDisplay(Char_t *gfile);
38 void SetupCluster(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data);
39 void SetupTracks(AliHLTTPCTrackArray *tracks);
41 // HISTOGRAM FILL/RESET FUNCTIONS
42 void FillPadRow(Int_t patch, ULong_t dataBlock, ULong_t dataLen);
43 void ResetHistPadRow();
44 void ResetHistResiduals();
45 void ResetHistCharge();
49 void DrawHistPadRow();
50 void DrawGeomSector(Int_t sector);
54 void DrawHistResiduals(Bool_t ySwitch);
55 void DrawHistCharge();
58 void SetSlices(){fMinSlice = 0; fMaxSlice = 35; fSlicePair = kFALSE; SetSliceArray();}
59 void SetSlices(Int_t s){fMinSlice = s; fMaxSlice = s; fSlicePair = kFALSE; SetSliceArray();}
60 void SetSlices(Int_t mins, Int_t maxs){fMinSlice = mins; fMaxSlice = maxs; fSlicePair = kFALSE; SetSliceArray();}
61 void SetSlicesPair(Int_t s){fMinSlice = s; fMaxSlice = s; fSlicePair = kTRUE; SetSliceArray();}
62 void SetSlicesPair(Int_t mins, Int_t maxs){fMinSlice = mins; fMaxSlice = maxs; fSlicePair = kTRUE; SetSliceArray();}
64 void SetPad(Int_t f){fPad = f;}
65 void SetPadRow(Int_t f){fPadRow = f;}
66 void SetSlicePadRow(Int_t f){fSlicePadRow = f;}
68 void SetMinHits(Int_t f){fMinHits = f;}
69 void SetPtThreshold(Float_t f){fPtThreshold = f;}
71 void SetSwitches(Bool_t f1, Bool_t f2, Bool_t f3, Bool_t f4) {fSwitch3DTracks = f1; fSwitch3DCluster = f2; fSwitch3DPadRow = f3; fSwitch3DGeometry = f4;}
72 void Set3DSwitchTracks(Bool_t f1) {fSwitch3DTracks = f1;}
73 void Set3DSwitchCluster(Bool_t f1) {fSwitch3DCluster = f1;}
74 void Set3DSwitchPadRow(Bool_t f1) {fSwitch3DPadRow = f1;}
75 void Set3DSwitchGeometry(Bool_t f1) {fSwitch3DGeometry = f1;}
77 void SetSelectTrack(Int_t f) {fSelectTrack = f;}
78 void SetSelectTrackSlice(Int_t f) {fSelectTrackSlice = f;}
79 void SetSelectTrackSwitch(Bool_t f) {fSelectTrackSwitch = f;}
80 void SetSelectCluster(Int_t f) {fSelectCluster = f;}
82 void SetHistPadRowAxis();
84 void SetInvert() {Int_t tmp = fBackColor; fBackColor = fLineColor; fLineColor = tmp; }
85 void SetKeepView(Bool_t f){fKeepView = f;}
88 Int_t GetPadRow(){return fPadRow;}
89 Int_t GetSlicePadRow(){return fSlicePadRow;}
90 Int_t GetNPads(){return fNPads;}
91 Int_t GetBackColor(){return fBackColor;}
92 Bool_t GetKeepView(){return fKeepView;}
94 Bool_t Get3DSwitchTracks() {return fSwitch3DTracks;}
95 Bool_t Get3DSwitchCluster() {return fSwitch3DCluster;}
96 Bool_t Get3DSwitchPadRow() {return fSwitch3DPadRow;}
98 Bool_t GetSelectTrackSwitch() {return fSelectTrackSwitch;}
103 struct AliHLTTPCTrackParameter{
120 AliHLTTPCTrackParameter fTrackParam;
122 // ---------------------------------------------------
123 // In order to be backward compatible
124 // ---------------------------------------------------
126 AliHLTTPCDisplay(Int_t *slice, Char_t *gfile ) { InitDisplay(gfile);}
129 void SetupClusterDataForPatch(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data) {SetupCluster(slice, patch, nofClusters, data);}
130 void SetTracks(AliHLTTPCTrackArray *tracks) { SetupTracks(tracks);}
131 void DisplayClusters(Bool_t x3don=kTRUE,Float_t* etaRange=NULL);
132 void DisplayTracks(Int_t minhits=10,Bool_t x3don=kTRUE,Float_t thr=0.);
133 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);
135 // ---------------------------------------------------
137 // ---------------------------------------------------
138 // In order to be backward compatible
139 // ---------------------------------------------------
141 // ---------------------------------------------------
142 Bool_t LoadGeometrie(Char_t *gfile);
143 void SetSliceArray();
145 AliHLTTPCDisplay(const AliHLTTPCDisplay &/*d*/):TObject(){;}
146 AliHLTTPCDisplay& operator=(const AliHLTTPCDisplay &/*d*/){return *this;}
148 AliHLTTPCSpacePointData *fClusters[36][6];
149 AliHLTTPCTrackArray *fTracks;
151 UInt_t fNcl[36][6];//number of cluster
153 TH1F *fHistrawcl; // histogram for cluster in padrow
154 TH2F *fHistraw; // histogram for signals in padrow
155 TH1F *fHistpad1; // histogram for pad in padrow
156 TH1F *fHistpad2; // histogram for pad in padrow
157 TH1F *fHistpad3; // histogram for pad in padrow
158 TH1F *fHistallresidualsY;//histogram for all Y residuals
159 TH1F *fHistallresidualsZ;//histogram for all Z residuals
160 TH1F *fHistcharge; // histogram for clustercharge
162 TGraph *fGraphresidualsY; // graph of the Y residuals for one track
163 TGraph *fGraphresidualsZ; // graph of the Z residuals for one track
164 TGraph *fGraphresidualsYLength; // graph of the Y residuals for one track
165 TGraph *fGraphresidualsZLength; // graph of the Z residuals for one track
168 TGeometry *fGeom; // geometry
169 Int_t fBackColor; // Background color
170 Int_t fLineColor; // Line color
171 Bool_t fKeepView; // Keep View when redisplaying
174 Int_t fPadRow; // padrow
175 Int_t fSlicePadRow;// slice where padrow is in
176 Int_t fNPads; // number of pads in padrow
177 Int_t fNTimes; // number of timebins
178 Int_t fMinHits; // minimum cluster per track
179 Float_t fPtThreshold;// pt threshold for tracks
181 Bool_t fSelectTrackSwitch;// switch ti single track mode
182 Int_t fSelectTrack;// select single track
183 Int_t fSelectTrackSlice; // select slice for single track
185 Int_t fSelectCluster; // select all=0, used=1, unused=2 cluster
187 Int_t fMinSlice; //min slice
188 Int_t fMaxSlice; //max slice
189 Bool_t fSlicePair; //draw pair of slices;
190 Bool_t fSliceArray[36];//Array if slice should be drawn or not
193 Int_t fcolorbin[20]; // number of entries per colorbin
194 Int_t fbinct[20]; // index of colorbin
195 Float_t *fpmarr[20]; // contains point data
197 Bool_t fSwitch3DCluster;
198 Bool_t fSwitch3DTracks;
199 Bool_t fSwitch3DPadRow;
200 Bool_t fSwitch3DGeometry;
202 ClassDef(AliHLTTPCDisplay,1) //Display class