]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TPCLib/AliHLTTPCDisplay.h
Added total charge histogram, allresiduals histogram and graphs for the residuals...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDisplay.h
CommitLineData
a6c02c85 1// @(#) $Id$
2
3#ifndef ALIHLTTPCDISPLAY_H
4#define ALIHLTTPCDISPLAY_H
5
6/** \class AliHLTTPCDisplay
7<pre>
8//_____________________________________________________________
9// AliHLTTPCDisplay
10//
44be0fde 11// Display class for the HLT TPC events.
a6c02c85 12</pre>
13*/
44be0fde 14// Author: Jochen Thaeder <mailto:thaeder@kip.uni-heidelberg.de>
15// Anders Vestbo <mailto:vestbo@fi.uib.no>
a6c02c85 16//*-- Copyright &copy ALICE HLT Group
17
44be0fde 18#include <TGeometry.h>
a6c02c85 19#include <TObject.h>
20#include <TCanvas.h>
c846a312 21#include <TH2.h>
23c36ba2 22#include <TGraph.h>
c846a312 23
a6c02c85 24class AliHLTTPCSpacePointData;
25class AliHLTTPCTrackArray;
26
27class AliHLTTPCDisplay : public TObject {
28
29 public:
44be0fde 30 AliHLTTPCDisplay(Char_t *gfile="$(ALIHLT_BASEDIR)/geo/alice.geom");
a6c02c85 31 virtual ~AliHLTTPCDisplay();
32
c846a312 33 // SETUP
23c36ba2 34 void SetupHist();
44be0fde 35 void SetupCluster(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data);
36 void SetupTracks(AliHLTTPCTrackArray *tracks);
37
23c36ba2 38 // HISTOGRAM FILL/RESET FUNCTIONS
39
44be0fde 40 void FillPadRow(Int_t patch, ULong_t dataBlock, ULong_t dataLen);
41 void ResetHistPadRow();
23c36ba2 42 void ResetHistResiduals();
43 void ResetHistCharge();
44be0fde 44
45 // DRAWER
46 void Draw3D();
47 void DrawHistPadRow();
48 void DrawGeomSector(Int_t sector);
49 void DrawHistPad1();
50 void DrawHistPad2();
51 void DrawHistPad3();
23c36ba2 52 void DrawHistResiduals();
53 void DrawHistCharge();
54
44be0fde 55 // SETTER
56 void SetSliceArray();
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();}
62 void SetPad(Int_t f){fPad = f;}
63 void SetPadRow(Int_t f){fPadRow = f;}
64 void SetSlicePadRow(Int_t f){fSlicePadRow = f;}
65 void SetMinHits(Int_t f){fMinHits = f;}
66 void SetPtThreshold(Float_t f){fPtThreshold = f;}
67 void SetSwitches(Bool_t f1, Bool_t f2, Bool_t f3, Bool_t f4) {fSwitch3DTracks = f1; fSwitch3DCluster = f2; fSwitch3DPadRow = f3; fSwitch3DGeometry = f4;}
68 void SetHistPadRowAxis();
69 void SetSelectTrack(Int_t f) {fSelectTrack = f;}
70 void SetSelectTrackSlice(Int_t f) {fSelectTrackSlice = f;}
71 void SetSelectTrackSwitch(Bool_t f) {fSelectTrackSwitch = f;}
72 void SetSelectCluster(Int_t f) {fSelectCluster = f;}
73 void SetInvert() {Int_t tmp = fBackColor; fBackColor = fLineColor; fLineColor = tmp; }
74 void SetKeepView(Bool_t f){fKeepView = f;}
a6c02c85 75
c846a312 76 // GETTER
44be0fde 77 Int_t GetPadRow(){return fPadRow;}
78 Int_t GetSlicePadRow(){return fSlicePadRow;}
79 Int_t GetNPads(){return fNPads;}
80 Int_t GetBackColor() {return fBackColor;}
c846a312 81
23c36ba2 82 struct AliHLTTPCTrackParameter{
83 Int_t nHits;
84 Int_t charge;
85 Double_t kappa;
86 Double_t radius;
87 Double_t xyzF[3];
88 Double_t xyzL[3];
89 Int_t slice;
90 Double_t phi0;
91 Double_t psi;
92 Double_t lambda;
93 Double_t pt;
94 Int_t id;
95 Double_t bfield;
96 };
97
98 AliHLTTPCTrackParameter fTrackParam;
99
44be0fde 100 private:
23c36ba2 101
c846a312 102 Bool_t LoadGeometrie(Char_t *gfile);
c846a312 103
a6c02c85 104 AliHLTTPCDisplay(const AliHLTTPCDisplay &/*d*/):TObject(){;}
105 AliHLTTPCDisplay& operator=(const AliHLTTPCDisplay &/*d*/){return *this;}
106
44be0fde 107 AliHLTTPCSpacePointData *fClusters[36][6];
108 AliHLTTPCTrackArray *fTracks;
109
110 UInt_t fNcl[36][6];//number of cluster
111
112 TH1F *fHistrawcl; // histogram for cluster in padrow
113 TH2F *fHistraw; // histogram for signals in padrow
114 TH1F *fHistpad1; // histogram for pad in padrow
115 TH1F *fHistpad2; // histogram for pad in padrow
116 TH1F *fHistpad3; // histogram for pad in padrow
23c36ba2 117 TH1F *fHistallresiduals;//histogram for all residuals
118 TH1F *fHistcharge; // histogram for clustercharge
119
120 TGraph *fGraphresiduals; // graph of the residuals for one track
44be0fde 121
122 TGeometry *fGeom; // geometry
123 Int_t fBackColor; // Background color
124 Int_t fLineColor; // Line color
125 Bool_t fKeepView; // Keep View when redisplaying
c846a312 126
44be0fde 127 Int_t fPad; // pad
c846a312 128 Int_t fPadRow; // padrow
44be0fde 129 Int_t fSlicePadRow;// slice where padrow is in
c846a312 130 Int_t fNPads; // number of pads in padrow
131 Int_t fNTimes; // number of timebins
44be0fde 132 Int_t fMinHits; // minimum cluster per track
133 Float_t fPtThreshold;// pt threshold for tracks
134
135 Bool_t fSelectTrackSwitch;// switch ti single track mode
136 Int_t fSelectTrack;// select single track
137 Int_t fSelectTrackSlice; // select slice for single track
138
139 Int_t fSelectCluster; // select all=0, used=1, unused=2 cluster
140
141 Int_t fMinSlice; //min slice
142 Int_t fMaxSlice; //max slice
143 Bool_t fSlicePair; //draw pair of slices;
144 Bool_t fSliceArray[36];//Array if slice should be drawn or not
145
146 Bool_t fDrawGeo;
c846a312 147 Int_t fcolorbin[20]; // number of entries per colorbin
148 Int_t fbinct[20]; // index of colorbin
149 Float_t *fpmarr[20]; // contains point data
150
44be0fde 151 Bool_t fSwitch3DCluster;
152 Bool_t fSwitch3DTracks;
153 Bool_t fSwitch3DPadRow;
154 Bool_t fSwitch3DGeometry;
155
a6c02c85 156 ClassDef(AliHLTTPCDisplay,1) //Display class
157};
158
159#endif