]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RICH/AliRICHDisplay.h
Fixed compilation warning with HP unix.
[u/mrichter/AliRoot.git] / RICH / AliRICHDisplay.h
1 #ifndef AliRICHDisplay_H
2 #define AliRICHDisplay_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 /* $Id$ */
8
9 //////////////////////////////////////////////////////////////////////////
10 //                                                                      //
11 // AliDisplay                                                           //
12 //                                                                      //
13 // Utility class to display ALice outline, tracks, hits,..              //
14 //                                                                      //
15 //////////////////////////////////////////////////////////////////////////
16
17 //#ifndef ROOT_TObject
18 #include <TObject.h>
19 #include <TPolyMarker3D.h>
20 #include <TAttLine.h>
21 #include <TAtt3D.h>
22
23 //#endif
24 #include "AliDisplay.h"
25
26
27 class TCanvas;
28 class TPad;
29 class TList;
30 class TSlider;
31 class TButton;
32 class TArc;
33
34 class AliRICHEllipse;
35
36 const Int_t kMAXZOOM = 20;
37
38 class AliRICHDisplay : /*splaypublic TObject,*/ public AliDisplay {
39     
40  private:
41     Int_t             fChamber;
42     Int_t             fCathode;
43     Int_t             fZoomMode;             //=1 if in zoom mode
44     
45     Bool_t            fDrawClusters;         //Flag True if Clusters to be drawn
46     Bool_t            fDrawCoG;              //Flag True if CoG to be drawn
47     Bool_t            fDrawRecHits;          //Flag True if rec hits to be drawn
48     Float_t           fTheta;                //Viewing angle theta
49     Float_t           fPhi;                  //Viewing angle phi
50     Float_t           fPsi;                  //Viewving angle psi (rotation on display)
51     Float_t           fRrange;               //Size of view in R
52     Float_t           fZrange;               //Size of view along Z
53     Float_t           fZoomX0[20];           //Low x range of zoom number i
54     Float_t           fZoomY0[20];           //Low y range of zoom number i
55     Float_t           fZoomX1[20];           //High x range of zoom number i
56     Float_t           fZoomY1[20];           //High y range of zoom number i
57     Int_t             fZooms;                //Number of zooms
58     Int_t             fHitsCuts;             //Number of hits surviving cuts
59     Int_t             fClustersCuts;         //Number of clusters surviving cuts
60     TCanvas          *fCanvas;               //Pointer to the display canvas
61     TPad             *fTrigPad;              //Pointer to the trigger pad 
62     TPad             *fColPad;               //Pointer to the colors pad 
63     TPad             *fButtons;              //Pointer to the buttons pad
64     TPad             *fPad;                  //Pointer to the event display main pad
65     TSlider          *fRangeSlider;          //Range slider
66     TButton          *fPickButton;           //Button to activate Pick mode
67     TButton          *fZoomButton;           //Button to activate Zoom mode
68     TArc             *fArcButton;            //Gren/Red button to show Pick/Zoom mode
69     TObjArray        *fPoints;               //Array of points for each cathode
70     TObjArray        *fPhits;                //Array of hit points for each chamber
71     TObjArray        *fPCerenkovs;           //Array of cerenkov hits for each chamber
72     TObjArray        *fRpoints;              //Array of cog points for each cathode 
73     TObjArray        *fRecpoints;            //Array of rec points for each cathode 
74     
75  public:
76     AliRICHDisplay();
77     AliRICHDisplay(Int_t size);
78     virtual          ~AliRICHDisplay();
79     virtual void      Clear(Option_t *option="");
80     virtual void      DisplayButtons();
81     virtual void      CreateColors();
82     virtual void      DisplayColorScale();
83     virtual Int_t     DistancetoPrimitive(Int_t px, Int_t py);
84     virtual void      Draw(Option_t *option="");
85     virtual void      DrawCoG();
86     virtual void      DrawRecHits();
87     virtual void      DrawCerenkovs();
88     virtual void      DrawClusters();
89     virtual void      DrawHits();
90     virtual void      DrawTitle(Option_t *option="");
91     virtual void      DrawView(Float_t theta, Float_t phi, Float_t psi=0);
92     virtual void      DrawViewGL();
93     virtual void      DrawViewX3D();
94     virtual void      ExecuteEvent(Int_t event, Int_t px, Int_t py);
95     Int_t             GetZoomMode() {return fZoomMode;}
96     Int_t             GetChamber() {return fChamber;}
97     Int_t             GetCathode() {return fCathode;}
98     virtual void      LoadDigits();
99     virtual void      LoadRecHits(Int_t chamber, Int_t cathode);
100     virtual void      LoadCoG(Int_t chamber, Int_t cathode);
101     virtual void      LoadCerenkovs(Int_t chamber);
102     virtual void      LoadHits(Int_t chamber);
103     TPad             *Pad() {return fPad;}
104     TObjArray        *Points() {return fPoints;}
105     TObjArray        *Phits() {return fPhits;}
106     TObjArray        *Rpoints() {return fRpoints;}
107     TObjArray        *PCerenkovs() {return fPCerenkovs;}
108     virtual void      Paint(Option_t *option="");
109     virtual void      SetDrawClusters(Bool_t draw=kTRUE) {fDrawClusters=draw;}   // *MENU*
110     virtual void      SetDrawCoG(Bool_t draw=kTRUE) {fDrawCoG=draw;}   // *MENU*
111     virtual void      SetChamberAndCathode(Int_t chamber=1, Int_t cathode=1); // *MENU*
112     virtual void      SetRange(Float_t rrange=250, Float_t zrange=1050); // *MENU*
113     virtual void      SetView(Float_t theta, Float_t phi, Float_t psi=0);
114     virtual void      SetPickMode();
115     virtual void      SetZoomMode();
116     virtual void      ShowNextEvent(Int_t delta=1);
117     virtual void      UnZoom(); // *MENU*
118     virtual void      ResetPoints();
119     virtual void      ResetRpoints();
120     virtual void      ResetRecpoints();
121     virtual void      ResetPhits();
122     virtual void      ResetPCerenkovs();
123     ClassDef(AliRICHDisplay, 0)   //Utility class to display RICH clusters...
124 };
125
126
127 class AliRICHEllipse :  public TPolyMarker3D {
128
129 public:
130     AliRICHEllipse();
131     AliRICHEllipse(Float_t cx, Float_t cy, Float_t omega, Float_t theta, Float_t phi);
132     
133     virtual          ~AliRICHEllipse();
134     virtual void CreatePoints(Int_t chamber);
135
136     Float_t fOmega;
137     Float_t fTheta;
138     Float_t fPhi;
139     Float_t fCx;
140     Float_t fCy;
141     Float_t h;
142
143     ClassDef(AliRICHEllipse, 1)   //Utility class to draw an ellipse
144 };
145         
146 #endif
147