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