]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCDisplay.h
Added total charge histogram, allresiduals histogram and graphs for the residuals...
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDisplay.h
1 // @(#) $Id$
2
3 #ifndef ALIHLTTPCDISPLAY_H
4 #define ALIHLTTPCDISPLAY_H
5
6 /** \class AliHLTTPCDisplay
7 <pre>
8 //_____________________________________________________________
9 // AliHLTTPCDisplay
10 //
11 // Display class for the HLT TPC events.
12 </pre>
13 */
14 // Author: Jochen Thaeder <mailto:thaeder@kip.uni-heidelberg.de>
15 //         Anders Vestbo <mailto:vestbo@fi.uib.no>
16 //*-- Copyright &copy ALICE HLT Group 
17
18 #include <TGeometry.h>
19 #include <TObject.h>
20 #include <TCanvas.h>
21 #include <TH2.h>
22 #include <TGraph.h>
23
24 class AliHLTTPCSpacePointData;
25 class AliHLTTPCTrackArray;
26
27 class AliHLTTPCDisplay : public TObject {
28
29  public:
30   AliHLTTPCDisplay(Char_t *gfile="$(ALIHLT_BASEDIR)/geo/alice.geom");
31   virtual ~AliHLTTPCDisplay();
32
33   // SETUP
34   void SetupHist();
35   void SetupCluster(Int_t slice, Int_t patch, UInt_t nofClusters, AliHLTTPCSpacePointData* data);
36   void SetupTracks(AliHLTTPCTrackArray *tracks);
37
38   // HISTOGRAM FILL/RESET FUNCTIONS
39
40   void FillPadRow(Int_t patch, ULong_t dataBlock, ULong_t dataLen);
41   void ResetHistPadRow();
42   void ResetHistResiduals();
43   void ResetHistCharge();
44
45   // DRAWER
46   void Draw3D();
47   void DrawHistPadRow(); 
48   void DrawGeomSector(Int_t sector);
49   void DrawHistPad1();
50   void DrawHistPad2();
51   void DrawHistPad3();
52   void DrawHistResiduals();
53   void DrawHistCharge();
54
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;} 
75
76   // GETTER
77   Int_t GetPadRow(){return fPadRow;}
78   Int_t GetSlicePadRow(){return fSlicePadRow;}
79   Int_t GetNPads(){return fNPads;}
80   Int_t GetBackColor() {return fBackColor;}
81
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
100   private:
101
102   Bool_t LoadGeometrie(Char_t *gfile);
103
104   AliHLTTPCDisplay(const AliHLTTPCDisplay &/*d*/):TObject(){;}
105   AliHLTTPCDisplay& operator=(const AliHLTTPCDisplay &/*d*/){return *this;}
106
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
117   TH1F *fHistallresiduals;//histogram for all residuals
118   TH1F *fHistcharge; // histogram for clustercharge
119
120   TGraph *fGraphresiduals; // graph of the residuals for one track
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
126
127   Int_t fPad;        // pad
128   Int_t fPadRow;     // padrow
129   Int_t fSlicePadRow;// slice where padrow is in
130   Int_t fNPads;      // number of pads in padrow
131   Int_t fNTimes;     // number of timebins
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;
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
151   Bool_t fSwitch3DCluster;
152   Bool_t fSwitch3DTracks;
153   Bool_t fSwitch3DPadRow;
154   Bool_t fSwitch3DGeometry;
155
156   ClassDef(AliHLTTPCDisplay,1) //Display class
157 };
158
159 #endif