]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSdisplay.h
Latest Fixes from M.Bondila
[u/mrichter/AliRoot.git] / ITS / AliITSdisplay.h
1 #ifndef AliITSdisplay_H
2 #define AliITSdisplay_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 //////////////////////////////////////////////////////////////////////////
9 //                                                                      //
10 // AliDisplay                                                           //
11 //                                                                      //
12 // Utility class to display ALice outline, tracks, hits,..              //
13 //                                                                      //
14 //////////////////////////////////////////////////////////////////////////
15
16 //#ifndef ROOT_TObject
17 #include <TObject.h>
18 //#endif
19 #include "AliDisplay.h"
20
21 class TCanvas;
22 class TPad;
23 class TList;
24 class TSlider;
25 class TButton;
26 class TArc;
27 class AliITSMapA2;
28
29 const Int_t kMAXZOOM = 20;
30
31 class AliITSdisplay : public AliDisplay {
32
33 private:
34    Int_t             fEvent;
35
36    Int_t             fLayer;
37    Int_t             fLadder;
38    Int_t             fDetector;
39    Int_t             fModule;
40    Int_t             fNmodules;
41
42    Float_t             fYmodule;
43    Option_t            *fOption;   // option for type od det ?
44
45    Int_t             fPdgParticle;
46    Int_t             fPdgParent;
47
48    Int_t             fZoomMode;             //=1 if in zoom mode
49
50    Bool_t            fDrawHist;             //Flag True if draw histograms
51    AliITSMapA2      *fMap;                
52
53    Bool_t            fDrawClusters;         //Flag True if Clusters to be drawn
54    Bool_t            fDrawCoG;              //Flag True if CoG to be drawn
55    Bool_t            fDrawCathCor;          //Flag True if correlated point 
56                                             //to be drawn
57    Float_t           fTheta;                //Viewing angle theta
58    Float_t           fPhi;                  //Viewing angle phi
59    Float_t           fPsi;                  //Viewving angle psi (rotation on display)
60   //   Float_t           fRzone;                //
61    Float_t           fRrange;               //Size of view in R
62    Float_t           fZrange;               //Size of view along Z
63    Float_t           fZoomX0[20];           //Low x range of zoom number i
64    Float_t           fZoomY0[20];           //Low y range of zoom number i
65    Float_t           fZoomX1[20];           //High x range of zoom number i
66    Float_t           fZoomY1[20];           //High y range of zoom number i
67    Int_t             fZooms;                //Number of zooms
68
69    Int_t             fHitsCuts;             //Number of hits surviving cuts
70    Int_t             fClustersCuts;         //Number of clusters surviving cuts
71
72    TCanvas          *fCanvas;               //Pointer to the display canvas
73    TPad             *fTrigPad;              //Pointer to the trigger pad 
74    TPad             *fColPad;               //Pointer to the colors pad 
75    TPad             *fButtons;              //Pointer to the buttons pad
76    TPad             *fPad;                  //Pointer to the event display main pad
77    TSlider          *fRangeSlider;          //Range slider
78    TButton          *fPickButton;           //Button to activate Pick mode
79    TButton          *fZoomButton;           //Button to activate Zoom mode
80    TArc             *fArcButton;            //Gren/Red button to show Pick/Zoom mode
81    TObjArray        *fPoints;               //Array of points for each cathode
82    TObjArray        *fPhits;                //Array of hit points for each chamber
83    TObjArray        *fRpoints;              //Array of cog points for each cathode
84    TObjArray        *fR2points;              //Array of cog points for each cathode
85    TObjArray        *fCpoints;              //Array of correlated points for each first cathode
86
87
88 public:
89                      AliITSdisplay();
90                      AliITSdisplay(Int_t size);
91    virtual          ~AliITSdisplay();
92    virtual void      Clear(Option_t *option="");
93    virtual void      CreateModuleCanvas(Int_t size);
94    virtual void      DisplayButtons();
95    virtual void      CreateColors();
96    virtual void      DisplayColorScale();
97    virtual Int_t     DistancetoPrimitive(Int_t px, Int_t py);
98    virtual void      Draw(Option_t *option="");
99    virtual void      DrawClusters();
100    virtual void      DrawHits();
101    virtual void      DrawCoG();
102    virtual void      DrawCoG2();
103    virtual void      DrawCathCor();
104    
105    virtual void      DrawTitle(Option_t *option="");
106    virtual void      DrawView(Float_t theta, Float_t phi, Float_t psi=0);
107    virtual void      ExecuteEvent(Int_t event, Int_t px, Int_t py);
108    Int_t             GetZoomMode() {return fZoomMode;}
109    Int_t             GetLayer() {return fLayer;}
110    Int_t             GetLadder() {return fLadder;}
111    Int_t             GetDetector() {return fDetector;}
112    Int_t             GetModule() {return fModule;}
113    Int_t             GetEvent() {return fEvent;}
114    Float_t           GetYmodule() {return fYmodule;}
115    Bool_t            GetDrawHistOpt() {return fDrawHist;}
116    AliITSMapA2      *GetMap() {return fMap;}
117    void              GetPadCxy(Int_t,Int_t,Float_t *,Float_t *);
118    void              GetPadIxy(Int_t &,Int_t &,Float_t,Float_t);
119    virtual void      LoadDigits(Int_t module);
120    virtual void      LoadHits(Int_t module);
121    virtual void      LoadCoG(Int_t chamber, Int_t cathode);
122    virtual void      LoadCoG2(Int_t chamber, Int_t cathode);
123    virtual void      LoadCathCor(Int_t chamber);
124    TPad             *Pad() {return fPad;}
125    TObjArray        *Points() {return fPoints;}
126    TObjArray        *Phits() {return fPhits;}
127    TObjArray        *Rpoints() {return fRpoints;}
128    TObjArray        *R2points() {return fR2points;}
129    TObjArray        *Cpoints() {return fCpoints;}
130    virtual void      Paint(Option_t *option="");
131    virtual void      SetModule(Int_t layer=1, Int_t ladder=1, Int_t detector=1); // *MENU*
132    virtual void      SetModuleNumber(Int_t module=393); // *MENU*
133    virtual void      SetParticle(Int_t code=-211) {fPdgParticle=code;}// *MENU*
134    virtual void      SetParent(Int_t code=0) {fPdgParent=code;}// *MENU* 
135    virtual void      SetEvent(Int_t newevent=0); // *MENU*   
136    virtual void      SetDrawHist(Bool_t draw=kFALSE) {fDrawHist=draw;}   // *MENU*
137    virtual void      SetDrawClusters(Bool_t draw=kTRUE) {fDrawClusters=draw;}   // *MENU*
138    virtual void      SetDrawCoG(Bool_t draw=kTRUE) {fDrawCoG=draw;}   // *MENU*
139    virtual void      SetDrawCathCor(Bool_t draw=kFALSE) {fDrawCathCor=draw;} // *MENU*
140    virtual void      SetRange(Float_t rrange=250., Float_t zrange=1050.); // *MENU*
141    virtual void      SetView(Float_t theta=-90, Float_t phi=90, Float_t psi=180); // *MENU* 
142    virtual void      SetPickMode();
143    virtual void      SetZoomMode();
144    virtual void      ShowNextEvent(Int_t delta=1);
145    virtual void      UnZoom(); // *MENU*
146    virtual void      DrawHistograms();
147    virtual void      NextModule(Int_t delta=1);
148    virtual void      ResetPoints();
149    virtual void      ResetPhits();
150    virtual void      ResetRpoints();
151    virtual void      ResetR2points();
152    virtual void      ResetCpoints();
153
154    ClassDef(AliITSdisplay, 0)   //Utility class to display ITS clusters...
155 };
156
157 #endif