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
4171aa4e 10#ifndef ALIEVELEGO_H
11#define ALIEVELEGO_H
3d94b490 12
13#include "TEveElement.h"
14
15class AliESDEvent;
16class AliEveEventSelector;
17class AliEveMultiView;
18class AliPhysicsSelection;
6e994a7b 19class AliESDtrack;
3d94b490 20
21class TEveCaloDataHist;
22class TEveCaloLego;
23class TEveCaloLegoOverlay;
24class TEveCalo3D;
25class TEveScene;
26class TEveViewer;
27class TEveWindowSlot;
28class TGLOverlayButton;
29class TGLViewer;
30class TH2F;
31
32//______________________________________________________________________________
33// Creates a 2D lego histogram on a new tab.
34// Allow 3D visualization and projection of the lego histogram on the 3D Viewer and the MultiView.
35//
36
37class AliEveLego : public TEveElementList
38{
39public:
40 AliEveLego(const char* name="AliEveLego");
41 virtual ~AliEveLego();
42
43 // Get Methods
44 TEveCaloDataHist* GetData() { return fData; }
4171aa4e 45 TEveCaloDataHist* GetDataAllEvents() { return fDataAllEvents; }
3d94b490 46 AliESDEvent* GetESD() { return fEsd; }
47 TEveCaloLego* GetLego() { return fLego; }
4171aa4e 48 TEveCaloLego* GetLegoAllEvents() { return fLegoAllEvents; }
3d94b490 49 TEveCalo3D* GetCalo3D() { return fCalo3d; }
4171aa4e 50 TEveCalo3D* GetCalo3DAllEvents(){ return fCalo3dAllEvents;}
3d94b490 51 AliEveMultiView* GetMultiView() { return fAl; }
52 Float_t GetPtMax();
53 Float_t GetPtMaxAE();
6e994a7b 54 Int_t GetParticleType(AliESDtrack *track);
3d94b490 55
56 // Set Methods
6e994a7b 57 void SetParticleType(Int_t id);
58 void SetParticleTypeAE(Int_t id);
3d94b490 59 void SetTracks(Int_t id) { fTracksId = id; Update(); }
60 void SetTracksAE(Int_t id) { fTracksIdAE = id; FilterAllData(); }
3d94b490 61 void SetMaxPt(Double_t val);
62 void SetMaxPtAE(Double_t val);
63 void SetThreshold(Double_t val);
64 void SetThresholdAE(Double_t val);
6e994a7b 65 void SwitchDataType();
66 void SetCollisionCandidatesOnly();
3d94b490 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();
6e994a7b 81 void ApplyParticleTypeSelectionAE();
3d94b490 82
83private:
6e994a7b 84 Bool_t fIsMC; // switch to MC mode for AliPhysicsSelection
85 Bool_t fCollisionCandidatesOnly; // activate flag when loading all events
86 Bool_t *fParticleTypeId; // determine how particles to show
87 Bool_t *fParticleTypeIdAE; // determine how particles to show
88 Int_t fTracksId; // determine tracks selection
89 Float_t fMaxPt; // set maximum pT
4171aa4e 90
4171aa4e 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
6e994a7b 100 TH2F *fHistoElectrons; // electrons histogram
101 TH2F *fHistoElectronsAllEvents; // electrons histogram all events
102 TH2F *fHistoMuons; // muons histogram
103 TH2F *fHistoMuonsAllEvents; // muons histogram all events
104 TH2F *fHistoPions; // pions histogram
105 TH2F *fHistoPionsAllEvents; // pions histogram all events
106 TH2F *fHistoKaons; // kaons histogram
107 TH2F *fHistoKaonsAllEvents; // kaons histogram all events
108 TH2F *fHistoProtons; // protons histogram
109 TH2F *fHistoProtonsAllEvents; // protons histogram all events
4171aa4e 110
111 TEveCaloDataHist *fData; // calo data for 2D, 3D histograms
112 TEveCaloDataHist *fDataAllEvents; // calo data for all events
113 TEveCaloLego *fLego; // calo lego for histograms
114 TEveCaloLego *fLegoAllEvents; // calo lego for all events histograms
115 TEveCalo3D *fCalo3d; // 3D histogram for single event
116 TEveCalo3D *fCalo3dAllEvents; // 3D histogram for all events
117 TGLViewer *fGlv; // viewer object
118
119 TEveViewer *fHisto2dv; // viewer for histograms
120 TEveScene *fHisto2ds; // scene for 3d histogram
121 TEveScene *fHisto2ds2; // scene for 3d histogram new tab
122 TEveViewer *fHisto2dAllEventsv0; // viewer 1 for all events tab
123 TEveViewer *fHisto2dAllEventsv1; // viewer 2 for all events tab
124 TEveViewer *fHisto2dAllEventsv2; // viewer 3 for all events tab
125 TEveViewer *fHisto2dAllEventsv3; // viewer 4 for all events tab
126 TEveScene *fHisto2dAllEventss0; // scene for all events tab
127 TEveScene *fHisto2dAllEventss1; // scene for all events tab
128 TEveScene *fHisto2dAllEventss2; // scene for all events tab
129 TEveScene *fHisto2dAllEventss3; // scene for all events tab
130
131 AliEveMultiView *fAl; // AliEveMultiView object to create 2D projections
132 TEveCaloLegoOverlay *fHisto2dLegoOverlay; // Overlay for calo lego
133 TEveCaloLegoOverlay* fHisto2dAllEventsLegoOverlay; // Overlay for calo lego all events
134 TEveWindowSlot* fHisto2dAllEventsSlot; // window slot for 2d all events histogram
135
3d94b490 136 AliEveLego(const AliEveLego&); // Not implemented
137 AliEveLego& operator=(const AliEveLego&); // Not implemented
138
139
140 ClassDef(AliEveLego, 0); // Short description.
141};
142
143#endif