Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TEveCalo2DGL.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/eve:$Id$
0002 // Author: Matevz Tadel 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TEveCalo2DGL
0013 #define ROOT_TEveCalo2DGL
0014 
0015 #include "TGLObject.h"
0016 #include "TEveCaloData.h"
0017 #include "TEveCalo.h"
0018 #include <vector>
0019 
0020 class TGLViewer;
0021 class TGLScene;
0022 
0023 class TEveCalo2D;
0024 class TEveProjection;
0025 
0026 class TEveCalo2DGL : public TGLObject
0027 {
0028 private:
0029    TEveCalo2DGL(const TEveCalo2DGL&) = delete;
0030    TEveCalo2DGL& operator=(const TEveCalo2DGL&) = delete;
0031 
0032 protected:
0033    TEveCalo2D   *fM;  // Model object.
0034 
0035    void      MakeRhoZCell(Float_t thetaMin, Float_t thetaMax, Float_t& offset, Bool_t isBarrel, Bool_t phiPlus, Float_t towerH) const;
0036 
0037    void      MakeRPhiCell(Float_t phiMin, Float_t phiMax, Float_t towerH, Float_t offset) const;
0038 
0039    void      DrawRPhi(TGLRnrCtx & rnrCtx, TEveCalo2D::vBinCells_t&) const;
0040    void      DrawRPhiHighlighted(std::vector<TEveCaloData::vCellId_t*>& cellLists) const;
0041    void      DrawRhoZ(TGLRnrCtx & rnrCtx, TEveCalo2D::vBinCells_t&) const;
0042    void      DrawRhoZHighlighted(std::vector<TEveCaloData::vCellId_t*>& cellLists) const;
0043 
0044    Bool_t    IsRPhi() const;
0045 
0046 public:
0047    TEveCalo2DGL();
0048    ~TEveCalo2DGL() override {}
0049 
0050    Bool_t SetModel(TObject* obj, const Option_t *opt = nullptr) override;
0051    void   SetBBox() override;
0052 
0053    void DirectDraw(TGLRnrCtx & rnrCtx) const override;
0054    void DrawHighlight(TGLRnrCtx& rnrCtx, const TGLPhysicalShape* ps, Int_t lvl=-1) const override;
0055 
0056    // To support two-level selection
0057    Bool_t SupportsSecondarySelect() const override { return kTRUE; }
0058    Bool_t AlwaysSecondarySelect()   const override { return kTRUE; }
0059    void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec) override;
0060 
0061    ClassDefOverride(TEveCalo2DGL, 0); // GL renderer class for TEveCalo2D.
0062 };
0063 
0064 #endif