Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TEveCalo2DGL.h
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Author: Matevz Tadel 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TEveCalo2DGL
13#define ROOT_TEveCalo2DGL
14
15#include "TGLObject.h"
16#include "TEveCaloData.h"
17#include "TEveCalo.h"
18#include <vector>
19
20class TGLViewer;
21class TGLScene;
22
23class TEveCalo2D;
24class TEveProjection;
25
26class TEveCalo2DGL : public TGLObject
27{
28private:
29 TEveCalo2DGL(const TEveCalo2DGL&) = delete;
31
32protected:
33 TEveCalo2D *fM; // Model object.
34
35 void MakeRhoZCell(Float_t thetaMin, Float_t thetaMax, Float_t& offset, Bool_t isBarrel, Bool_t phiPlus, Float_t towerH) const;
36
37 void MakeRPhiCell(Float_t phiMin, Float_t phiMax, Float_t towerH, Float_t offset) const;
38
39 void DrawRPhi(TGLRnrCtx & rnrCtx, TEveCalo2D::vBinCells_t&) const;
40 void DrawRPhiHighlighted(std::vector<TEveCaloData::vCellId_t*>& cellLists) const;
41 void DrawRhoZ(TGLRnrCtx & rnrCtx, TEveCalo2D::vBinCells_t&) const;
42 void DrawRhoZHighlighted(std::vector<TEveCaloData::vCellId_t*>& cellLists) const;
43
44 Bool_t IsRPhi() const;
45
46public:
48 ~TEveCalo2DGL() override {}
49
50 Bool_t SetModel(TObject* obj, const Option_t *opt = nullptr) override;
51 void SetBBox() override;
52
53 void DirectDraw(TGLRnrCtx & rnrCtx) const override;
54 void DrawHighlight(TGLRnrCtx& rnrCtx, const TGLPhysicalShape* ps, Int_t lvl=-1) const override;
55
56 // To support two-level selection
57 Bool_t SupportsSecondarySelect() const override { return kTRUE; }
58 Bool_t AlwaysSecondarySelect() const override { return kTRUE; }
59 void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec) override;
60
61 ClassDefOverride(TEveCalo2DGL, 0); // GL renderer class for TEveCalo2D.
62};
63
64#endif
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
OpenGL renderer class for TEveCalo2D.
void DrawRPhi(TGLRnrCtx &rnrCtx, TEveCalo2D::vBinCells_t &) const
Draw calorimeter cells in RPhi projection.
TEveCalo2DGL(const TEveCalo2DGL &)=delete
~TEveCalo2DGL() override
void ProcessSelection(TGLRnrCtx &rnrCtx, TGLSelectRecord &rec) override
Processes tower selection in eta bin or phi bin.
TEveCalo2DGL & operator=(const TEveCalo2DGL &)=delete
void MakeRPhiCell(Float_t phiMin, Float_t phiMax, Float_t towerH, Float_t offset) const
Calculate vertices for the calorimeter cell in RPhi projection.
Bool_t SupportsSecondarySelect() const override
void DrawRhoZ(TGLRnrCtx &rnrCtx, TEveCalo2D::vBinCells_t &) const
Draw calorimeter in RhoZ projection.
Bool_t AlwaysSecondarySelect() const override
Bool_t IsRPhi() const
Is current projection type RPhi.
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Render with OpenGL.
void SetBBox() override
Set bounding box.
void DrawRPhiHighlighted(std::vector< TEveCaloData::vCellId_t * > &cellLists) const
Draw selected calorimeter cells in RPhi projection.
void DrawRhoZHighlighted(std::vector< TEveCaloData::vCellId_t * > &cellLists) const
Draw selected calorimeter cells in RhoZ projection.
void MakeRhoZCell(Float_t thetaMin, Float_t thetaMax, Float_t &offset, Bool_t isBarrel, Bool_t phiPlus, Float_t towerH) const
Draw cell in RhoZ projection.
void DrawHighlight(TGLRnrCtx &rnrCtx, const TGLPhysicalShape *ps, Int_t lvl=-1) const override
Draw towers in highlight mode.
TEveCalo2DGL()
Constructor.
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
TEveCalo2D * fM
Visualization of a calorimeter event data in 2D.
Definition TEveCalo.h:202
std::vector< TEveCaloData::vCellId_t * > vBinCells_t
Definition TEveCalo.h:206
Base-class for non-linear projections.
Base-class for direct OpenGL renderers.
Definition TGLObject.h:22
Concrete physical shape - a GL drawable.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition TGLRnrCtx.h:41
TGLScene provides management and rendering of ROOT's default 3D /object representation as logical and...
Definition TGLScene.h:29
Standard selection record including information about containing scene and details ob out selected ob...
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition TGLViewer.h:55
Mother of all ROOT objects.
Definition TObject.h:41