Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoManager.h
Go to the documentation of this file.
1// @(#)root/geom:$Id$
2// Author: Andrei Gheata 25/10/01
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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_TGeoManager
13#define ROOT_TGeoManager
14
15#include <mutex>
16#include <thread>
17#include <map>
18
19#include "TNamed.h"
20#include "TObjArray.h"
21#include "TGeoNavigator.h"
22
23// forward declarations
25class TGeoNode;
27class TGeoPNEntry;
28class TGeoVolume;
29class TGeoVolumeMulti;
30class TGeoMatrix;
31class TGeoHMatrix;
32class TGeoMaterial;
33class TGeoMedium;
34class TGeoShape;
37class THashList;
39class TGeoRegion;
40class TGDMLMatrix;
42class TGeoSkinSurface;
44class TGeoColorScheme;
45
46class TGeoManager : public TNamed {
47public:
52
53protected:
54 static std::mutex fgMutex; //! mutex for navigator booking in MT mode
55 static Bool_t fgLock; //! Lock preventing a second geometry to be loaded
56 static Int_t fgVerboseLevel; //! Verbosity level for Info messages (no IO).
57 static Int_t fgMaxLevel; //! Maximum level in geometry
58 static Int_t fgMaxDaughters; //! Maximum number of daughters
59 static Int_t fgMaxXtruVert; //! Maximum number of Xtru vertices
60 static UInt_t fgExportPrecision; //! Precision to be used in ASCII exports
61 static EDefaultUnits fgDefaultUnits; //! Default units in GDML if not explicit in some tags
62
63 TGeoManager(const TGeoManager &) = delete;
64 TGeoManager &operator=(const TGeoManager &) = delete;
65
66private:
67 Double_t fPhimin; //! lowest range for phi cut
68 Double_t fPhimax; //! highest range for phi cut
69 Double_t fTmin; //! lower time limit for tracks drawing
70 Double_t fTmax; //! upper time limit for tracks drawing
71 Int_t fNNodes; // total number of physical nodes
72 TString fPath; //! path to current node
73 TString fParticleName; //! particles to be drawn
74 Double_t fVisDensity; // transparency threshold by density
75 Int_t fExplodedView; // exploded view mode
76 Int_t fVisOption; // global visualization option
77 Int_t fVisLevel; // maximum visualization depth
78 Int_t fNsegments; // number of segments to approximate circles
79 Int_t fNtracks; // number of tracks
80 Int_t fMaxVisNodes; // maximum number of visible nodes
81 TVirtualGeoTrack *fCurrentTrack; //! current track
82 Int_t fNpdg; // number of different pdg's stored
83 Int_t fPdgId[1024]; // pdg conversion table
84 Bool_t fClosed; //! flag that geometry is closed
85 Bool_t fLoopVolumes; //! flag volume lists loop
86 Bool_t fStreamVoxels; // flag to allow voxelization I/O
87 Bool_t fIsGeomReading; //! flag set when reading geometry
88 Bool_t fIsGeomCleaning; //! flag to notify that the manager is being destructed
89 Bool_t fPhiCut; // flag for phi cuts
90 Bool_t fTimeCut; // time cut for tracks
91 Bool_t fDrawExtra; //! flag that the list of physical nodes has to be drawn
92 Bool_t fMatrixTransform; //! flag for using GL matrix
93 Bool_t fMatrixReflection; //! flag for GL reflections
94 Bool_t fActivity; //! switch ON/OFF volume activity (default OFF - all volumes active))
95 Bool_t fIsNodeSelectable; //! flag that nodes are the selected objects in pad rather than volumes
96 TVirtualGeoPainter *fPainter; //! current painter
97 TVirtualGeoChecker *fChecker; //! current checker
98
99 TObjArray *fMatrices; //-> list of local transformations
100 TObjArray *fShapes; //-> list of shapes
101 TObjArray *fVolumes; //-> list of volumes
102 TObjArray *fPhysicalNodes; //-> list of physical nodes
103 TObjArray *fGShapes; //! list of runtime shapes
104 TObjArray *fGVolumes; //! list of runtime volumes
105 TObjArray *fTracks; //-> list of tracks attached to geometry
106 TObjArray *fPdgNames; //-> list of pdg names for tracks
107 TObjArray *fGDMLMatrices; //-> list of matrices read from GDML
108 TObjArray *fOpticalSurfaces; //-> list of optical surfaces read from GDML
109 TObjArray *fSkinSurfaces; //-> list of skin surfaces read from GDML
110 TObjArray *fBorderSurfaces; //-> list of border surfaces read from GDML
111 TList *fMaterials; //-> list of materials
112 TList *fMedia; //-> list of tracking media
113 TObjArray *fNodes; //-> current branch of nodes
114 TObjArray *fOverlaps; //-> list of geometrical overlaps
115 TObjArray *fRegions; //-> list of regions
116 UChar_t *fBits; //! bits used for voxelization
117 // Map of navigator arrays per thread
118 typedef std::map<std::thread::id, TGeoNavigatorArray *> NavigatorsMap_t;
119 typedef NavigatorsMap_t::iterator NavigatorsMapIt_t;
120 typedef std::map<std::thread::id, Int_t> ThreadsMap_t;
121 typedef ThreadsMap_t::const_iterator ThreadsMapIt_t;
122 // Map of constant properties
123 typedef std::map<std::string, Double_t> ConstPropMap_t;
124
125 NavigatorsMap_t fNavigators; //! Map between thread id's and navigator arrays
126 static ThreadsMap_t *fgThreadId; //! Thread id's map
127 static Int_t fgNumThreads; //! Number of registered threads
128 static Bool_t fgLockNavigators; //! Lock existing navigators
129 TGeoNavigator *fCurrentNavigator; //! current navigator
130 TGeoVolume *fCurrentVolume; //! current volume
131 TGeoVolume *fTopVolume; //! top level volume in geometry
132 TGeoNode *fTopNode; //! top physical node
133 TGeoVolume *fMasterVolume; // master volume
134 TGeoHMatrix *fGLMatrix; // matrix to be used for view transformations
135 TObjArray *fUniqueVolumes; //-> list of unique volumes
136 TGeoShape *fClippingShape; //! clipping shape for raytracing
137 TGeoElementTable *fElementTable; //! table of elements
138
139 Int_t fNLevel; // maximum accepted level in geometry
140 TGeoVolume *fPaintVolume; //! volume currently painted
142 THashList *fHashVolumes; //! hash list of volumes providing fast search
143 THashList *fHashGVolumes; //! hash list of group volumes providing fast search
144 THashList *fHashPNE; //-> hash list of physical node entries
145 mutable TObjArray *fArrayPNE; //! array of physical node entries
146 Int_t fSizePNEId; // size of the array of unique ID's for PN entries
147 Int_t fNPNEId; // number of PN entries having a unique ID
148 Int_t *fKeyPNEId; //[fSizePNEId] array of uid values for PN entries
149 Int_t *fValuePNEId; //[fSizePNEId] array of pointers to PN entries with ID's
150 Int_t fMaxThreads; //! Max number of threads
151 Bool_t fMultiThread; //! Flag for multi-threading
152 Int_t fRaytraceMode; //! Raytrace mode: 0=normal, 1=pass through, 2=transparent
153 Bool_t fUsePWNav; // Activate usage of parallel world in navigation
155 ConstPropMap_t fProperties; // Map of user-defined constant properties
156 //--- private methods
158 void Init();
159 Bool_t InitArrayPNE() const;
162 void UpdateElements();
163 void Voxelize(Option_t *option = nullptr);
164
165public:
166 // constructors
167 TGeoManager();
168 TGeoManager(const char *name, const char *title);
169 // destructor
170 ~TGeoManager() override;
171 //--- adding geometrical objects
172 Int_t AddMaterial(const TGeoMaterial *material);
173 Int_t AddOverlap(const TNamed *ovlp);
176 Int_t AddShape(const TGeoShape *shape);
179 Int_t AddVolume(TGeoVolume *volume);
182 Double_t GetProperty(const char *name, Bool_t *error = nullptr) const;
183 Double_t GetProperty(size_t i, TString &name, Bool_t *error = nullptr) const;
184 Int_t GetNproperties() const { return fProperties.size(); }
185 void ClearOverlaps();
186 void RegisterMatrix(const TGeoMatrix *matrix);
187 void SortOverlaps();
188 //--- browsing and tree navigation
189 void Browse(TBrowser *b) override;
190 void SetVisibility(TObject *obj, Bool_t vis);
191 virtual Bool_t cd(const char *path = ""); // *MENU*
192 Bool_t CheckPath(const char *path) const;
193 void CdNode(Int_t nodeid);
194 void CdDown(Int_t index);
195 void CdUp();
196 void CdTop();
197 void CdNext();
198 void GetBranchNames(Int_t *names) const;
200 void GetBranchOnlys(Int_t *isonly) const;
202 const char *GetPdgName(Int_t pdg) const;
203 void SetPdgName(Int_t pdg, const char *name);
204 Bool_t IsFolder() const override { return kTRUE; }
205 //--- visualization settings
206 virtual void Edit(Option_t *option = ""); // *MENU*
209 void ClearAttributes(); // *MENU*
210 void DefaultAngles(); // *MENU*
211 void DefaultColors(const TGeoColorScheme *cs = nullptr); // *MENU*
213 Int_t GetNsegments() const;
218 Int_t GetBombMode() const { return fExplodedView; }
221 Bool_t GetTminTmax(Double_t &tmin, Double_t &tmax) const;
222 Double_t GetTmax() const { return fTmax; }
226 Int_t GetVisLevel() const;
227 Int_t GetVisOption() const;
229 Bool_t IsInPhiRange() const;
230 Bool_t IsDrawingExtra() const { return fDrawExtra; }
232 Bool_t IsVisLeaves() const { return fVisOption == 1; }
233 void ModifiedPad() const;
234 void OptimizeVoxels(const char *filename = "tgeovox.C"); // *MENU*
235 void RebuildVoxels();
236 void SetClipping(Bool_t flag = kTRUE) { SetClippingShape(flag ? fClippingShape : nullptr); } // *MENU*
237 void SetClippingShape(TGeoShape *clip);
238 void SetExplodedView(Int_t iopt = 0); // *MENU*
239 void SetPhiRange(Double_t phimin = 0., Double_t phimax = 360.);
240 void SetNsegments(Int_t nseg); // *MENU*
242 void
243 SetBombFactors(Double_t bombx = 1.3, Double_t bomby = 1.3, Double_t bombz = 1.3, Double_t bombr = 1.3); // *MENU*
246 void SetTopVisible(Bool_t vis = kTRUE);
247 void SetTminTmax(Double_t tmin = 0, Double_t tmax = 999);
250 void SetVisDensity(Double_t dens = 0.01); // *MENU*
251 void SetVisLevel(Int_t level = 3); // *MENU*
252 void SetVisOption(Int_t option = 0);
253 void ViewLeaves(Bool_t flag = kTRUE); // *TOGGLE* *GETTER=IsVisLeaves
254 void SaveAttributes(const char *filename = "tgeoatt.C"); // *MENU*
255 void RestoreMasterVolume(); // *MENU*
256 void SetMaxVisNodes(Int_t maxnodes = 10000); // *MENU*
257 //--- geometry checking
258 void AnimateTracks(Double_t tmin = 0, Double_t tmax = 5E-8, Int_t nframes = 200, Option_t *option = "/*"); // *MENU*
259 void CheckBoundaryErrors(Int_t ntracks = 1000000, Double_t radius = -1.); // *MENU*
261 void CheckGeometryFull(Int_t ntracks = 1000000, Double_t vx = 0., Double_t vy = 0., Double_t vz = 0.,
262 Option_t *option = "ob"); // *MENU*
263 void CheckGeometry(Option_t *option = "");
264 void CheckOverlaps(Double_t ovlp = 0.1, Option_t *option = ""); // *MENU*
266 void CheckPoint(Double_t x = 0, Double_t y = 0, Double_t z = 0, Option_t *option = "",
267 Double_t safety = 0.); // *MENU*
269 void ConvertReflections();
270 void DrawCurrentPoint(Int_t color = 2); // *MENU*
271 void DrawTracks(Option_t *option = ""); // *MENU*
272 void SetParticleName(const char *pname) { fParticleName = pname; }
273 const char *GetParticleName() const { return fParticleName.Data(); }
274 void DrawPath(const char *path, Option_t *option = "");
275 void PrintOverlaps() const; // *MENU*
276 void RandomPoints(const TGeoVolume *vol, Int_t npoints = 10000, Option_t *option = "");
278 const char *target_vol = nullptr, Bool_t check_norm = kFALSE);
279 TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil = 1E-5, const char *g3path = "");
280 void SetNmeshPoints(Int_t npoints = 1000);
281 void SetCheckedNode(TGeoNode *node);
282 void Test(Int_t npoints = 1000000, Option_t *option = ""); // *MENU*
283 void TestOverlaps(const char *path = ""); // *MENU*
284 Double_t Weight(Double_t precision = 0.01, Option_t *option = "va"); // *MENU*
285
286 //--- GEANT3-like geometry creation
287 TGeoVolume *Division(const char *name, const char *mother, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step,
288 Int_t numed = 0, Option_t *option = "");
289 void
292 Double_t intlen = 0);
294 Mixture(const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nelem, Float_t *wmat, Int_t uid);
296 Mixture(const char *name, Double_t *a, Double_t *z, Double_t dens, Int_t nelem, Double_t *wmat, Int_t uid);
299 void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
301 void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
303 TGeoVolume *Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar = 0);
304 TGeoVolume *Volume(const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t npar = 0);
305 void SetVolumeAttribute(const char *name, const char *att, Int_t val);
306 //--- geometry building
308 void CloseGeometry(Option_t *option = "d");
309 Bool_t IsClosed() const { return fClosed; }
310 TGeoVolume *MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices = nullptr);
323 Double_t theta, Double_t phi);
330 Double_t themax = 180, Double_t phimin = 0, Double_t phimax = 360);
332 Double_t phi1 = 0, Double_t dphi = 360);
337 TGeoVolume *
341 Double_t phi2);
343
344 TGeoPNEntry *SetAlignableEntry(const char *unique_name, const char *path, Int_t uid = -1);
345 TGeoPNEntry *GetAlignableEntry(const char *name) const;
351 TGeoPhysicalNode *MakePhysicalNode(const char *path = nullptr);
353 void RefreshPhysicalNodes(Bool_t lock = kTRUE);
357 void SetTopVolume(TGeoVolume *vol);
358
359 //--- geometry queries
366 Double_t *FindNormal(Bool_t forward = kTRUE);
368 TGeoNode *InitTrack(const Double_t *point, const Double_t *dir);
370 void ResetState();
371 Double_t Safety(Bool_t inside = kFALSE);
378 Int_t GetNtracks() const { return fNtracks; }
381 {
382 return (TVirtualGeoTrack *)((fNtracks > 0) ? fTracks->At(fNtracks - 1) : nullptr);
383 }
386 {
387 return (index < fNtracks) ? (TVirtualGeoTrack *)fTracks->At(index) : nullptr;
388 }
389 Int_t GetTrackIndex(Int_t id) const;
395 Int_t GetSafeLevel() const;
399 void InspectState() const;
423
424 //--- cleaning
425 void CleanGarbage();
426 void ClearShape(const TGeoShape *shape);
428 {
429 fTracks->Delete();
430 fNtracks = 0;
431 }
432 void ClearNavigators();
434 void RemoveNavigator(const TGeoNavigator *nav);
435 void ResetUserData();
436
437 //--- utilities
438 Int_t CountNodes(const TGeoVolume *vol = nullptr, Int_t nlevels = 10000, Int_t option = 0);
439 void CountLevels();
440 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
441 static Int_t Parse(const char *expr, TString &expr1, TString &expr2, TString &expr3);
444 UChar_t *GetBits() { return fBits; }
445 virtual Int_t GetByteCount(Option_t *option = nullptr);
446 void SetAllIndex();
447 static Int_t GetMaxDaughters();
448 static Int_t GetMaxLevels();
449 static Int_t GetMaxXtruVert();
450 Int_t GetMaxThreads() const { return fMaxThreads - 1; }
452 Int_t GetRTmode() const { return fRaytraceMode; }
453 void SetRTmode(Int_t mode); // *MENU*
455 static void SetNavigatorsLock(Bool_t flag);
456 static Int_t ThreadId();
457 static Int_t GetNumThreads();
458 static void ClearThreadsMap();
459 void ClearThreadData() const;
460 void CreateThreadData() const;
461
462 //--- I/O
463 virtual Int_t Export(const char *filename, const char *name = "", Option_t *option = "vg");
464 static void LockGeometry();
465 static void UnlockGeometry();
466 static Int_t GetVerboseLevel();
467 static void SetVerboseLevel(Int_t vl);
468 static TGeoManager *Import(const char *filename, const char *name = "", Option_t *option = "");
469 static Bool_t IsLocked();
470 static void SetExportPrecision(UInt_t prec);
471 static UInt_t GetExportPrecision();
477
478 //--- list getters
484 TList *GetListOfMedia() const { return fMedia; }
487 TObjArray *GetListOfShapes() const { return fShapes; }
490 TObjArray *GetListOfTracks() const { return fTracks; }
498
499 //--- modeler state getters/setters
500 void DoBackupState();
501 void DoRestoreState();
502 TGeoNode *GetNode(Int_t level) const { return (TGeoNode *)fNodes->UncheckedAt(level); }
509 TGeoHMatrix *GetGLMatrix() const { return fGLMatrix; }
512 Int_t GetCurrentNodeId() const;
517 const Double_t *GetCldir() const { return GetCurrentNavigator()->GetCldir(); }
518 const Double_t *GetNormal() const { return GetCurrentNavigator()->GetNormal(); }
520 Int_t GetMaxLevel() const { return fNLevel; }
521 const char *GetPath() const;
524 TGeoVolume *GetTopVolume() const { return fTopVolume; }
525 TGeoNode *GetTopNode() const { return fTopNode; }
536
537 //--- point/vector reference frame conversion
562 void MasterToTop(const Double_t *master, Double_t *top) const;
563 void TopToMaster(const Double_t *top, Double_t *master) const;
564
565 //--- general use getters/setters
568 TGeoMaterial *GetMaterial(const char *matname) const;
569 TGeoMaterial *GetMaterial(Int_t id) const;
570 TGeoMedium *GetMedium(const char *medium) const;
572 Int_t GetMaterialIndex(const char *matname) const;
573
574 //--- GDML object accessors
575 TGDMLMatrix *GetGDMLMatrix(const char *name) const;
577 TGeoOpticalSurface *GetOpticalSurface(const char *name) const;
579 TGeoSkinSurface *GetSkinSurface(const char *name) const;
581 TGeoBorderSurface *GetBorderSurface(const char *name) const;
583
584 // TGeoShape *GetShape(const char *name) const;
585 TGeoVolume *GetVolume(const char *name) const;
586 TGeoVolume *GetVolume(Int_t uid) const { return (TGeoVolume *)fUniqueVolumes->At(uid); }
587 int GetNregions() const { return fRegions->GetEntriesFast(); }
588 TGeoRegion *GetRegion(int i) { return (TGeoRegion *)fRegions->At(i); }
589 Int_t GetUID(const char *volname) const;
591 {
592 if (!fNNodes)
593 CountNodes();
594 return fNNodes;
595 }
597 // void SetCache(const TGeoNodeCache *cache) {fCache = (TGeoNodeCache*)cache;}
599 virtual ULong_t SizeOf(const TGeoNode *node, Option_t *option); // size of the geometry in memory
600 void SelectTrackingMedia();
601
602 //--- stack manipulation
609 void PopDummy(Int_t ipop = 9999) { return GetCurrentNavigator()->PopDummy(ipop); }
610
611 //--- parallel world navigation
616
617 ClassDefOverride(TGeoManager, 17) // geometry manager
618};
619
621
622#endif
#define R__EXTERN
Definition DllImport.h:26
#define b(i)
Definition RSha256.hxx:100
#define a(i)
Definition RSha256.hxx:99
TMatrixD Matrix
bool Bool_t
Boolean (0=false, 1=true) (bool)
Definition RtypesCore.h:77
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
unsigned char UChar_t
Unsigned Character 1 byte (unsigned char)
Definition RtypesCore.h:52
unsigned long ULong_t
Unsigned long integer 4 bytes (unsigned long). Size depends on architecture.
Definition RtypesCore.h:69
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:60
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Option_t Option_t option
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 filename
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 GetProperty
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 r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char mode
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 Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
char name[80]
Definition TGX11.cxx:110
R__EXTERN TGeoManager * gGeoManager
Using a TBrowser one can browse all ROOT objects.
Definition TBrowser.h:37
This class is used in the process of reading and writing the GDML "matrix" tag.
Definition TGDMLMatrix.h:33
Strategy object for assigning colors and transparency to geometry volumes.
table of elements
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition TGeoMatrix.h:459
The manager class for any TGeo geometry.
Definition TGeoManager.h:46
static void UnlockGeometry()
Unlock current geometry.
Double_t fPhimax
lowest range for phi cut
Definition TGeoManager.h:68
TGeoVolume * MakeCone(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Make in one step a volume pointing to a cone shape with given medium.
void SetLastPoint(Double_t x, Double_t y, Double_t z)
void AnimateTracks(Double_t tmin=0, Double_t tmax=5E-8, Int_t nframes=200, Option_t *option="/*")
Draw animation of tracks.
void AddSkinSurface(TGeoSkinSurface *surf)
Add skin surface;.
TGeoNode * GetMother(Int_t up=1) const
TGeoVolume * MakeXtru(const char *name, TGeoMedium *medium, Int_t nz)
Make a TGeoXtru-shaped volume with nz planes.
Double_t * FindNormalFast()
Computes fast normal to next crossed boundary, assuming that the current point is close enough to the...
TGeoVolume * MakePcon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nz)
Make in one step a volume pointing to a polycone shape with given medium.
Int_t fRaytraceMode
Flag for multi-threading.
Double_t fVisDensity
particles to be drawn
Definition TGeoManager.h:74
TGeoNavigator * AddNavigator()
Add a navigator in the list of navigators.
TObjArray * GetListOfUVolumes() const
TVirtualGeoTrack * GetTrackOfId(Int_t id) const
Get track with a given ID.
TGeoMaterial * FindDuplicateMaterial(const TGeoMaterial *mat) const
Find if a given material duplicates an existing one.
Bool_t PopPoint()
TGeoVolume * GetVolume(Int_t uid) const
TObjArray * GetListOfOverlaps()
TGeoVolume * Division(const char *name, const char *mother, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Create a new volume by dividing an existing one (GEANT3 like)
TGeoVolume * Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar=0)
Create a volume in GEANT3 style.
Int_t ReplaceVolume(TGeoVolume *vorig, TGeoVolume *vnew)
Replaces all occurrences of VORIG with VNEW in the geometry tree.
void SetDrawExtraPaths(Bool_t flag=kTRUE)
void DoRestoreState()
Restore a backed-up state without affecting the cache stack.
Int_t GetCurrentNodeId() const
Get the unique ID of the current node.
TGeoPNEntry * GetAlignableEntry(const char *name) const
Retrieves an existing alignable object.
TGeoVolume * fMasterVolume
top physical node
TVirtualGeoTrack * FindTrackWithId(Int_t id) const
Search the track hierarchy to find the track with the given id.
TObjArray * fArrayPNE
Bool_t IsStepEntering() const
const Double_t * GetLastPoint() const
void TestOverlaps(const char *path="")
Geometry overlap checker based on sampling.
static EDefaultUnits GetDefaultUnits()
void RemoveMaterial(Int_t index)
Remove material at given index.
TList * GetListOfMedia() const
void SetCldirChecked(Double_t *dir)
const Double_t * GetCurrentDirection() const
TGeoElementTable * GetElementTable()
Returns material table. Creates it if not existing.
void SetUserPaintVolume(TGeoVolume *vol)
Int_t fNtracks
Definition TGeoManager.h:79
THashList * fHashPNE
hash list of group volumes providing fast search
Bool_t IsVisLeaves() const
Bool_t IsNullStep() const
TObjArray * GetListOfTracks() const
static Int_t fgVerboseLevel
Lock preventing a second geometry to be loaded.
Definition TGeoManager.h:56
Bool_t IsStartSafe() const
void Init()
Initialize manager class.
Bool_t InitArrayPNE() const
Initialize PNE array for fast access via index and unique-id.
TObjArray * fPhysicalNodes
virtual ULong_t SizeOf(const TGeoNode *node, Option_t *option)
computes the total size in bytes of the branch starting with node.
void SetLoopVolumes(Bool_t flag=kTRUE)
TObjArray * fUniqueVolumes
static UInt_t fgExportPrecision
Maximum number of Xtru vertices.
Definition TGeoManager.h:60
TObjArray * fRegions
void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot, Bool_t isOnly, Float_t *upar, Int_t npar=0)
Create a node called <name_nr> pointing to the volume called <name> as daughter of the volume called ...
TObjArray * fGShapes
TGeoVolume * fPaintVolume
Bool_t PopPoint(Int_t index)
TGeoSkinSurface * GetSkinSurface(const char *name) const
Get skin surface with a given name;.
void UpdateElements()
Update element flags when geometry is loaded from a file.
TGeoManager()
Default constructor.
void CheckOverlapsBySampling(Double_t ovlp, Int_t npoints)
Check all geometry for illegal overlaps within a limit OVLP.
TVirtualGeoChecker * GetGeomChecker()
Make a default checker if none present. Returns pointer to it.
ConstPropMap_t fProperties
TGeoVolume * MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
void CdUp()
Go one level up in geometry.
void DoBackupState()
Backup the current state without affecting the cache stack.
TList * fMaterials
Int_t GetNmany() const
void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.)
Check pushes and pulls needed to cross the next boundary with respect to the position given by FindNe...
TGeoHMatrix * GetGLMatrix() const
TObjArray * fVolumes
TObjArray * GetListOfVolumes() const
Int_t * fValuePNEId
TGeoNode * GetNextNode() const
TGeoPNEntry * GetAlignableEntryByUID(Int_t uid) const
Retrieves an existing alignable object having a preset UID.
void AddGDMLMatrix(TGDMLMatrix *mat)
Add GDML matrix;.
Bool_t IsMatrixTransform() const
Bool_t fTimeCut
Definition TGeoManager.h:90
static void SetExportPrecision(UInt_t prec)
void AddBorderSurface(TGeoBorderSurface *surf)
Add border surface;.
void RebuildVoxels()
Rebuild the voxel structures that are flagged as needing rebuild.
NavigatorsMap_t::iterator NavigatorsMapIt_t
void SetClippingShape(TGeoShape *clip)
Set a user-defined shape as clipping for ray tracing.
void SetMatrixReflection(Bool_t flag=kTRUE)
TGeoVolume * fCurrentVolume
current navigator
TGeoShape * GetClippingShape() const
void ClearOverlaps()
Clear the list of overlaps.
TGeoVolume * MakeCons(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a cone segment shape with given medium.
void SetStartSafe(Bool_t flag=kTRUE)
TObjArray * GetListOfSkinSurfaces() const
THashList * fHashGVolumes
hash list of volumes providing fast search
TObjArray * GetListOfGDMLMatrices() const
TVirtualGeoChecker * fChecker
current painter
Definition TGeoManager.h:97
Double_t GetLastSafety() const
Int_t fVisOption
Definition TGeoManager.h:76
static std::mutex fgMutex
Definition TGeoManager.h:54
Bool_t IsLoopingVolumes() const
Bool_t IsInPhiRange() const
True if current node is in phi range.
TObjArray * GetListOfGVolumes() const
void SetParticleName(const char *pname)
virtual Bool_t cd(const char *path="")
Browse the tree of nodes starting from fTopNode according to pathname.
TGeoNode * SearchNode(Bool_t downwards=kFALSE, const TGeoNode *skipnode=nullptr)
Returns the deepest node containing fPoint, which must be set a priori.
TGeoMaterial * Material(const char *name, Double_t a, Double_t z, Double_t dens, Int_t uid, Double_t radlen=0, Double_t intlen=0)
Create material with given A, Z and density, having an unique id.
void LocalToMaster(const Double_t *local, Double_t *master) const
void SetCurrentTrack(Int_t i)
Double_t fPhimin
Definition TGeoManager.h:67
TObjArray * GetListOfMatrices() const
TGeoVolume * GetPaintVolume() const
TString fParticleName
path to current node
Definition TGeoManager.h:73
static Bool_t fgLockNavigators
Number of registered threads.
void SaveAttributes(const char *filename="tgeoatt.C")
Save current attributes in a macro.
void RestoreMasterVolume()
Restore the master volume of the geometry.
TVirtualGeoTrack * GetCurrentTrack()
Bool_t fDrawExtra
Definition TGeoManager.h:91
TGeoVolume * MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices=nullptr)
Make an TGeoArb8 volume.
virtual Int_t Export(const char *filename, const char *name="", Option_t *option="vg")
Export this geometry to a file.
TGeoNode * FindNextDaughterBoundary(Double_t *point, Double_t *dir, Int_t &idaughter, Bool_t compmatrix=kFALSE)
Computes as fStep the distance to next daughter of the current volume.
Int_t GetUID(const char *volname) const
Retrieve unique id for a volume name. Return -1 if name not found.
TGeoShape * fClippingShape
TGeoNavigator * GetCurrentNavigator() const
Returns current navigator for the calling thread.
THashList * fHashVolumes
TObjArray * fMatrices
current checker
Definition TGeoManager.h:99
static Int_t GetNumThreads()
Returns number of threads that were set to use geometry.
TGeoVolumeMulti * MakeVolumeMulti(const char *name, TGeoMedium *medium)
Make a TGeoVolumeMulti handling a list of volumes.
void ClearNavigators()
Clear all navigators.
Int_t GetRTmode() const
TGeoVolume * GetMasterVolume() const
Int_t AddTransformation(const TGeoMatrix *matrix)
Add a matrix to the list. Returns index of the matrix in list.
TObjArray * fOpticalSurfaces
TVirtualGeoTrack * GetParentTrackOfId(Int_t id) const
Get parent track with a given ID.
void SetCurrentTrack(TVirtualGeoTrack *track)
void CdNode(Int_t nodeid)
Change current path to point to the node having this id.
UChar_t * fBits
Bool_t IsClosed() const
static Int_t GetMaxLevels()
Return maximum number of levels used in the geometry.
Double_t fTmin
highest range for phi cut
Definition TGeoManager.h:69
void LocalToMasterVect(const Double_t *local, Double_t *master) const
static Bool_t IsLocked()
Check lock state.
Int_t GetNproperties() const
TGeoVolume * fTopVolume
current volume
TGeoVolume * fUserPaintVolume
volume currently painted
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
void GetBranchOnlys(Int_t *isonly) const
Fill node copy numbers of current branch into an array.
TObjArray * GetListOfNodes()
TGeoNode * GetCurrentNode() const
Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *particle=nullptr)
Add a track to the list of tracks.
TGeoManager(const TGeoManager &)=delete
Default units in GDML if not explicit in some tags.
void SetVisOption(Int_t option=0)
set drawing mode :
TObjArray * GetListOfBorderSurfaces() const
void SetPdgName(Int_t pdg, const char *name)
Set a name for a particle having a given pdg.
TObjArray * fBorderSurfaces
Int_t GetNAlignable(Bool_t with_uid=kFALSE) const
Retrieves number of PN entries with or without UID.
void RefreshPhysicalNodes(Bool_t lock=kTRUE)
Refresh physical nodes to reflect the actual geometry paths after alignment was applied.
static Bool_t fgLock
mutex for navigator booking in MT mode
Definition TGeoManager.h:55
TGeoVolume * MakePara(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz, Double_t alpha, Double_t theta, Double_t phi)
Make in one step a volume pointing to a parallelepiped shape with given medium.
void TopToMaster(const Double_t *top, Double_t *master) const
Convert coordinates from top volume frame to master.
TGeoParallelWorld * GetParallelWorld() const
TObjArray * fShapes
Double_t GetVisDensity() const
void SetCurrentDirection(Double_t *dir)
void AddOpticalSurface(TGeoOpticalSurface *optsurf)
Add optical surface;.
static void SetDefaultUnits(EDefaultUnits new_value)
Bool_t fLoopVolumes
flag that geometry is closed
Definition TGeoManager.h:85
Int_t AddMaterial(const TGeoMaterial *material)
Add a material to the list. Returns index of the material in list.
void ClearAttributes()
Reset all attributes to default ones.
static Int_t fgMaxDaughters
Maximum level in geometry.
Definition TGeoManager.h:58
Bool_t fUsePWNav
Raytrace mode: 0=normal, 1=pass through, 2=transparent.
void SetRTmode(Int_t mode)
Change raytracing mode.
Bool_t CheckPath(const char *path) const
Check if a geometry path is valid without changing the state of the current navigator.
void InspectState() const
Inspects path and all flags for the current state.
void ConvertReflections()
Convert all reflections in geometry to normal rotations + reflected shapes.
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
void SetMatrixTransform(Bool_t on=kTRUE)
TGeoNode * FindNextBoundary(Double_t stepmax=TGeoShape::Big(), const char *path="", Bool_t frombdr=kFALSE)
Find distance to next boundary and store it in fStep.
void MasterToLocalBomb(const Double_t *master, Double_t *local) const
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
static function Import a geometry from a gdml or ROOT file
TGeoPhysicalNode * MakePhysicalNode(const char *path=nullptr)
Makes a physical node corresponding to a path.
void CountLevels()
Count maximum number of nodes per volume, maximum depth and maximum number of xtru vertices.
Bool_t PopPath(Int_t index)
Int_t fMaxThreads
Bool_t fIsGeomReading
Definition TGeoManager.h:87
TObjArray * GetListOfRegions() const
Bool_t IsCurrentOverlapping() const
TGeoVolume * MakeTorus(const char *name, TGeoMedium *medium, Double_t r, Double_t rmin, Double_t rmax, Double_t phi1=0, Double_t dphi=360)
Make in one step a volume pointing to a torus shape with given medium.
TGeoHMatrix * GetHMatrix()
Return stored current matrix (global matrix of the next touched node).
TGeoParallelWorld * fParallelWorld
void RegisterMatrix(const TGeoMatrix *matrix)
Register a matrix to the list of matrices.
TVirtualGeoTrack * GetTrack(Int_t index)
static Int_t GetMaxDaughters()
Return maximum number of daughters of a volume used in the geometry.
static void ClearThreadsMap()
Clear the current map of threads.
Int_t AddVolume(TGeoVolume *volume)
Add a volume to the list. Returns index of the volume in list.
TVirtualGeoPainter * fPainter
flag that nodes are the selected objects in pad rather than volumes
Definition TGeoManager.h:96
void SetVolumeAttribute(const char *name, const char *att, Int_t val)
Set volume attributes in G3 style.
const char * GetPdgName(Int_t pdg) const
Get name for given pdg code;.
void CheckGeometryFull(Int_t ntracks=1000000, Double_t vx=0., Double_t vy=0., Double_t vz=0., Option_t *option="ob")
Geometry checking.
Bool_t IsFolder() const override
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Bool_t fIsNodeSelectable
switch ON/OFF volume activity (default OFF - all volumes active))
Definition TGeoManager.h:95
TGeoHMatrix * GetMotherMatrix(Int_t up=1) const
std::map< std::thread::id, TGeoNavigatorArray * > NavigatorsMap_t
bits used for voxelization
TGeoNode * Step(Bool_t is_geom=kTRUE, Bool_t cross=kTRUE)
Make a rectilinear step of length fStep from current point (fPoint) on current direction (fDirection)...
Bool_t GotoSafeLevel()
Go upwards the tree until a non-overlapping node.
Bool_t IsDrawingExtra() const
Bool_t fActivity
flag for GL reflections
Definition TGeoManager.h:94
Int_t GetMaxLevel() const
void GetBranchNames(Int_t *names) const
Fill volume names of current branch into an array.
TObjArray * GetListOfGShapes() const
static ThreadsMap_t * fgThreadId
Map between thread id's and navigator arrays.
void CloseGeometry(Option_t *option="d")
Closing geometry implies checking the geometry validity, fixing shapes with negative parameters (run-...
void SetCheckingOverlaps(Bool_t flag=kTRUE)
TVirtualGeoTrack * MakeTrack(Int_t id, Int_t pdgcode, TObject *particle)
Makes a primary track but do not attach it to the list of tracks.
Int_t GetTrackIndex(Int_t id) const
Get index for track id, -1 if not found.
Int_t fNNodes
upper time limit for tracks drawing
Definition TGeoManager.h:71
Int_t GetNtracks() const
Bool_t IsParallelWorldNav() const
Int_t fNLevel
table of elements
Bool_t IsExiting() const
void OptimizeVoxels(const char *filename="tgeovox.C")
Optimize voxelization type for all volumes. Save best choice in a macro.
TGeoVolume * GetVolume(const char *name) const
Search for a named volume. All trailing blanks stripped.
Int_t GetNodeId() const
void SetAnimateTracks(Bool_t flag=kTRUE)
Bool_t fIsGeomCleaning
flag set when reading geometry
Definition TGeoManager.h:88
void DefaultColors(const TGeoColorScheme *cs=nullptr)
Set default volume colors according to A of material.
Bool_t IsStreamingVoxels() const
Bool_t IsSameLocation() const
void LocalToMasterBomb(const Double_t *local, Double_t *master) const
void SetOutside(Bool_t flag=kTRUE)
TGeoNode * FindNextBoundaryAndStep(Double_t stepmax=TGeoShape::Big(), Bool_t compsafe=kFALSE)
Compute distance to next boundary within STEPMAX.
TGeoVolume * MakeTrd2(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz)
Make in one step a volume pointing to a TGeoTrd2 shape with given medium.
Int_t GetMaxVisNodes() const
void SetCurrentPoint(Double_t *point)
Double_t * FindNormal(Bool_t forward=kTRUE)
Computes normal vector to the next surface that will be or was already crossed when propagating on a ...
virtual Int_t GetByteCount(Option_t *option=nullptr)
Get total size of geometry in bytes.
TGeoVolume * MakeGtra(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t twist, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
Make in one step a volume pointing to a twisted trapezoid shape with given medium.
TGeoElementTable * fElementTable
clipping shape for raytracing
static void SetNavigatorsLock(Bool_t flag)
Set the lock for navigators.
static Int_t fgMaxXtruVert
Maximum number of daughters.
Definition TGeoManager.h:59
TGeoNode * FindNode(Bool_t safe_start=kTRUE)
Returns deepest node containing current point.
Int_t GetVisOption() const
Returns current depth to which geometry is drawn.
static void LockGeometry()
Lock current geometry so that no other geometry can be imported.
const Double_t * GetCurrentPoint() const
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
Make in one step a volume pointing to a box shape with given medium.
void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option)
Test for shape navigation methods.
TGeoVolume * GetUserPaintVolume() const
Bool_t IsActivityEnabled() const
static Int_t fgMaxLevel
Verbosity level for Info messages (no IO).
Definition TGeoManager.h:57
Int_t fNpdg
current track
Definition TGeoManager.h:82
void PrintOverlaps() const
Prints the current list of overlaps.
const Double_t * GetNormal() const
TGeoVolume * MakeTrd1(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy, Double_t dz)
Make in one step a volume pointing to a TGeoTrd1 shape with given medium.
TGeoVolume * MakeSphere(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t themin=0, Double_t themax=180, Double_t phimin=0, Double_t phimax=360)
Make in one step a volume pointing to a sphere shape with given medium.
void ResetUserData()
Sets all pointers TGeoVolume::fField to NULL.
TGeoVolume * FindVolumeFast(const char *name, Bool_t multi=kFALSE)
Fast search for a named volume. All trailing blanks stripped.
Double_t GetSafeDistance() const
TList * fMedia
Bool_t IsOutside() const
Bool_t GetTminTmax(Double_t &tmin, Double_t &tmax) const
Get time cut for drawing tracks.
TGeoNode * InitTrack(const Double_t *point, const Double_t *dir)
Initialize current point and current direction vector (normalized) in MARS.
ThreadsMap_t::const_iterator ThreadsMapIt_t
Bool_t fMatrixTransform
flag that the list of physical nodes has to be drawn
Definition TGeoManager.h:92
void SetVisibility(TObject *obj, Bool_t vis)
Set visibility for a volume.
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
Bool_t fMatrixReflection
flag for using GL matrix
Definition TGeoManager.h:93
TGeoPNEntry * SetAlignableEntry(const char *unique_name, const char *path, Int_t uid=-1)
Creates an alignable object with unique name corresponding to a path and adds it to the list of align...
Int_t GetLevel() const
void ClearShape(const TGeoShape *shape)
Remove a shape from the list of shapes.
void ModifiedPad() const
Send "Modified" signal to painter.
Double_t GetStep() const
const Double_t * GetCldir() const
TGeoHMatrix * GetCurrentMatrix() const
TGeoManager & operator=(const TGeoManager &)=delete
void BombTranslation(const Double_t *tr, Double_t *bombtr)
Get the new 'bombed' translation vector according current exploded view mode.
TGeoNavigator * fCurrentNavigator
Lock existing navigators.
static Bool_t LockDefaultUnits(Bool_t new_value)
Int_t fMaxVisNodes
Definition TGeoManager.h:80
const char * GetParticleName() const
TGeoMedium * GetMedium(const char *medium) const
Search for a named tracking medium. All trailing blanks stripped.
Bool_t InsertPNEId(Int_t uid, Int_t ientry)
Insert a PN entry in the sorted array of indexes.
Int_t fVisLevel
Definition TGeoManager.h:77
void ViewLeaves(Bool_t flag=kTRUE)
Set visualization option (leaves only OR all volumes)
TGeoVolume * MakeCtub(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz)
Make in one step a volume pointing to a tube segment shape with given medium.
TGeoNode * GetTopNode() const
void SetTminTmax(Double_t tmin=0, Double_t tmax=999)
Set time cut interval for drawing tracks.
NavigatorsMap_t fNavigators
void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) const
Fill node copy numbers of current branch into an array.
TVirtualGeoChecker * GetChecker() const
void SetNodeSelectable(Bool_t flag=kTRUE)
Int_t GetNNodes()
TString fPath
Definition TGeoManager.h:72
Bool_t fPhiCut
flag to notify that the manager is being destructed
Definition TGeoManager.h:89
TGeoNodeCache * GetCache() const
TGeoNode * CrossBoundaryAndLocate(Bool_t downwards, TGeoNode *skipnode)
Cross next boundary and locate within current node The current point must be on the boundary of fCurr...
void DrawTracks(Option_t *option="")
Draw tracks over the geometry, according to option.
void BuildDefaultMaterials()
Now just a shortcut for GetElementTable.
void SetMaxThreads(Int_t nthreads)
Set maximum number of threads for navigation.
Bool_t IsMatrixReflection() const
Int_t PushPoint(Int_t startlevel=0)
TGeoMedium * Medium(const char *name, Int_t numed, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm, Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin)
Create tracking medium.
UChar_t * GetBits()
void SetExplodedView(Int_t iopt=0)
Set type of exploding view (see TGeoPainter::SetExplodedView())
Double_t Weight(Double_t precision=0.01, Option_t *option="va")
Estimate weight of volume VOL with a precision SIGMA(W)/W better than PRECISION.
void ClearPhysicalNodes(Bool_t mustdelete=kFALSE)
Clear the current list of physical nodes, so that we can start over with a new list.
void MasterToLocalVect(const Double_t *master, Double_t *local) const
static Int_t Parse(const char *expr, TString &expr1, TString &expr2, TString &expr3)
Parse a string boolean expression and do a syntax check.
std::map< std::string, Double_t > ConstPropMap_t
void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const
Retrieve cartesian and radial bomb factors.
TObjArray * fTracks
list of runtime volumes
Bool_t IsAnimatingTracks() const
const char * GetPath() const
Get path to the current node in the form /node0/node1/...
static Int_t fgNumThreads
Thread id's map.
TObjArray * fGDMLMatrices
void SetPaintVolume(TGeoVolume *vol)
TGeoPhysicalNode * MakeAlignablePN(const char *name)
Make a physical node from the path pointed by an alignable object with a given name.
void SetCheckedNode(TGeoNode *node)
Assign a given node to be checked for overlaps. Any other overlaps will be ignored.
Int_t AddOverlap(const TNamed *ovlp)
Add an illegal overlap/extrusion to the list.
void SetClipping(Bool_t flag=kTRUE)
void CreateThreadData() const
Create thread private data for all geometry objects.
Int_t fNsegments
Definition TGeoManager.h:78
TObjArray * fOverlaps
TGeoNode * SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil=1E-5, const char *g3path="")
shoot npoints randomly in a box of 1E-5 around current point.
Bool_t IsMultiThread() const
Int_t GetStackLevel() const
TGDMLMatrix * GetGDMLMatrix(const char *name) const
Get GDML matrix with a given name;.
Double_t fTmax
lower time limit for tracks drawing
Definition TGeoManager.h:70
void InvalidateMeshCaches()
Invalidate mesh caches built by composite shapes.
Int_t TransformVolumeToAssembly(const char *vname)
Transform all volumes named VNAME to assemblies. The volumes must be virtual.
TGeoRegion * GetRegion(int i)
Bool_t fMultiThread
Max number of threads.
TGeoVolume * MakePgon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
Make in one step a volume pointing to a polygone shape with given medium.
TGeoVolume * MakeTrap(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
Make in one step a volume pointing to a trapezoid shape with given medium.
void DrawCurrentPoint(Int_t color=2)
Draw current point in the same view.
static void SetVerboseLevel(Int_t vl)
Return current verbosity level (static function).
TGeoOpticalSurface * GetOpticalSurface(const char *name) const
Get optical surface with a given name;.
void SetNsegments(Int_t nseg)
Set number of segments for approximating circles in drawing.
static UInt_t GetExportPrecision()
Bool_t IsSamePoint(Double_t x, Double_t y, Double_t z) const
Check if a new point with given coordinates is the same as the last located one.
void SetStep(Double_t step)
void SetNmeshPoints(Int_t npoints=1000)
Set the number of points to be generated on the shape outline when checking for overlaps.
void CheckBoundaryReference(Int_t icheck=-1)
Check the boundary errors reference file created by CheckBoundaryErrors method.
TGeoVolume * GetCurrentVolume() const
static Int_t GetVerboseLevel()
Set verbosity level (static function).
Int_t GetVisLevel() const
Returns current depth to which geometry is drawn.
static EDefaultUnits fgDefaultUnits
Precision to be used in ASCII exports.
Definition TGeoManager.h:61
virtual void Edit(Option_t *option="")
Append a pad for this geometry.
Bool_t AddProperty(const char *property, Double_t value)
Add a user-defined property. Returns true if added, false if existing.
~TGeoManager() override
Destructor.
TVirtualGeoPainter * GetPainter() const
TObjArray * fNodes
Int_t CountNodes(const TGeoVolume *vol=nullptr, Int_t nlevels=10000, Int_t option=0)
Count the total number of nodes starting from a volume, nlevels down.
TGeoMaterial * GetMaterial(const char *matname) const
Search for a named material. All trailing blanks stripped.
void CheckGeometry(Option_t *option="")
Perform last checks on the geometry.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute mouse actions on this manager.
Double_t GetTmax() const
TGeoVolumeAssembly * MakeVolumeAssembly(const char *name)
Make an assembly of volumes.
Int_t GetBombMode() const
TObjArray * GetListOfOpticalSurfaces() const
Int_t AddRegion(TGeoRegion *region)
Add a new region of volumes.
void SelectTrackingMedia()
Define different tracking media.
void EnableInactiveVolumes()
void CdNext()
Do a cd to the node found next by FindNextBoundary.
void CdTop()
Make top level node the current node.
Double_t Safety(Bool_t inside=kFALSE)
Compute safe distance from the current point.
Int_t * fKeyPNEId
void DefaultAngles()
Set default angles for a given view.
TGeoMaterial * Mixture(const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nelem, Float_t *wmat, Int_t uid)
Create mixture OR COMPOUND IMAT as composed by THE BASIC nelem materials defined by arrays A,...
std::map< std::thread::id, Int_t > ThreadsMap_t
void CheckPoint(Double_t x=0, Double_t y=0, Double_t z=0, Option_t *option="", Double_t safety=0.)
Classify a given point. See TGeoChecker::CheckPoint().
void SetUseParallelWorldNav(Bool_t flag)
Activate/deactivate usage of parallel world navigation.
Bool_t IsCheckingOverlaps() const
void MasterToLocal(const Double_t *master, Double_t *local) const
TGeoPhysicalNode * GetPhysicalNode(Int_t i) const
TVirtualGeoTrack * GetLastTrack()
void Browse(TBrowser *b) override
Describe how to browse this object.
const Double_t * GetCldirChecked() const
void Test(Int_t npoints=1000000, Option_t *option="")
Check time of finding "Where am I" for n points.
Int_t GetSafeLevel() const
Go upwards the tree until a non-overlapping node.
TObjArray * fGVolumes
list of runtime shapes
Int_t PushPath(Int_t startlevel=0)
Bool_t IsOnBoundary() const
void SetBombFactors(Double_t bombx=1.3, Double_t bomby=1.3, Double_t bombz=1.3, Double_t bombr=1.3)
Set factors that will "bomb" all translations in cartesian and cylindrical coordinates.
TGeoNode * fTopNode
top level volume in geometry
void UnbombTranslation(const Double_t *tr, Double_t *bombtr)
Get the new 'unbombed' translation vector according current exploded view mode.
void ResetState()
Reset current state flags.
void RandomPoints(const TGeoVolume *vol, Int_t npoints=10000, Option_t *option="")
Draw random points in the bounding box of a volume.
TGeoParallelWorld * CreateParallelWorld(const char *name)
Create a parallel world for prioritised navigation.
Int_t GetMaterialIndex(const char *matname) const
Return index of named material.
void CdDown(Int_t index)
Make a daughter of current node current.
TGeoNavigatorArray * GetListOfNavigators() const
Get list of navigators for the calling thread.
static Int_t GetMaxXtruVert()
Return maximum number of vertices for an xtru shape used.
TGeoNode * GetNode(Int_t level) const
TList * GetListOfMaterials() const
void RandomRays(Int_t nrays=1000, Double_t startx=0, Double_t starty=0, Double_t startz=0, const char *target_vol=nullptr, Bool_t check_norm=kFALSE)
Randomly shoot nrays and plot intersections with surfaces for current top node.
void SetAllIndex()
Assigns uid's for all materials,media and matrices.
TObjArray * fSkinSurfaces
TObjArray * GetListOfShapes() const
void SetVisDensity(Double_t dens=0.01)
Set density threshold.
Int_t fExplodedView
Definition TGeoManager.h:75
Bool_t fClosed
Definition TGeoManager.h:84
Int_t GetNsegments() const
Get number of segments approximating circles.
void SetPhiRange(Double_t phimin=0., Double_t phimax=360.)
Set cut phi range.
TGeoHMatrix * fGLMatrix
TVirtualGeoTrack * fCurrentTrack
Definition TGeoManager.h:81
TObjArray * fPdgNames
Bool_t IsNodeSelectable() const
void DrawPath(const char *path, Option_t *option="")
Draw current path.
TGeoVolume * GetTopVolume() const
int GetNregions() const
TObjArray * GetListOfPhysicalNodes()
Bool_t IsCleaning() const
static Int_t ThreadId()
Translates the current thread id to an ordinal number.
Bool_t SetCurrentNavigator(Int_t index)
Switch to another existing navigator for the calling thread.
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
TGeoVolume * MakeHype(const char *name, TGeoMedium *medium, Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
TGeoVolume * MakeParaboloid(const char *name, TGeoMedium *medium, Double_t rlo, Double_t rhi, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
Int_t AddShape(const TGeoShape *shape)
Add a shape to the list. Returns index of the shape in list.
void SetMaxVisNodes(Int_t maxnodes=10000)
set the maximum number of visible nodes.
void CleanGarbage()
Clean temporary volumes and shapes from garbage collection.
void Voxelize(Option_t *option=nullptr)
Voxelize all non-divided volumes.
Int_t GetVirtualLevel()
Find level of virtuality of current overlapping node (number of levels up having the same tracking me...
TGeoBorderSurface * GetBorderSurface(const char *name) const
Get border surface with a given name;.
void ClearThreadData() const
void ClearTracks()
Int_t fSizePNEId
array of physical node entries
void PopDummy(Int_t ipop=9999)
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="")
Check all geometry for illegal overlaps within a limit OVLP.
TGeoVolume * MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a tube segment shape with given medium.
Int_t fPdgId[1024]
Definition TGeoManager.h:83
void SortOverlaps()
Sort overlaps by decreasing overlap distance. Extrusions comes first.
void DisableInactiveVolumes()
void SetCurrentPoint(Double_t x, Double_t y, Double_t z)
void SetCurrentDirection(Double_t nx, Double_t ny, Double_t nz)
Int_t GetMaxThreads() const
TGeoVolume * MakeEltu(const char *name, TGeoMedium *medium, Double_t a, Double_t b, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
Bool_t IsEntering() const
Bool_t PopPath()
void RemoveNavigator(const TGeoNavigator *nav)
Clear a single navigator.
void MasterToTop(const Double_t *master, Double_t *top) const
Convert coordinates from master volume frame to top.
Bool_t fStreamVoxels
flag volume lists loop
Definition TGeoManager.h:86
Bool_t IsStepExiting() const
Base class describing materials.
Geometrical transformation package.
Definition TGeoMatrix.h:39
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition TGeoMedium.h:23
Class providing navigation API for TGeo geometries.
TGeoNode * GetMother(Int_t up=1) const
Bool_t IsStepExiting() const
Bool_t IsCheckingOverlaps() const
void LocalToMaster(const Double_t *local, Double_t *master) const
TGeoNode * GetNextNode() const
const Double_t * GetCldirChecked() const
Double_t GetLastSafety() const
Double_t GetStep() const
Bool_t IsSameLocation(Double_t x, Double_t y, Double_t z, Bool_t change=kFALSE)
Checks if point (x,y,z) is still in the current node.
void SetLastPoint(Double_t x, Double_t y, Double_t z)
Int_t GetNodeId() const
void MasterToLocal(const Double_t *master, Double_t *local) const
Bool_t PopPoint()
const Double_t * GetLastPoint() const
Int_t PushPoint(Int_t startlevel=0)
Bool_t IsNullStep() const
TGeoVolume * GetCurrentVolume() const
TGeoHMatrix * GetCurrentMatrix() const
Double_t GetSafeDistance() const
void SetCheckingOverlaps(Bool_t flag=kTRUE)
void SetOutside(Bool_t flag=kTRUE)
void SetStartSafe(Bool_t flag=kTRUE)
Bool_t IsEntering() const
TGeoHMatrix * GetMotherMatrix(Int_t up=1) const
void SetCldirChecked(Double_t *dir)
void LocalToMasterBomb(const Double_t *local, Double_t *master) const
void PopDummy(Int_t ipop=9999)
TGeoNode * GetCurrentNode() const
Bool_t IsOutside() const
void SetStep(Double_t step)
const Double_t * GetCurrentDirection() const
Bool_t IsExiting() const
Int_t PushPath(Int_t startlevel=0)
Int_t GetStackLevel() const
const Double_t * GetNormal() const
void SetCurrentPoint(const Double_t *point)
const Double_t * GetCldir() const
void LocalToMasterVect(const Double_t *local, Double_t *master) const
void SetCurrentDirection(const Double_t *dir)
Bool_t IsCurrentOverlapping() const
Int_t GetNmany() const
TGeoNodeCache * GetCache() const
Int_t GetLevel() const
Bool_t IsOnBoundary() const
const Double_t * GetCurrentPoint() const
Bool_t IsStartSafe() const
void MasterToLocalVect(const Double_t *master, Double_t *local) const
void MasterToLocalBomb(const Double_t *master, Double_t *local) const
Bool_t IsStepEntering() const
Special pool of reusable nodes.
Definition TGeoCache.h:56
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
This is a wrapper class to G4OpticalSurface.
The knowledge of the path to the objects that need to be misaligned is essential since there is no ot...
Base class for a flat parallel geometry.
Physical nodes are the actual 'touchable' objects in the geometry, representing a path of positioned ...
Regions are groups of volumes having a common set of user tracking cuts.
Definition TGeoRegion.h:36
Base abstract class for all shapes.
Definition TGeoShape.h:25
static Double_t Big()
Definition TGeoShape.h:95
Volume assemblies.
Definition TGeoVolume.h:317
Volume families.
Definition TGeoVolume.h:267
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Definition THashList.h:34
A doubly linked list.
Definition TList.h:38
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
An array of TObjects.
Definition TObjArray.h:31
Int_t GetEntriesFast() const
Definition TObjArray.h:58
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
Definition TObjArray.h:170
TObject * UncheckedAt(Int_t i) const
Definition TObjArray.h:90
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:138
const char * Data() const
Definition TString.h:384
Abstract class for geometry checkers.
Abstract class for geometry painters.
Base class for user-defined tracks attached to a geometry.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
TH1F * h1
Definition legend1.C:5