]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliDisplay.h
Addition of CPV library as a separate detector from PHOS
[u/mrichter/AliRoot.git] / STEER / AliDisplay.h
1 #ifndef AliDisplay_H
2 #define AliDisplay_H
3
4 //////////////////////////////////////////////////////////////////////////
5 //                                                                      //
6 // AliDisplay                                                           //
7 //                                                                      //
8 // Utility class to display ALice outline, tracks, hits,..              //
9 //                                                                      //
10 //////////////////////////////////////////////////////////////////////////
11
12 #include <TObject.h>
13
14 class TCanvas;
15 class TPad;
16 class TList;
17 class TSlider;
18 class TButton;
19 class TArc;
20
21 const Int_t kMAXZOOMS = 20;
22
23 class AliDisplay : public TObject {
24
25 protected:
26    Int_t             fZoomMode;             //=1 if in zoom mode
27    Bool_t            fDrawAllViews;         //Flag True if AllViews selected
28    Bool_t            fDrawParticles;        //Flag True if particles to be drawn
29    Bool_t            fDrawHits;             //Flag True if Hits to be drawn
30    Float_t           fPTcut;                //PT cut to display objects
31    Float_t           fTheta;                //Viewing angle theta
32    Float_t           fPhi;                  //Viewing angle phi
33    Float_t           fPsi;                  //Viewving angle psi (rotation on display)
34    Float_t           fRrange;               //Size of view in R
35    Float_t           fZrange;               //Size of view along Z
36    Float_t           fZoomX0[20];           //Low x range of zoom number i
37    Float_t           fZoomY0[20];           //Low y range of zoom number i
38    Float_t           fZoomX1[20];           //High x range of zoom number i
39    Float_t           fZoomY1[20];           //High y range of zoom number i
40    Int_t             fZooms;                //Number of zooms
41    Int_t             fHitsCuts;             //Number of hits surviving cuts
42    TCanvas          *fCanvas;               //Pointer to the display canvas
43    TPad             *fTrigPad;              //Pointer to the trigger pad 
44    TPad             *fCutPad;               //Pointer to the momentum cut slider pad 
45    TPad             *fEtaPad;               //Pointer to the rapidity cut slider pad 
46    TPad             *fButtons;              //Pointer to the buttons pad
47    TPad             *fPad;                  //Pointer to the event display main pad
48    TSlider          *fCutSlider;            //Momentum cut slider
49    TSlider          *fEtaSlider;            //Rapidity slider
50    TSlider          *fRangeSlider;          //Range slider
51    TButton          *fPickButton;           //Button to activate Pick mode
52    TButton          *fZoomButton;           //Button to activate Zoom mode
53    TArc             *fArcButton;            //Gren/Red button to show Pick/Zoom mode
54    TList            *fFruits;               //List for fruits
55    
56 public:
57                      AliDisplay();
58                      AliDisplay(Int_t size);
59    virtual          ~AliDisplay();
60    virtual Bool_t    AllViews() {return fDrawAllViews;}
61    virtual void      Clear(Option_t *option="");
62    TSlider          *CutSlider() {return fCutSlider;}
63    virtual void      ShowTrack(Int_t track_number); // *MENU*
64    virtual void      HideTrack(Int_t track_number); // *MENU*
65    virtual void      DisableDetector(const char *name); // *MENU*
66    virtual void      DisplayButtons();
67    virtual Int_t     DistancetoPrimitive(Int_t px, Int_t py);
68    virtual void      Draw(Option_t *option="");
69    virtual void      DrawAllViews();
70    virtual void      DrawHits();
71    virtual void      DrawTitle(Option_t *option="");
72    virtual void      DrawView(Float_t theta, Float_t phi, Float_t psi=0);
73    virtual void      DrawViewGL();
74    virtual void      DrawViewX3D();
75    virtual void      EnableDetector(const char *name); // *MENU*
76    TSlider          *EtaSlider() {return fEtaSlider;}
77    virtual void      ExecuteEvent(Int_t event, Int_t px, Int_t py);
78    Int_t             GetZoomMode() {return fZoomMode;}
79    virtual void      LoadPoints();
80    TPad             *Pad() {return fPad;}
81    virtual void      Paint(Option_t *option="");
82    Float_t           PTcut() {return fPTcut;}
83    virtual void      SetDrawHits(Bool_t draw=kTRUE) {fDrawHits=draw;}   // *MENU*
84    virtual void      SetDrawParticles(Bool_t draw=kTRUE) {fDrawParticles=draw;} // *MENU*
85    virtual void      SetPTcut(Float_t ptcut=1.5); // *MENU*
86    virtual void      SetRange(Float_t rrange=350, Float_t zrange=350); // *MENU*
87    virtual void      SetView(Float_t theta, Float_t phi, Float_t psi=0);
88    virtual void      SetPickMode();
89    virtual void      SetZoomMode();
90    virtual void      ShowNextEvent(Int_t delta=1);
91    virtual void      UnZoom(); // *MENU*
92    
93    ClassDef(AliDisplay, 0)   //Utility class to display ALICE outline, tracks, hits,..
94 };
95
96 #endif