Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // @(#)root/geom:$Id$
0002 // Author: Andrei Gheata   11/01/02
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, 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_TVirtualGeoPainter
0013 #define ROOT_TVirtualGeoPainter
0014 
0015 #include "TObject.h"
0016 
0017 class TGeoVolume;
0018 class TGeoNode;
0019 class TGeoShape;
0020 class TGeoMatrix;
0021 class TGeoHMatrix;
0022 class TGeoManager;
0023 class TVirtualGeoTrack;
0024 class TParticle;
0025 class TObjArray;
0026 class TH2F;
0027 class TStopwatch;
0028 class TGeoBatemanSol;
0029 class TGeoIteratorPlugin;
0030 class TGeoPolygon;
0031 
0032 class TVirtualGeoPainter : public TObject {
0033 
0034 protected:
0035    static TVirtualGeoPainter *fgGeoPainter; // Pointer to class painter
0036 
0037 public:
0038    enum EGeoVisLevel { kGeoVisLevel = 0 };
0039    enum EGeoVisOption {
0040       kGeoVisDefault = 0, // default visualization - everything visible 3 levels down
0041       kGeoVisLeaves = 1,  // only last leaves are visible
0042       kGeoVisOnly = 2,    // only current volume is drawn
0043       kGeoVisBranch = 3,  // only a given branch is drawn
0044       kGeoVisChanged = 4  // visibility changed
0045    };
0046    enum EGeoBombOption {
0047       kGeoNoBomb = 0,  // default - no bomb
0048       kGeoBombXYZ = 1, // explode view in cartesian coordinates
0049       kGeoBombCyl = 2, // explode view in cylindrical coordinates (R, Z)
0050       kGeoBombSph = 3  // explode view in spherical coordinates (R)
0051    };
0052 
0053 public:
0054    TVirtualGeoPainter(TGeoManager *manager);
0055    ~TVirtualGeoPainter() override;
0056 
0057    virtual void AddSize3D(Int_t numpoints, Int_t numsegs, Int_t numpolys) = 0;
0058    virtual TVirtualGeoTrack *AddTrack(Int_t id, Int_t pdgcode, TObject *particle) = 0;
0059    virtual void AddTrackPoint(Double_t *point, Double_t *box, Bool_t reset = kFALSE) = 0;
0060    virtual void BombTranslation(const Double_t *tr, Double_t *bombtr) = 0;
0061    virtual void CheckPoint(Double_t x = 0, Double_t y = 0, Double_t z = 0, Option_t *option = "", Double_t safety = 0.) = 0;
0062    virtual void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option) = 0;
0063    virtual void CheckBoundaryErrors(Int_t ntracks = 1000000, Double_t radius = -1.) = 0;
0064    virtual void CheckBoundaryReference(Int_t icheck = -1) = 0;
0065    virtual void CheckGeometryFull(Bool_t checkoverlaps = kTRUE, Bool_t checkcrossings = kTRUE, Int_t nrays = 10000,
0066                                   const Double_t *vertex = nullptr) = 0;
0067    virtual void CheckGeometry(Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const = 0;
0068    virtual void CheckOverlaps(const TGeoVolume *vol, Double_t ovlp = 0.1, Option_t *option = "") const = 0;
0069    virtual Int_t CountVisibleNodes() = 0;
0070    virtual void DefaultAngles() = 0;
0071    virtual void DefaultColors() = 0;
0072    virtual Int_t DistanceToPrimitiveVol(TGeoVolume *vol, Int_t px, Int_t py) = 0;
0073    virtual void DrawBatemanSol(TGeoBatemanSol *sol, Option_t *option = "") = 0;
0074    virtual void DrawShape(TGeoShape *shape, Option_t *option = "") = 0;
0075    virtual void DrawOnly(Option_t *option = "") = 0;
0076    virtual void DrawOverlap(void *ovlp, Option_t *option = "") = 0;
0077    virtual void DrawCurrentPoint(Int_t color) = 0;
0078    virtual void DrawPanel() = 0;
0079    virtual void DrawPath(const char *path, Option_t *option = "") = 0;
0080    virtual void DrawPolygon(const TGeoPolygon *poly) = 0;
0081    virtual void DrawVolume(TGeoVolume *vol, Option_t *option = "") = 0;
0082    virtual void EditGeometry(Option_t *option = "") = 0;
0083    virtual void EstimateCameraMove(Double_t /*tmin*/, Double_t /*tmax*/, Double_t *, Double_t *) {}
0084    virtual void ExecuteShapeEvent(TGeoShape *shape, Int_t event, Int_t px, Int_t py) = 0;
0085    virtual void ExecuteManagerEvent(TGeoManager *geom, Int_t event, Int_t px, Int_t py) = 0;
0086    virtual void ExecuteVolumeEvent(TGeoVolume *volume, Int_t event, Int_t px, Int_t py) = 0;
0087    virtual Int_t GetColor(Int_t base, Float_t light) const = 0;
0088    virtual Int_t GetNsegments() const = 0;
0089    virtual void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const = 0;
0090    virtual Int_t GetBombMode() const = 0;
0091    virtual const char *GetDrawPath() const = 0;
0092    virtual TGeoVolume *GetDrawnVolume() const = 0;
0093    virtual TGeoVolume *GetTopVolume() const = 0;
0094    virtual void GetViewAngles(Double_t & /*longitude*/, Double_t & /*latitude*/, Double_t & /*psi*/) {}
0095    virtual Int_t GetVisLevel() const = 0;
0096    virtual Int_t GetVisOption() const = 0;
0097    virtual const char *GetVolumeInfo(const TGeoVolume *volume, Int_t px, Int_t py) const = 0;
0098    virtual void GrabFocus(Int_t nfr = 0, Double_t dlong = 0, Double_t dlat = 0, Double_t dpsi = 0) = 0;
0099    virtual Double_t *GetViewBox() = 0;
0100    virtual Bool_t IsPaintingShape() const = 0;
0101    virtual Bool_t IsRaytracing() const = 0;
0102    virtual Bool_t IsExplodedView() const = 0;
0103    virtual TH2F *LegoPlot(Int_t ntheta = 60, Double_t themin = 0., Double_t themax = 180., Int_t nphi = 90,
0104                           Double_t phimin = 0., Double_t phimax = 360., Double_t rmin = 0., Double_t rmax = 9999999,
0105                           Option_t *option = "") = 0;
0106    virtual void ModifiedPad(Bool_t update = kFALSE) const = 0;
0107    virtual void OpProgress(const char *opname, Long64_t current, Long64_t size, TStopwatch *watch = nullptr,
0108                            Bool_t last = kFALSE, Bool_t refresh = kFALSE, const char *msg = "") = 0;
0109    void Paint(Option_t *option = "") override = 0;
0110    virtual void PaintNode(TGeoNode *node, Option_t *option = "", TGeoMatrix *global = nullptr) = 0;
0111    virtual void PaintShape(TGeoShape *shape, Option_t *option = "") = 0;
0112    virtual void PaintOverlap(void *ovlp, Option_t *option = "") = 0;
0113    virtual void PrintOverlaps() const = 0;
0114    virtual void PaintVolume(TGeoVolume *vol, Option_t *option = "", TGeoMatrix *global = nullptr) = 0;
0115    virtual void RandomPoints(const TGeoVolume *vol, Int_t npoints, Option_t *option = "") = 0;
0116    virtual void RandomRays(Int_t nrays, Double_t startx, Double_t starty, Double_t startz, const char *target_vol,
0117                            Bool_t check_norm) = 0;
0118    virtual void Raytrace(Option_t *option = "") = 0;
0119    virtual TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil, const char *g3path) = 0;
0120    virtual void
0121    SetBombFactors(Double_t bombx = 1.3, Double_t bomby = 1.3, Double_t bombz = 1.3, Double_t bombr = 1.3) = 0;
0122    virtual void SetClippingShape(TGeoShape *shape) = 0;
0123    virtual void SetExplodedView(Int_t iopt = 0) = 0;
0124    virtual void SetGeoManager(TGeoManager *geom) = 0;
0125    virtual void SetIteratorPlugin(TGeoIteratorPlugin *plugin) = 0;
0126    virtual void SetCheckedNode(TGeoNode *node) = 0;
0127    virtual void SetNsegments(Int_t nseg = 20) = 0;
0128    virtual void SetNmeshPoints(Int_t npoints) = 0;
0129    virtual void SetRaytracing(Bool_t flag = kTRUE) = 0;
0130    static TVirtualGeoPainter *GeoPainter();
0131    static void SetPainter(const TVirtualGeoPainter *painter);
0132    virtual void SetTopVisible(Bool_t vis = kTRUE) = 0;
0133    virtual void SetTopVolume(TGeoVolume *vol) = 0;
0134    virtual void SetVisLevel(Int_t level = 3) = 0;
0135    virtual void SetVisOption(Int_t option = 0) = 0;
0136    virtual Int_t ShapeDistancetoPrimitive(const TGeoShape *shape, Int_t numpoints, Int_t px, Int_t py) const = 0;
0137    virtual void Test(Int_t npoints, Option_t *option) = 0;
0138    virtual void TestOverlaps(const char *path) = 0;
0139    virtual Bool_t TestVoxels(TGeoVolume *vol) = 0;
0140    virtual void UnbombTranslation(const Double_t *tr, Double_t *bombtr) = 0;
0141    virtual Double_t Weight(Double_t precision, Option_t *option = "v") = 0;
0142 
0143    ClassDefOverride(TVirtualGeoPainter, 0) // Abstract interface for geometry painters
0144 };
0145 
0146 #endif