Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoParallelWorld.h
Go to the documentation of this file.
1/*************************************************************************
2 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
3 * All rights reserved. *
4 * *
5 * For the licensing terms see $ROOTSYS/LICENSE. *
6 * For the list of contributors see $ROOTSYS/README/CREDITS. *
7 *************************************************************************/
8
9// Author: Andrei Gheata 30/06/14
10
11#ifndef ROOT_TGeoParallelWorld
12#define ROOT_TGeoParallelWorld
13
14#include "TNamed.h"
15
16// forward declarations
17class TGeoManager;
19class TGeoVolume;
20
22{
23protected :
24 TGeoManager *fGeoManager; // base geometry
25 TObjArray *fPaths; // array of paths
26 Bool_t fUseOverlaps; // Activated if user defined overlapping candidates
27 Bool_t fIsClosed; //! Closed flag
28 TGeoVolume *fVolume; //! helper volume
29 TGeoPhysicalNode *fLastState; //! Last PN touched
30 TObjArray *fPhysical; //! array of physical nodes
31
34
35public:
36 // constructors
38 TGeoParallelWorld(const char *name, TGeoManager *mgr);
39
40 // destructor
41 virtual ~TGeoParallelWorld();
42 // API for adding components nodes
43 void AddNode(const char *path);
44 // Activate/deactivate overlap usage
45 void SetUseOverlaps(Bool_t flag) {fUseOverlaps = flag;}
47 void ResetOverlaps() const;
48 // Adding overlap candidates can highly improve performance.
49 void AddOverlap(TGeoVolume *vol, Bool_t activate=kTRUE);
50 void AddOverlap(const char *volname, Bool_t activate=kTRUE);
51 // The normal PW mode (without declaring overlaps) does detect them
53
54 // Closing a parallel geometry is mandatory
56 // Refresh structures in case of re-alignment
58
59 // Navigation interface
61 TGeoPhysicalNode *FindNextBoundary(Double_t point[3], Double_t dir[3], Double_t &step, Double_t stepmax=1.E30);
62 Double_t Safety(Double_t point[3], Double_t safmax=1.E30);
63
64 // Getters
66 Bool_t IsClosed() const {return fIsClosed;}
67 TGeoVolume *GetVolume() const {return fVolume;}
68
69 // Utilities
70 void CheckOverlaps(Double_t ovlp=0.001); // default 10 microns
71 void Draw(Option_t *option);
72
73 ClassDef(TGeoParallelWorld, 3) // parallel world base class
74};
75
76#endif
77
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:337
Option_t Option_t option
char name[80]
Definition TGX11.cxx:110
The manager class for any TGeo geometry.
Definition TGeoManager.h:45
Base class for a flat parallel geometry.
TGeoManager * fGeoManager
void SetUseOverlaps(Bool_t flag)
Double_t Safety(Double_t point[3], Double_t safmax=1.E30)
Compute safety for the parallel world.
TObjArray * fPhysical
Last PN touched.
TGeoVolume * GetVolume() const
Bool_t CloseGeometry()
The main geometry must be closed.
void AddNode(const char *path)
Add a node normally to this world. Overlapping nodes not allowed.
TGeoPhysicalNode * FindNextBoundary(Double_t point[3], Double_t dir[3], Double_t &step, Double_t stepmax=1.E30)
Same functionality as TGeoNavigator::FindNextDaughterBoundary for the parallel world.
void ResetOverlaps() const
Reset overlapflag for all volumes in geometry.
TGeoManager * GetGeometry() const
Bool_t IsUsingOverlaps() const
TGeoPhysicalNode * FindNode(Double_t point[3])
Finds physical node containing the point.
virtual ~TGeoParallelWorld()
Destructor.
TGeoVolume * fVolume
Closed flag.
Int_t PrintDetectedOverlaps() const
Print the overlaps which were detected during real tracking.
void CheckOverlaps(Double_t ovlp=0.001)
Check overlaps within a tolerance value.
TGeoPhysicalNode * fLastState
helper volume
void AddOverlap(TGeoVolume *vol, Bool_t activate=kTRUE)
To use this optimization, the user should declare the full list of volumes which may overlap with any...
void RefreshPhysicalNodes()
Refresh the node pointers and re-voxelize.
TGeoParallelWorld & operator=(const TGeoParallelWorld &)=delete
TGeoParallelWorld(const TGeoParallelWorld &)=delete
array of physical nodes
Bool_t IsClosed() const
Physical nodes are the actual 'touchable' objects in the geometry, representing a path of positioned ...
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:49
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
An array of TObjects.
Definition TObjArray.h:31
th1 Draw()