Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoPainter Class Reference

Class implementing all draw interfaces for a generic 3D viewer using TBuffer3D mechanism.

Definition at line 40 of file TGeoPainter.h.

Public Member Functions

 TGeoPainter (TGeoManager *manager)
 Default constructor.
 
virtual ~TGeoPainter ()
 Default destructor.
 
void AddSize3D (Int_t numpoints, Int_t numsegs, Int_t numpolys) override
 Add numpoints, numsegs, numpolys to the global 3D size.
 
TVirtualGeoTrackAddTrack (Int_t id, Int_t pdgcode, TObject *part) override
 Create a primary TGeoTrack.
 
void AddTrackPoint (Double_t *point, Double_t *box, Bool_t reset=kFALSE) override
 Average center of view of all painted tracklets and compute view box.
 
void BombTranslation (const Double_t *tr, Double_t *bombtr) override
 Get the new 'bombed' translation vector according current exploded view mode.
 
void CheckBoundaryErrors (Int_t ntracks=1000000, Double_t radius=-1.) override
 Check pushes and pulls needed to cross the next boundary with respect to the position given by FindNextBoundary.
 
void CheckBoundaryReference (Int_t icheck=-1) override
 Check the boundary errors reference file created by CheckBoundaryErrors method.
 
void CheckEdit ()
 Check if Ged library is loaded and load geometry editor classe.
 
void CheckGeometry (Int_t nrays, Double_t startx, Double_t starty, Double_t startz) const override
 Geometry checking method (see TGeoChecker).
 
void CheckGeometryFull (Bool_t checkoverlaps=kTRUE, Bool_t checkcrossings=kTRUE, Int_t nrays=10000, const Double_t *vertex=nullptr) override
 Geometry checking method (see: TGeoManager::CheckGeometry())
 
void CheckOverlaps (const TGeoVolume *vol, Double_t ovlp=0.1, Option_t *option="") const override
 Check overlaps for the top volume of the geometry, within a limit OVLP.
 
void CheckPoint (Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="") override
 Check current point in the geometry.
 
void CheckShape (TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option) override
 Test for shape navigation methods.
 
Int_t CountNodes (TGeoVolume *vol, Int_t level) const
 Count number of visible nodes down to a given level.
 
Int_t CountVisibleNodes () override
 Count total number of visible nodes.
 
void DefaultAngles () override
 Set default angles for the current view.
 
void DefaultColors () override
 Set default volume colors according to tracking media.
 
Int_t DistanceToPrimitiveVol (TGeoVolume *vol, Int_t px, Int_t py) override
 Compute the closest distance of approach from point px,py to a volume.
 
void Draw (Option_t *option="") override
 Draw method.
 
void DrawBatemanSol (TGeoBatemanSol *sol, Option_t *option="") override
 Draw the time evolution of a radionuclide.
 
void DrawCurrentPoint (Int_t color) override
 Draw current point in the same view.
 
void DrawOnly (Option_t *option="") override
 Draw only one volume.
 
void DrawOverlap (void *ovlp, Option_t *option="") override
 Draw an overlap.
 
void DrawPanel () override
 
void DrawPath (const char *path, Option_t *option="") override
 Draw all volumes for a given path.
 
void DrawPolygon (const TGeoPolygon *poly) override
 Draw a polygon in 3D.
 
void DrawShape (TGeoShape *shape, Option_t *option="") override
 Draw a shape.
 
void DrawVolume (TGeoVolume *vol, Option_t *option="") override
 Draw method.
 
void EditGeometry (Option_t *option="") override
 Start the geometry editor.
 
void EstimateCameraMove (Double_t tmin, Double_t tmax, Double_t *start, Double_t *end) override
 Estimate camera movement between tmin and tmax for best track display.
 
void ExecuteManagerEvent (TGeoManager *geom, Int_t event, Int_t px, Int_t py) override
 Execute mouse actions on a given volume.
 
void ExecuteShapeEvent (TGeoShape *shape, Int_t event, Int_t px, Int_t py) override
 Execute mouse actions on a given shape.
 
void ExecuteVolumeEvent (TGeoVolume *volume, Int_t event, Int_t px, Int_t py) override
 Execute mouse actions on a given volume.
 
void GetBombFactors (Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const override
 
Int_t GetBombMode () const override
 
TGeoNodeGetCheckedNode ()
 
TGeoCheckerGetChecker ()
 Create/return geometry checker.
 
Int_t GetColor (Int_t base, Float_t light) const override
 Get index of a base color with given light intensity (0,1)
 
TGeoVolumeGetDrawnVolume () const override
 Get currently drawn volume.
 
const char * GetDrawPath () const override
 
Int_t GetNsegments () const override
 
TGeoVolumeGetTopVolume () const override
 
void GetViewAngles (Double_t &longitude, Double_t &latitude, Double_t &psi) override
 Get the current view angles.
 
Double_tGetViewBox () override
 
Int_t GetVisLevel () const override
 
Int_t GetVisOption () const override
 
const char * GetVolumeInfo (const TGeoVolume *volume, Int_t px, Int_t py) const override
 Get some info about the current selected volume.
 
void GrabFocus (Int_t nfr=0, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0) override
 Move focus to current volume.
 
Bool_t IsExplodedView () const override
 
Bool_t IsPaintingShape () const override
 
Bool_t IsRaytracing () const override
 
TH2FLegoPlot (Int_t ntheta=60, Double_t themin=0., Double_t themax=180., Int_t nphi=90, Double_t phimin=0., Double_t phimax=360., Double_t rmin=0., Double_t rmax=9999999, Option_t *option="") override
 Generate a lego plot fot the top volume, according to option.
 
void Lock (Bool_t flag=kTRUE)
 
void ModifiedPad (Bool_t update=kFALSE) const override
 Check if a pad and view are present and send signal "Modified" to pad.
 
void OpProgress (const char *opname, Long64_t current, Long64_t size, TStopwatch *watch=nullptr, Bool_t last=kFALSE, Bool_t refresh=kFALSE, const char *msg="") override
 Text progress bar.
 
void Paint (Option_t *option="") override
 Paint current geometry according to option.
 
void PaintNode (TGeoNode *node, Option_t *option="", TGeoMatrix *global=nullptr) override
 Paint recursively a node and its content according to visualization options.
 
void PaintOverlap (void *ovlp, Option_t *option="") override
 Paint an overlap.
 
void PaintPhysicalNode (TGeoPhysicalNode *node, Option_t *option="")
 Paints a physical node associated with a path.
 
Bool_t PaintShape (const TGeoShape &shape, Option_t *option) const
 Paint the supplied shape into the current 3D viewer.
 
void PaintShape (TGeoShape *shape, Option_t *option="") override
 Paint an overlap.
 
void PaintVolume (TGeoVolume *vol, Option_t *option="", TGeoMatrix *global=nullptr) override
 Paint recursively a node and its content according to visualization options.
 
void PrintOverlaps () const override
 Print overlaps (see TGeoChecker::PrintOverlaps())
 
void RandomPoints (const TGeoVolume *vol, Int_t npoints, Option_t *option="") override
 Draw random points in the bounding box of a volume.
 
void RandomRays (Int_t nrays, Double_t startx, Double_t starty, Double_t startz, const char *target_vol=nullptr, Bool_t check_norm=kFALSE) override
 Shoot nrays in the current drawn geometry.
 
void Raytrace (Option_t *option="") override
 Raytrace current drawn geometry.
 
TGeoNodeSamplePoints (Int_t npoints, Double_t &dist, Double_t epsil, const char *g3path) override
 Shoot npoints randomly in a box of 1E-5 around current point.
 
void SetBombFactors (Double_t bombx=1.3, Double_t bomby=1.3, Double_t bombz=1.3, Double_t bombr=1.3) override
 Set cartesian and radial bomb factors for translations.
 
void SetCheckedNode (TGeoNode *node) override
 Select a node to be checked for overlaps.
 
void SetClippingShape (TGeoShape *shape) override
 
void SetExplodedView (Int_t iopt=0) override
 Set type of exploding view.
 
void SetGeoManager (TGeoManager *geom) override
 
void SetIteratorPlugin (TGeoIteratorPlugin *plugin) override
 
void SetNmeshPoints (Int_t npoints) override
 Set number of points to be generated on the shape outline when checking for overlaps.
 
void SetNsegments (Int_t nseg=20) override
 Set number of segments to approximate circles.
 
void SetRaytracing (Bool_t flag=kTRUE) override
 
void SetTopVisible (Bool_t vis=kTRUE) override
 Set top geometry volume as visible.
 
void SetTopVolume (TGeoVolume *vol) override
 
void SetVisLevel (Int_t level=3) override
 Set default level down to which visualization is performed.
 
void SetVisOption (Int_t option=0) override
 Set drawing mode :
 
Int_t ShapeDistancetoPrimitive (const TGeoShape *shape, Int_t numpoints, Int_t px, Int_t py) const override
 Returns distance between point px,py on the pad an a shape.
 
void Test (Int_t npoints, Option_t *option) override
 Check time of finding "Where am I" for n points.
 
void TestOverlaps (const char *path) override
 Geometry overlap checker based on sampling.
 
Bool_t TestVoxels (TGeoVolume *vol) override
 Check voxels efficiency per volume.
 
void UnbombTranslation (const Double_t *tr, Double_t *bombtr) override
 Get the new 'unbombed' translation vector according current exploded view mode.
 
Double_t Weight (Double_t precision, Option_t *option="v") override
 Compute weight [kg] of the current volume.
 
- Public Member Functions inherited from TVirtualGeoPainter
 TVirtualGeoPainter (TGeoManager *manager)
 Geometry painter default constructor.
 
virtual ~TVirtualGeoPainter ()
 Geometry painter default destructor.
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout.
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification.
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Protected Member Functions

void ClearVisibleVolumes ()
 Clear the list of visible volumes reset the kVisOnScreen bit for volumes previously in the list.
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected).
 
void MakeZombie ()
 

Private Member Functions

void DefineColors () const
 Define 100 colors with increasing light intensities for each basic color (1-7) Register these colors at indexes starting with 1000.
 
void LocalToMasterVect (const Double_t *local, Double_t *master) const
 Convert a local vector according view rotation matrix.
 

Private Attributes

Double_t fBombR
 
Double_t fBombX
 
Double_t fBombY
 
Double_t fBombZ
 
TBuffer3DfBuffer
 
Double_t fCheckedBox [6]
 
TGeoNodefCheckedNode
 
TGeoCheckerfChecker
 
TGeoShapefClippingShape
 
Int_t fExplodedView
 
TGeoManagerfGeoManager
 
TGeoHMatrixfGlobal
 
Bool_t fIsEditable
 
Bool_t fIsPaintingShape
 
Bool_t fIsRaytracing
 
TGeoVolumefLastVolume
 
Double_t fMat [9]
 
Int_t fNsegments
 
Int_t fNVisNodes
 
TGeoOverlapfOverlap
 
Bool_t fPaintingOverlaps
 
TGeoIteratorPluginfPlugin
 
Bool_t fTopVisible
 
TGeoVolumefTopVolume
 
TString fVisBranch
 
Int_t fVisLevel
 
Bool_t fVisLock
 
Int_t fVisOption
 
TObjArrayfVisVolumes
 
TString fVolInfo
 

Additional Inherited Members

- Public Types inherited from TVirtualGeoPainter
enum  EGeoBombOption { kGeoNoBomb = 0 , kGeoBombXYZ = 1 , kGeoBombCyl = 2 , kGeoBombSph = 3 }
 
enum  EGeoVisLevel { kGeoVisLevel = 0 }
 
enum  EGeoVisOption {
  kGeoVisDefault = 0 , kGeoVisLeaves = 1 , kGeoVisOnly = 2 , kGeoVisBranch = 3 ,
  kGeoVisChanged = 4
}
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 
- Static Public Member Functions inherited from TVirtualGeoPainter
static TVirtualGeoPainterGeoPainter ()
 Static function returning a pointer to the geometry painter.
 
static void SetPainter (const TVirtualGeoPainter *painter)
 Static function to set an alternative histogram painter.
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 
- Protected Types inherited from TObject
enum  { kOnlyPrepStep = BIT(3) }
 
- Static Protected Attributes inherited from TVirtualGeoPainter
static TVirtualGeoPainterfgGeoPainter = 0
 

#include <TGeoPainter.h>

Inheritance diagram for TGeoPainter:
[legend]

Constructor & Destructor Documentation

◆ TGeoPainter()

TGeoPainter::TGeoPainter ( TGeoManager manager)

Default constructor.

Definition at line 65 of file TGeoPainter.cxx.

◆ ~TGeoPainter()

TGeoPainter::~TGeoPainter ( )
virtual

Default destructor.

Definition at line 107 of file TGeoPainter.cxx.

Member Function Documentation

◆ AddSize3D()

void TGeoPainter::AddSize3D ( Int_t  numpoints,
Int_t  numsegs,
Int_t  numpolys 
)
overridevirtual

Add numpoints, numsegs, numpolys to the global 3D size.

Implements TVirtualGeoPainter.

Definition at line 118 of file TGeoPainter.cxx.

◆ AddTrack()

TVirtualGeoTrack * TGeoPainter::AddTrack ( Int_t  id,
Int_t  pdgcode,
TObject part 
)
overridevirtual

Create a primary TGeoTrack.

Implements TVirtualGeoPainter.

Definition at line 127 of file TGeoPainter.cxx.

◆ AddTrackPoint()

void TGeoPainter::AddTrackPoint ( Double_t point,
Double_t box,
Bool_t  reset = kFALSE 
)
overridevirtual

Average center of view of all painted tracklets and compute view box.

Implements TVirtualGeoPainter.

Definition at line 135 of file TGeoPainter.cxx.

◆ BombTranslation()

void TGeoPainter::BombTranslation ( const Double_t tr,
Double_t bombtr 
)
overridevirtual

Get the new 'bombed' translation vector according current exploded view mode.

Implements TVirtualGeoPainter.

Definition at line 165 of file TGeoPainter.cxx.

◆ CheckBoundaryErrors()

void TGeoPainter::CheckBoundaryErrors ( Int_t  ntracks = 1000000,
Double_t  radius = -1. 
)
overridevirtual

Check pushes and pulls needed to cross the next boundary with respect to the position given by FindNextBoundary.

If radius is not mentioned the full bounding box will be sampled.

Implements TVirtualGeoPainter.

Definition at line 196 of file TGeoPainter.cxx.

◆ CheckBoundaryReference()

void TGeoPainter::CheckBoundaryReference ( Int_t  icheck = -1)
overridevirtual

Check the boundary errors reference file created by CheckBoundaryErrors method.

The shape for which the crossing failed is drawn with the starting point in red and the extrapolated point to boundary (+/- failing push/pull) in yellow.

Implements TVirtualGeoPainter.

Definition at line 206 of file TGeoPainter.cxx.

◆ CheckEdit()

void TGeoPainter::CheckEdit ( )

Check if Ged library is loaded and load geometry editor classe.

Definition at line 654 of file TGeoPainter.cxx.

◆ CheckGeometry()

void TGeoPainter::CheckGeometry ( Int_t  nrays,
Double_t  startx,
Double_t  starty,
Double_t  startz 
) const
overridevirtual

Geometry checking method (see TGeoChecker).

Implements TVirtualGeoPainter.

Definition at line 222 of file TGeoPainter.cxx.

◆ CheckGeometryFull()

void TGeoPainter::CheckGeometryFull ( Bool_t  checkoverlaps = kTRUE,
Bool_t  checkcrossings = kTRUE,
Int_t  nrays = 10000,
const Double_t vertex = nullptr 
)
overridevirtual

Geometry checking method (see: TGeoManager::CheckGeometry())

Implements TVirtualGeoPainter.

Definition at line 214 of file TGeoPainter.cxx.

◆ CheckOverlaps()

void TGeoPainter::CheckOverlaps ( const TGeoVolume vol,
Double_t  ovlp = 0.1,
Option_t option = "" 
) const
overridevirtual

Check overlaps for the top volume of the geometry, within a limit OVLP.

Implements TVirtualGeoPainter.

Definition at line 230 of file TGeoPainter.cxx.

◆ CheckPoint()

void TGeoPainter::CheckPoint ( Double_t  x = 0,
Double_t  y = 0,
Double_t  z = 0,
Option_t option = "" 
)
overridevirtual

Check current point in the geometry.

Implements TVirtualGeoPainter.

Definition at line 238 of file TGeoPainter.cxx.

◆ CheckShape()

void TGeoPainter::CheckShape ( TGeoShape shape,
Int_t  testNo,
Int_t  nsamples,
Option_t option 
)
overridevirtual

Test for shape navigation methods.

Summary for test numbers:

  • 1: DistFromInside/Outside. Sample points inside the shape. Generate directions randomly in cos(theta). Compute DistFromInside and move the point with bigger distance. Compute DistFromOutside back from new point. Plot d-(d1+d2)

Implements TVirtualGeoPainter.

Definition at line 250 of file TGeoPainter.cxx.

◆ ClearVisibleVolumes()

void TGeoPainter::ClearVisibleVolumes ( )
protected

Clear the list of visible volumes reset the kVisOnScreen bit for volumes previously in the list.

Definition at line 259 of file TGeoPainter.cxx.

◆ CountNodes()

Int_t TGeoPainter::CountNodes ( TGeoVolume vol,
Int_t  level 
) const

Count number of visible nodes down to a given level.

Definition at line 559 of file TGeoPainter.cxx.

◆ CountVisibleNodes()

Int_t TGeoPainter::CountVisibleNodes ( )
overridevirtual

Count total number of visible nodes.

Implements TVirtualGeoPainter.

Definition at line 609 of file TGeoPainter.cxx.

◆ DefaultAngles()

void TGeoPainter::DefaultAngles ( )
overridevirtual

Set default angles for the current view.

Implements TVirtualGeoPainter.

Definition at line 533 of file TGeoPainter.cxx.

◆ DefaultColors()

void TGeoPainter::DefaultColors ( )
overridevirtual

Set default volume colors according to tracking media.

Implements TVirtualGeoPainter.

Definition at line 547 of file TGeoPainter.cxx.

◆ DefineColors()

void TGeoPainter::DefineColors ( ) const
private

Define 100 colors with increasing light intensities for each basic color (1-7) Register these colors at indexes starting with 1000.

Definition at line 275 of file TGeoPainter.cxx.

◆ DistanceToPrimitiveVol()

Int_t TGeoPainter::DistanceToPrimitiveVol ( TGeoVolume vol,
Int_t  px,
Int_t  py 
)
overridevirtual

Compute the closest distance of approach from point px,py to a volume.

Implements TVirtualGeoPainter.

Definition at line 340 of file TGeoPainter.cxx.

◆ Draw()

void TGeoPainter::Draw ( Option_t option = "")
overridevirtual

Draw method.

Reimplemented from TObject.

Definition at line 684 of file TGeoPainter.cxx.

◆ DrawBatemanSol()

void TGeoPainter::DrawBatemanSol ( TGeoBatemanSol sol,
Option_t option = "" 
)
overridevirtual

Draw the time evolution of a radionuclide.

Implements TVirtualGeoPainter.

Definition at line 692 of file TGeoPainter.cxx.

◆ DrawCurrentPoint()

void TGeoPainter::DrawCurrentPoint ( Int_t  color)
overridevirtual

Draw current point in the same view.

Implements TVirtualGeoPainter.

Definition at line 955 of file TGeoPainter.cxx.

◆ DrawOnly()

void TGeoPainter::DrawOnly ( Option_t option = "")
overridevirtual

Draw only one volume.

Implements TVirtualGeoPainter.

Definition at line 915 of file TGeoPainter.cxx.

◆ DrawOverlap()

void TGeoPainter::DrawOverlap ( void ovlp,
Option_t option = "" 
)
overridevirtual

Draw an overlap.

Implements TVirtualGeoPainter.

Definition at line 868 of file TGeoPainter.cxx.

◆ DrawPanel()

void TGeoPainter::DrawPanel ( )
overridevirtual

Implements TVirtualGeoPainter.

Definition at line 970 of file TGeoPainter.cxx.

◆ DrawPath()

void TGeoPainter::DrawPath ( const char *  path,
Option_t option = "" 
)
overridevirtual

Draw all volumes for a given path.

Implements TVirtualGeoPainter.

Definition at line 977 of file TGeoPainter.cxx.

◆ DrawPolygon()

void TGeoPainter::DrawPolygon ( const TGeoPolygon poly)
overridevirtual

Draw a polygon in 3D.

Implements TVirtualGeoPainter.

Definition at line 732 of file TGeoPainter.cxx.

◆ DrawShape()

void TGeoPainter::DrawShape ( TGeoShape shape,
Option_t option = "" 
)
overridevirtual

Draw a shape.

Implements TVirtualGeoPainter.

Definition at line 832 of file TGeoPainter.cxx.

◆ DrawVolume()

void TGeoPainter::DrawVolume ( TGeoVolume vol,
Option_t option = "" 
)
overridevirtual

Draw method.

Implements TVirtualGeoPainter.

Definition at line 781 of file TGeoPainter.cxx.

◆ EditGeometry()

void TGeoPainter::EditGeometry ( Option_t option = "")
overridevirtual

Start the geometry editor.

Implements TVirtualGeoPainter.

Definition at line 669 of file TGeoPainter.cxx.

◆ EstimateCameraMove()

void TGeoPainter::EstimateCameraMove ( Double_t  tmin,
Double_t  tmax,
Double_t start,
Double_t end 
)
overridevirtual

Estimate camera movement between tmin and tmax for best track display.

Reimplemented from TVirtualGeoPainter.

Definition at line 990 of file TGeoPainter.cxx.

◆ ExecuteManagerEvent()

void TGeoPainter::ExecuteManagerEvent ( TGeoManager geom,
Int_t  event,
Int_t  px,
Int_t  py 
)
overridevirtual

Execute mouse actions on a given volume.

Implements TVirtualGeoPainter.

Definition at line 1020 of file TGeoPainter.cxx.

◆ ExecuteShapeEvent()

void TGeoPainter::ExecuteShapeEvent ( TGeoShape shape,
Int_t  event,
Int_t  px,
Int_t  py 
)
overridevirtual

Execute mouse actions on a given shape.

Implements TVirtualGeoPainter.

Definition at line 1033 of file TGeoPainter.cxx.

◆ ExecuteVolumeEvent()

void TGeoPainter::ExecuteVolumeEvent ( TGeoVolume volume,
Int_t  event,
Int_t  px,
Int_t  py 
)
overridevirtual

Execute mouse actions on a given volume.

Implements TVirtualGeoPainter.

Definition at line 1046 of file TGeoPainter.cxx.

◆ GetBombFactors()

void TGeoPainter::GetBombFactors ( Double_t bombx,
Double_t bomby,
Double_t bombz,
Double_t bombr 
) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 116 of file TGeoPainter.h.

◆ GetBombMode()

Int_t TGeoPainter::GetBombMode ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 118 of file TGeoPainter.h.

◆ GetCheckedNode()

TGeoNode * TGeoPainter::GetCheckedNode ( )
inline

Definition at line 119 of file TGeoPainter.h.

◆ GetChecker()

TGeoChecker * TGeoPainter::GetChecker ( )

Create/return geometry checker.

Definition at line 1116 of file TGeoPainter.cxx.

◆ GetColor()

Int_t TGeoPainter::GetColor ( Int_t  base,
Float_t  light 
) const
overridevirtual

Get index of a base color with given light intensity (0,1)

Implements TVirtualGeoPainter.

Definition at line 288 of file TGeoPainter.cxx.

◆ GetDrawnVolume()

TGeoVolume * TGeoPainter::GetDrawnVolume ( ) const
overridevirtual

Get currently drawn volume.

Implements TVirtualGeoPainter.

Definition at line 331 of file TGeoPainter.cxx.

◆ GetDrawPath()

const char * TGeoPainter::GetDrawPath ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 122 of file TGeoPainter.h.

◆ GetNsegments()

Int_t TGeoPainter::GetNsegments ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 127 of file TGeoPainter.h.

◆ GetTopVolume()

TGeoVolume * TGeoPainter::GetTopVolume ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 124 of file TGeoPainter.h.

◆ GetViewAngles()

void TGeoPainter::GetViewAngles ( Double_t longitude,
Double_t latitude,
Double_t psi 
)
overridevirtual

Get the current view angles.

Reimplemented from TVirtualGeoPainter.

Definition at line 1125 of file TGeoPainter.cxx.

◆ GetViewBox()

Double_t * TGeoPainter::GetViewBox ( )
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 129 of file TGeoPainter.h.

◆ GetVisLevel()

Int_t TGeoPainter::GetVisLevel ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 125 of file TGeoPainter.h.

◆ GetVisOption()

Int_t TGeoPainter::GetVisOption ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 126 of file TGeoPainter.h.

◆ GetVolumeInfo()

const char * TGeoPainter::GetVolumeInfo ( const TGeoVolume volume,
Int_t  px,
Int_t  py 
) const
overridevirtual

Get some info about the current selected volume.

Implements TVirtualGeoPainter.

Definition at line 1091 of file TGeoPainter.cxx.

◆ GrabFocus()

void TGeoPainter::GrabFocus ( Int_t  nfr = 0,
Double_t  dlong = 0,
Double_t  dlat = 0,
Double_t  dpsi = 0 
)
overridevirtual

Move focus to current volume.

Implements TVirtualGeoPainter.

Definition at line 1138 of file TGeoPainter.cxx.

◆ IsExplodedView()

Bool_t TGeoPainter::IsExplodedView ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 131 of file TGeoPainter.h.

◆ IsPaintingShape()

Bool_t TGeoPainter::IsPaintingShape ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 133 of file TGeoPainter.h.

◆ IsRaytracing()

Bool_t TGeoPainter::IsRaytracing ( ) const
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 132 of file TGeoPainter.h.

◆ LegoPlot()

TH2F * TGeoPainter::LegoPlot ( Int_t  ntheta = 60,
Double_t  themin = 0.,
Double_t  themax = 180.,
Int_t  nphi = 90,
Double_t  phimin = 0.,
Double_t  phimax = 360.,
Double_t  rmin = 0.,
Double_t  rmax = 9999999,
Option_t option = "" 
)
overridevirtual

Generate a lego plot fot the top volume, according to option.

Implements TVirtualGeoPainter.

Definition at line 1167 of file TGeoPainter.cxx.

◆ LocalToMasterVect()

void TGeoPainter::LocalToMasterVect ( const Double_t local,
Double_t master 
) const
private

Convert a local vector according view rotation matrix.

Definition at line 1176 of file TGeoPainter.cxx.

◆ Lock()

void TGeoPainter::Lock ( Bool_t  flag = kTRUE)
inline

Definition at line 137 of file TGeoPainter.h.

◆ ModifiedPad()

void TGeoPainter::ModifiedPad ( Bool_t  update = kFALSE) const
overridevirtual

Check if a pad and view are present and send signal "Modified" to pad.

Implements TVirtualGeoPainter.

Definition at line 1185 of file TGeoPainter.cxx.

◆ OpProgress()

void TGeoPainter::OpProgress ( const char *  opname,
Long64_t  current,
Long64_t  size,
TStopwatch watch = nullptr,
Bool_t  last = kFALSE,
Bool_t  refresh = kFALSE,
const char *  msg = "" 
)
overridevirtual

Text progress bar.

Implements TVirtualGeoPainter.

Definition at line 1584 of file TGeoPainter.cxx.

◆ Paint()

void TGeoPainter::Paint ( Option_t option = "")
overridevirtual

Paint current geometry according to option.

Implements TVirtualGeoPainter.

Definition at line 1202 of file TGeoPainter.cxx.

◆ PaintNode()

void TGeoPainter::PaintNode ( TGeoNode node,
Option_t option = "",
TGeoMatrix global = nullptr 
)
overridevirtual

Paint recursively a node and its content according to visualization options.

Implements TVirtualGeoPainter.

Definition at line 1287 of file TGeoPainter.cxx.

◆ PaintOverlap()

void TGeoPainter::PaintOverlap ( void ovlp,
Option_t option = "" 
)
overridevirtual

Paint an overlap.

Implements TVirtualGeoPainter.

Definition at line 1239 of file TGeoPainter.cxx.

◆ PaintPhysicalNode()

void TGeoPainter::PaintPhysicalNode ( TGeoPhysicalNode node,
Option_t option = "" 
)

Paints a physical node associated with a path.

Definition at line 1512 of file TGeoPainter.cxx.

◆ PaintShape() [1/2]

Bool_t TGeoPainter::PaintShape ( const TGeoShape shape,
Option_t option 
) const

Paint the supplied shape into the current 3D viewer.

Definition at line 1453 of file TGeoPainter.cxx.

◆ PaintShape() [2/2]

void TGeoPainter::PaintShape ( TGeoShape shape,
Option_t option = "" 
)
overridevirtual

Paint an overlap.

Implements TVirtualGeoPainter.

Definition at line 1501 of file TGeoPainter.cxx.

◆ PaintVolume()

void TGeoPainter::PaintVolume ( TGeoVolume vol,
Option_t option = "",
TGeoMatrix global = nullptr 
)
overridevirtual

Paint recursively a node and its content according to visualization options.

Implements TVirtualGeoPainter.

Definition at line 1295 of file TGeoPainter.cxx.

◆ PrintOverlaps()

void TGeoPainter::PrintOverlaps ( ) const
overridevirtual

Print overlaps (see TGeoChecker::PrintOverlaps())

Implements TVirtualGeoPainter.

Definition at line 1576 of file TGeoPainter.cxx.

◆ RandomPoints()

void TGeoPainter::RandomPoints ( const TGeoVolume vol,
Int_t  npoints,
Option_t option = "" 
)
overridevirtual

Draw random points in the bounding box of a volume.

Implements TVirtualGeoPainter.

Definition at line 1592 of file TGeoPainter.cxx.

◆ RandomRays()

void TGeoPainter::RandomRays ( Int_t  nrays,
Double_t  startx,
Double_t  starty,
Double_t  startz,
const char *  target_vol = nullptr,
Bool_t  check_norm = kFALSE 
)
overridevirtual

Shoot nrays in the current drawn geometry.

Implements TVirtualGeoPainter.

Definition at line 1600 of file TGeoPainter.cxx.

◆ Raytrace()

void TGeoPainter::Raytrace ( Option_t option = "")
overridevirtual

Raytrace current drawn geometry.

Implements TVirtualGeoPainter.

Definition at line 1608 of file TGeoPainter.cxx.

◆ SamplePoints()

TGeoNode * TGeoPainter::SamplePoints ( Int_t  npoints,
Double_t dist,
Double_t  epsil,
const char *  g3path 
)
overridevirtual

Shoot npoints randomly in a box of 1E-5 around current point.

Return minimum distance to points outside.

Implements TVirtualGeoPainter.

Definition at line 1822 of file TGeoPainter.cxx.

◆ SetBombFactors()

void TGeoPainter::SetBombFactors ( Double_t  bombx = 1.3,
Double_t  bomby = 1.3,
Double_t  bombz = 1.3,
Double_t  bombr = 1.3 
)
overridevirtual

Set cartesian and radial bomb factors for translations.

Implements TVirtualGeoPainter.

Definition at line 1831 of file TGeoPainter.cxx.

◆ SetCheckedNode()

void TGeoPainter::SetCheckedNode ( TGeoNode node)
overridevirtual

Select a node to be checked for overlaps.

All overlaps not involving it will be ignored.

Implements TVirtualGeoPainter.

Definition at line 1893 of file TGeoPainter.cxx.

◆ SetClippingShape()

void TGeoPainter::SetClippingShape ( TGeoShape shape)
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 153 of file TGeoPainter.h.

◆ SetExplodedView()

void TGeoPainter::SetExplodedView ( Int_t  iopt = 0)
overridevirtual

Set type of exploding view.

Implements TVirtualGeoPainter.

Definition at line 1843 of file TGeoPainter.cxx.

◆ SetGeoManager()

void TGeoPainter::SetGeoManager ( TGeoManager geom)
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 157 of file TGeoPainter.h.

◆ SetIteratorPlugin()

void TGeoPainter::SetIteratorPlugin ( TGeoIteratorPlugin plugin)
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 158 of file TGeoPainter.h.

◆ SetNmeshPoints()

void TGeoPainter::SetNmeshPoints ( Int_t  npoints)
overridevirtual

Set number of points to be generated on the shape outline when checking for overlaps.

Implements TVirtualGeoPainter.

Definition at line 1885 of file TGeoPainter.cxx.

◆ SetNsegments()

void TGeoPainter::SetNsegments ( Int_t  nseg = 20)
overridevirtual

Set number of segments to approximate circles.

Implements TVirtualGeoPainter.

Definition at line 1871 of file TGeoPainter.cxx.

◆ SetRaytracing()

void TGeoPainter::SetRaytracing ( Bool_t  flag = kTRUE)
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 160 of file TGeoPainter.h.

◆ SetTopVisible()

void TGeoPainter::SetTopVisible ( Bool_t  vis = kTRUE)
overridevirtual

Set top geometry volume as visible.

Implements TVirtualGeoPainter.

Definition at line 1922 of file TGeoPainter.cxx.

◆ SetTopVolume()

void TGeoPainter::SetTopVolume ( TGeoVolume vol)
inlineoverridevirtual

Implements TVirtualGeoPainter.

Definition at line 162 of file TGeoPainter.h.

◆ SetVisLevel()

void TGeoPainter::SetVisLevel ( Int_t  level = 3)
overridevirtual

Set default level down to which visualization is performed.

Implements TVirtualGeoPainter.

Definition at line 1900 of file TGeoPainter.cxx.

◆ SetVisOption()

void TGeoPainter::SetVisOption ( Int_t  option = 0)
overridevirtual

Set drawing mode :

  • option=0 (default) all nodes drawn down to vislevel
  • option=1 leaves and nodes at vislevel drawn
  • option=2 path is drawn

Implements TVirtualGeoPainter.

Definition at line 1935 of file TGeoPainter.cxx.

◆ ShapeDistancetoPrimitive()

Int_t TGeoPainter::ShapeDistancetoPrimitive ( const TGeoShape shape,
Int_t  numpoints,
Int_t  px,
Int_t  py 
) const
overridevirtual

Returns distance between point px,py on the pad an a shape.

Implements TVirtualGeoPainter.

Definition at line 1979 of file TGeoPainter.cxx.

◆ Test()

void TGeoPainter::Test ( Int_t  npoints,
Option_t option 
)
overridevirtual

Check time of finding "Where am I" for n points.

Implements TVirtualGeoPainter.

Definition at line 2032 of file TGeoPainter.cxx.

◆ TestOverlaps()

void TGeoPainter::TestOverlaps ( const char *  path)
overridevirtual

Geometry overlap checker based on sampling.

Implements TVirtualGeoPainter.

Definition at line 2040 of file TGeoPainter.cxx.

◆ TestVoxels()

Bool_t TGeoPainter::TestVoxels ( TGeoVolume vol)
overridevirtual

Check voxels efficiency per volume.

Implements TVirtualGeoPainter.

Definition at line 2048 of file TGeoPainter.cxx.

◆ UnbombTranslation()

void TGeoPainter::UnbombTranslation ( const Double_t tr,
Double_t bombtr 
)
overridevirtual

Get the new 'unbombed' translation vector according current exploded view mode.

Implements TVirtualGeoPainter.

Definition at line 2056 of file TGeoPainter.cxx.

◆ Weight()

Double_t TGeoPainter::Weight ( Double_t  precision,
Option_t option = "v" 
)
overridevirtual

Compute weight [kg] of the current volume.

Implements TVirtualGeoPainter.

Definition at line 2085 of file TGeoPainter.cxx.

Member Data Documentation

◆ fBombR

Double_t TGeoPainter::fBombR
private

Definition at line 45 of file TGeoPainter.h.

◆ fBombX

Double_t TGeoPainter::fBombX
private

Definition at line 42 of file TGeoPainter.h.

◆ fBombY

Double_t TGeoPainter::fBombY
private

Definition at line 43 of file TGeoPainter.h.

◆ fBombZ

Double_t TGeoPainter::fBombZ
private

Definition at line 44 of file TGeoPainter.h.

◆ fBuffer

TBuffer3D* TGeoPainter::fBuffer
private

Definition at line 63 of file TGeoPainter.h.

◆ fCheckedBox

Double_t TGeoPainter::fCheckedBox[6]
private

Definition at line 46 of file TGeoPainter.h.

◆ fCheckedNode

TGeoNode* TGeoPainter::fCheckedNode
private

Definition at line 60 of file TGeoPainter.h.

◆ fChecker

TGeoChecker* TGeoPainter::fChecker
private

Definition at line 65 of file TGeoPainter.h.

◆ fClippingShape

TGeoShape* TGeoPainter::fClippingShape
private

Definition at line 66 of file TGeoPainter.h.

◆ fExplodedView

Int_t TGeoPainter::fExplodedView
private

Definition at line 52 of file TGeoPainter.h.

◆ fGeoManager

TGeoManager* TGeoPainter::fGeoManager
private

Definition at line 64 of file TGeoPainter.h.

◆ fGlobal

TGeoHMatrix* TGeoPainter::fGlobal
private

Definition at line 62 of file TGeoPainter.h.

◆ fIsEditable

Bool_t TGeoPainter::fIsEditable
private

Definition at line 71 of file TGeoPainter.h.

◆ fIsPaintingShape

Bool_t TGeoPainter::fIsPaintingShape
private

Definition at line 57 of file TGeoPainter.h.

◆ fIsRaytracing

Bool_t TGeoPainter::fIsRaytracing
private

Definition at line 56 of file TGeoPainter.h.

◆ fLastVolume

TGeoVolume* TGeoPainter::fLastVolume
private

Definition at line 68 of file TGeoPainter.h.

◆ fMat

Double_t TGeoPainter::fMat[9]
private

Definition at line 47 of file TGeoPainter.h.

◆ fNsegments

Int_t TGeoPainter::fNsegments
private

Definition at line 48 of file TGeoPainter.h.

◆ fNVisNodes

Int_t TGeoPainter::fNVisNodes
private

Definition at line 49 of file TGeoPainter.h.

◆ fOverlap

TGeoOverlap* TGeoPainter::fOverlap
private

Definition at line 61 of file TGeoPainter.h.

◆ fPaintingOverlaps

Bool_t TGeoPainter::fPaintingOverlaps
private

Definition at line 55 of file TGeoPainter.h.

◆ fPlugin

TGeoIteratorPlugin* TGeoPainter::fPlugin
private

Definition at line 69 of file TGeoPainter.h.

◆ fTopVisible

Bool_t TGeoPainter::fTopVisible
private

Definition at line 54 of file TGeoPainter.h.

◆ fTopVolume

TGeoVolume* TGeoPainter::fTopVolume
private

Definition at line 67 of file TGeoPainter.h.

◆ fVisBranch

TString TGeoPainter::fVisBranch
private

Definition at line 58 of file TGeoPainter.h.

◆ fVisLevel

Int_t TGeoPainter::fVisLevel
private

Definition at line 50 of file TGeoPainter.h.

◆ fVisLock

Bool_t TGeoPainter::fVisLock
private

Definition at line 53 of file TGeoPainter.h.

◆ fVisOption

Int_t TGeoPainter::fVisOption
private

Definition at line 51 of file TGeoPainter.h.

◆ fVisVolumes

TObjArray* TGeoPainter::fVisVolumes
private

Definition at line 70 of file TGeoPainter.h.

◆ fVolInfo

TString TGeoPainter::fVolInfo
private

Definition at line 59 of file TGeoPainter.h.

Libraries for TGeoPainter:

The documentation for this class was generated from the following files: