From Stefano:
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveLego.h
CommitLineData
3d94b490 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
15class AliESDEvent;
16class AliEveEventSelector;
17class AliEveMultiView;
18class AliPhysicsSelection;
19
20class TEveCaloDataHist;
21class TEveCaloLego;
22class TEveCaloLegoOverlay;
23class TEveCalo3D;
24class TEveScene;
25class TEveViewer;
26class TEveWindowSlot;
27class TGLOverlayButton;
28class TGLViewer;
29class 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
36class AliEveLego : public TEveElementList
37{
38public:
39 AliEveLego(const char* name="AliEveLego");
40 virtual ~AliEveLego();
41
42 // Get Methods
43 TEveCaloDataHist* GetData() { return fData; }
44 TEveCaloDataHist* GetDataAllEvents() { return fData_all_events; }
45 AliESDEvent* GetESD() { return fEsd; }
46 TEveCaloLego* GetLego() { return fLego; }
47 TEveCaloLego* GetLegoAllEvents() { return fLego_all_events; }
48 TEveCalo3D* GetCalo3D() { return fCalo3d; }
49 TEveCalo3D* GetCalo3DAllEvents(){ return fCalo3d_all_events;}
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
84private:
85 Int_t fChargeId;
86 Int_t fTracksId;
87 Int_t fEventsId;
88 Float_t fMaxPt;
89
90 Int_t fChargeIdAE;
91 Int_t fTracksIdAE;
92 Float_t fMaxPtAE;
93
94 AliESDEvent *fEsd;
95 AliPhysicsSelection *fPhysicsSelection;
96 TH2F *fHistopos;
97 TH2F *fHistoposclone;
98 TH2F *fHistopos_all_events;
99 TH2F *fHistoneg;
100 TH2F *fHistonegclone;
101 TH2F *fHistoneg_all_events;
102
103 TEveCaloDataHist *fData;
104 TEveCaloDataHist *fData_all_events;
105 TEveCaloLego *fLego;
106 TEveCaloLego *fLego_all_events;
107 TEveCalo3D *fCalo3d;
108 TEveCalo3D *fCalo3d_all_events;
109 TGLViewer *fGlv;
110
111 TEveViewer *fHisto2d_v;
112 TEveScene *fHisto2d_s;
113 TEveScene *fHisto2d_s2;
114 TEveViewer *fHisto2d_all_events_v0;
115 TEveViewer *fHisto2d_all_events_v1;
116 TEveViewer *fHisto2d_all_events_v2;
117 TEveViewer *fHisto2d_all_events_v3;
118 TEveScene *fHisto2d_all_events_s0;
119 TEveScene *fHisto2d_all_events_s1;
120 TEveScene *fHisto2d_all_events_s2;
121 TEveScene *fHisto2d_all_events_s3;
122
123 AliEveMultiView *fAl;
124 TEveCaloLegoOverlay *fHisto2d_lego_overlay;
125 TEveCaloLegoOverlay* fHisto2d_all_events_lego_overlay;
126 TEveWindowSlot* fHisto2d_all_events_slot;
127
128 AliEveEventSelector *fEventSelector;
129 Bool_t fShowEventsInfo;
130 TGLOverlayButton *fGButton;
131 TGLOverlayButton *fB1;
132 TGLOverlayButton *fB2;
133
134 AliEveLego(const AliEveLego&); // Not implemented
135 AliEveLego& operator=(const AliEveLego&); // Not implemented
136
137
138 ClassDef(AliEveLego, 0); // Short description.
139};
140
141#endif