]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveLego.h
From Stefano -- coding convention violation fixes.
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveLego.h
1 // $Id$
2 // Author: Stefano Carrazza 2010
3
4 /**************************************************************************
5  * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #ifndef ALIEVELEGO_H
11 #define ALIEVELEGO_H
12
13 #include "TEveElement.h"
14
15 class AliESDEvent;
16 class AliEveEventSelector;
17 class AliEveMultiView;
18 class AliPhysicsSelection;
19
20 class TEveCaloDataHist;
21 class TEveCaloLego;
22 class TEveCaloLegoOverlay;
23 class TEveCalo3D;
24 class TEveScene;
25 class TEveViewer;
26 class TEveWindowSlot;
27 class TGLOverlayButton;
28 class TGLViewer;
29 class TH2F;
30
31 //______________________________________________________________________________
32 // Creates a 2D lego histogram on a new tab.
33 // Allow 3D visualization and projection of the lego histogram on the 3D Viewer and the MultiView.
34 //
35
36 class AliEveLego : public TEveElementList
37 {
38 public:
39   AliEveLego(const char* name="AliEveLego");
40   virtual ~AliEveLego();
41
42   // Get Methods
43   TEveCaloDataHist* GetData()           {   return fData;             }
44   TEveCaloDataHist* GetDataAllEvents()  {   return fDataAllEvents;  }
45   AliESDEvent*      GetESD()            {   return fEsd;              }
46   TEveCaloLego*     GetLego()           {   return fLego;             }
47   TEveCaloLego*     GetLegoAllEvents()  {   return fLegoAllEvents;  }
48   TEveCalo3D*       GetCalo3D()         {   return fCalo3d;           }
49   TEveCalo3D*       GetCalo3DAllEvents(){   return fCalo3dAllEvents;}
50   AliEveMultiView*  GetMultiView()      {   return fAl;               }
51   Float_t           GetPtMax();
52   Float_t           GetPtMaxAE();
53
54   // Set Methods
55   void SetCharge(Int_t id) {  fChargeId = id;  Update();  }
56   void SetAllEventsCharge(Int_t id) {  fChargeIdAE = id; FilterAllData();  }
57   void SetTracks(Int_t id) {  fTracksId = id;  Update();  }
58   void SetTracksAE(Int_t id) {  fTracksIdAE = id;  FilterAllData();  }
59   void SetEvents(Int_t id) {  fEventsId = id;  Update();  }
60   void SetMaxPt(Double_t val);
61   void SetMaxPtAE(Double_t val);
62   void SetThreshold(Double_t val);
63   void SetThresholdAE(Double_t val);
64   void SetEventSelection();
65   void ShowPrevEvent();
66   void ShowNextEvent();
67
68   // Functions
69   void Update();
70   TEveCaloDataHist* LoadData();
71   TEveCaloDataHist* LoadAllData();
72   TEveCaloDataHist* FilterData();
73   TEveCaloDataHist* FilterAllData();
74   TEveCaloLego*     CreateHistoLego();
75   TEveCaloLego*     CreateHistoLego(TEveWindowSlot* slot);
76   TEveCalo3D*       Create3DView();
77   TEveCalo3D*       Create3DView(TEveWindowSlot* slot);
78   void              CreateProjections(TEveWindowSlot* slot1,
79                                       TEveWindowSlot* slot2);
80   TEveCaloDataHist* LoadAllEvents();
81   void              ShowEventSeletion(Bool_t show, Bool_t updateonly = kFALSE);
82   void              SelectEventSelection(Int_t id);
83
84 private:
85   Int_t fChargeId;  // determine if the charge is +/-
86   Int_t fTracksId;  // determine tracks selection
87   Int_t fEventsId;  // determine events selection
88   Float_t fMaxPt;   // set maximum pT
89
90   Int_t fChargeIdAE;  // determine if the charge is +/- for all events
91   Int_t fTracksIdAE;  // determine tracks selection for all events
92   Float_t fMaxPtAE;   // determine maximum pT for all events
93
94   AliESDEvent *fEsd;                      // ESD tree
95   AliPhysicsSelection *fPhysicsSelection; // physics selection object
96   TH2F *fHistopos;                        // positive charge histogram
97   TH2F *fHistoposAllEvents;               // positive charge histogram for all events
98   TH2F *fHistoneg;                        // negative charge histogram
99   TH2F *fHistonegAllEvents;               // negative charge histogram for all events
100
101   TEveCaloDataHist *fData;          // calo data for 2D, 3D histograms
102   TEveCaloDataHist *fDataAllEvents; // calo data for all events
103   TEveCaloLego *fLego;              // calo lego for histograms
104   TEveCaloLego *fLegoAllEvents;     // calo lego for all events histograms
105   TEveCalo3D *fCalo3d;              // 3D histogram for single event
106   TEveCalo3D *fCalo3dAllEvents;     // 3D histogram for all events
107   TGLViewer  *fGlv;                 // viewer object
108
109   TEveViewer *fHisto2dv;           // viewer for histograms
110   TEveScene  *fHisto2ds;           // scene for 3d histogram
111   TEveScene  *fHisto2ds2;          // scene for 3d histogram new tab
112   TEveViewer *fHisto2dAllEventsv0; // viewer 1 for all events tab
113   TEveViewer *fHisto2dAllEventsv1; // viewer 2 for all events tab
114   TEveViewer *fHisto2dAllEventsv2; // viewer 3 for all events tab
115   TEveViewer *fHisto2dAllEventsv3; // viewer 4 for all events tab
116   TEveScene  *fHisto2dAllEventss0; // scene for all events tab
117   TEveScene  *fHisto2dAllEventss1; // scene for all events tab
118   TEveScene  *fHisto2dAllEventss2; // scene for all events tab
119   TEveScene  *fHisto2dAllEventss3; // scene for all events tab
120
121   AliEveMultiView *fAl;            // AliEveMultiView object to create 2D projections
122   TEveCaloLegoOverlay *fHisto2dLegoOverlay; // Overlay for calo lego
123   TEveCaloLegoOverlay* fHisto2dAllEventsLegoOverlay; // Overlay for calo lego all events
124   TEveWindowSlot* fHisto2dAllEventsSlot;  // window slot for 2d all events histogram
125
126   AliEveEventSelector *fEventSelector;  // event selector
127   Bool_t fShowEventsInfo;               // determine if show events info
128   TGLOverlayButton *fGButton;           // button box with collision candidate information
129   TGLOverlayButton *fB1;                // button box with beam 1 information
130   TGLOverlayButton *fB2;                // button box with beam 2 information
131
132   AliEveLego(const AliEveLego&);            // Not implemented
133   AliEveLego& operator=(const AliEveLego&); // Not implemented
134
135
136   ClassDef(AliEveLego, 0); // Short description.
137 };
138
139 #endif