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();
161 void SetLoopVolumes(Bool_t flag = kTRUE) { fLoopVolumes = flag; }
163 void Voxelize(Option_t *option = nullptr);
164
165public:
166 // constructors
168 TGeoManager(const char *name, const char *title);
169 // destructor
170 ~TGeoManager() override;
171 //--- adding geometrical objects
173 Int_t AddOverlap(const TNamed *ovlp);
176 Int_t AddShape(const TGeoShape *shape);
177 Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *particle = nullptr);
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(); }
186 void RegisterMatrix(const TGeoMatrix *matrix);
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);
195 void CdUp();
196 void CdTop();
197 void CdNext();
198 void GetBranchNames(Int_t *names) const;
199 void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) 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*
207 void BombTranslation(const Double_t *tr, Double_t *bombtr);
208 void UnbombTranslation(const Double_t *tr, Double_t *bombtr);
209 void ClearAttributes(); // *MENU*
210 void DefaultAngles(); // *MENU*
211 void DefaultColors(const TGeoColorScheme *cs = nullptr); // *MENU*
218 Int_t GetBombMode() const { return fExplodedView; }
219 void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const;
221 Bool_t GetTminTmax(Double_t &tmin, Double_t &tmax) const;
222 Double_t GetTmax() const { return fTmax; }
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*
236 void SetClipping(Bool_t flag = kTRUE) { SetClippingShape(flag ? fClippingShape : nullptr); } // *MENU*
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*
247 void SetTminTmax(Double_t tmin = 0, Double_t tmax = 999);
248 void SetDrawExtraPaths(Bool_t flag = kTRUE) { fDrawExtra = flag; }
250 void SetVisDensity(Double_t dens = 0.01); // *MENU*
251 void SetVisLevel(Int_t level = 3); // *MENU*
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*
260 void CheckBoundaryReference(Int_t icheck = -1);
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*
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*
268 void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option);
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 = "");
277 void RandomRays(Int_t nrays = 1000, Double_t startx = 0, Double_t starty = 0, Double_t startz = 0,
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);
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
290 Matrix(Int_t index, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3);
291 TGeoMaterial *Material(const char *name, Double_t a, Double_t z, Double_t dens, Int_t uid, Double_t radlen = 0,
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);
297 TGeoMedium *Medium(const char *name, Int_t numed, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm,
298 Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
299 void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
300 Bool_t isOnly, Float_t *upar, Int_t npar = 0);
301 void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
302 Bool_t isOnly, Double_t *upar, Int_t npar = 0);
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
309 Bool_t IsClosed() const { return fClosed; }
310 TGeoVolume *MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices = nullptr);
311 TGeoVolume *MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz);
312 TGeoVolume *MakeCone(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1,
313 Double_t rmin2, Double_t rmax2);
314 TGeoVolume *MakeCons(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1,
315 Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2);
316 TGeoVolume *MakeCtub(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1,
317 Double_t phi2, Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
319 TGeoVolume *MakeGtra(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t twist,
320 Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2,
321 Double_t tl2, Double_t alpha2);
322 TGeoVolume *MakePara(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz, Double_t alpha,
323 Double_t theta, Double_t phi);
324 TGeoVolume *MakePcon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nz);
325 TGeoVolume *MakeParaboloid(const char *name, TGeoMedium *medium, Double_t rlo, Double_t rhi, Double_t dz);
326 TGeoVolume *MakeHype(const char *name, TGeoMedium *medium, Double_t rin, Double_t stin, Double_t rout,
327 Double_t stout, Double_t dz);
328 TGeoVolume *MakePgon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz);
329 TGeoVolume *MakeSphere(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t themin = 0,
330 Double_t themax = 180, Double_t phimin = 0, Double_t phimax = 360);
331 TGeoVolume *MakeTorus(const char *name, TGeoMedium *medium, Double_t r, Double_t rmin, Double_t rmax,
332 Double_t phi1 = 0, Double_t dphi = 360);
333 TGeoVolume *MakeTrap(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t h1,
334 Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2,
335 Double_t alpha2);
336 TGeoVolume *MakeTrd1(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy, Double_t dz);
337 TGeoVolume *
338 MakeTrd2(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz);
339 TGeoVolume *MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz);
340 TGeoVolume *MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1,
341 Double_t phi2);
342 TGeoVolume *MakeXtru(const char *name, TGeoMedium *medium, Int_t nz);
343
344 TGeoPNEntry *SetAlignableEntry(const char *unique_name, const char *path, Int_t uid = -1);
345 TGeoPNEntry *GetAlignableEntry(const char *name) const;
348 Int_t GetNAlignable(Bool_t with_uid = kFALSE) const;
351 TGeoPhysicalNode *MakePhysicalNode(const char *path = nullptr);
352 void ClearPhysicalNodes(Bool_t mustdelete = kFALSE);
354 TVirtualGeoTrack *MakeTrack(Int_t id, Int_t pdgcode, TObject *particle);
358
359 //--- geometry queries
361 TGeoNode *FindNextBoundary(Double_t stepmax = TGeoShape::Big(), const char *path = "", Bool_t frombdr = kFALSE);
362 TGeoNode *FindNextDaughterBoundary(Double_t *point, Double_t *dir, Int_t &idaughter, Bool_t compmatrix = kFALSE);
368 TGeoNode *InitTrack(const Double_t *point, const Double_t *dir);
372 TGeoNode *SearchNode(Bool_t downwards = kFALSE, const TGeoNode *skipnode = nullptr);
373 TGeoNode *Step(Bool_t is_geom = kTRUE, Bool_t cross = kTRUE);
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 }
399 void InspectState() const;
423
424 //--- cleaning
426 void ClearShape(const TGeoShape *shape);
428 {
429 fTracks->Delete();
430 fNtracks = 0;
431 }
436
437 //--- utilities
438 Int_t CountNodes(const TGeoVolume *vol = nullptr, Int_t nlevels = 10000, Int_t option = 0);
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);
450 Int_t GetMaxThreads() const { return fMaxThreads - 1; }
451 void SetMaxThreads(Int_t nthreads);
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();
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();
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);
472 static void SetDefaultUnits(EDefaultUnits new_value);
474 static Bool_t LockDefaultUnits(Bool_t new_value);
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
502 TGeoNode *GetNode(Int_t level) const { return (TGeoNode *)fNodes->UncheckedAt(level); }
505 TGeoNode *GetMother(Int_t up = 1) const { return GetCurrentNavigator()->GetMother(up); }
509 TGeoHMatrix *GetGLMatrix() const { return fGLMatrix; }
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
538 void LocalToMaster(const Double_t *local, Double_t *master) const
539 {
540 GetCurrentNavigator()->LocalToMaster(local, master);
541 }
542 void LocalToMasterVect(const Double_t *local, Double_t *master) const
543 {
544 GetCurrentNavigator()->LocalToMasterVect(local, master);
545 }
546 void LocalToMasterBomb(const Double_t *local, Double_t *master) const
547 {
548 GetCurrentNavigator()->LocalToMasterBomb(local, master);
549 }
550 void MasterToLocal(const Double_t *master, Double_t *local) const
551 {
552 GetCurrentNavigator()->MasterToLocal(master, local);
553 }
554 void MasterToLocalVect(const Double_t *master, Double_t *local) const
555 {
556 GetCurrentNavigator()->MasterToLocalVect(master, local);
557 }
558 void MasterToLocalBomb(const Double_t *master, Double_t *local) const
559 {
560 GetCurrentNavigator()->MasterToLocalBomb(master, local);
561 }
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;
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;
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
601
602 //--- stack manipulation
603 Int_t PushPath(Int_t startlevel = 0) { return GetCurrentNavigator()->PushPath(startlevel); }
606 Int_t PushPoint(Int_t startlevel = 0) { return GetCurrentNavigator()->PushPoint(startlevel); }
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
start
Definition Rotated.cxx:223
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
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 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:148
externTGeoManager * 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
Double_t fPhimax
! highest range for phi cut
Definition TGeoManager.h:68
TGeoPNEntry * GetAlignableEntry(Int_t index) const
TGeoVolume * MakeCone(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
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="/*")
void AddSkinSurface(TGeoSkinSurface *surf)
TGeoNode * GetMother(Int_t up=1) const
TGeoVolume * MakeXtru(const char *name, TGeoMedium *medium, Int_t nz)
Double_t * FindNormalFast()
TGeoVolume * MakePcon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nz)
Int_t fRaytraceMode
! Raytrace mode: 0=normal, 1=pass through, 2=transparent
Double_t fVisDensity
Definition TGeoManager.h:74
TGeoNavigator * AddNavigator()
TObjArray * GetListOfUVolumes() const
TVirtualGeoTrack * GetTrackOfId(Int_t id) const
TGeoMaterial * FindDuplicateMaterial(const TGeoMaterial *mat) const
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="")
TGeoVolume * Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar=0)
Int_t ReplaceVolume(TGeoVolume *vorig, TGeoVolume *vnew)
void SetDrawExtraPaths(Bool_t flag=kTRUE)
void DoRestoreState()
Int_t GetCurrentNodeId() const
TGeoPNEntry * GetAlignableEntry(const char *name) const
TGeoVolume * fMasterVolume
TVirtualGeoTrack * FindTrackWithId(Int_t id) const
TObjArray * fArrayPNE
! array of physical node entries
Bool_t IsStepEntering() const
const Double_t * GetLastPoint() const
void TestOverlaps(const char *path="")
void RemoveMaterial(Int_t index)
static Int_t GetNumThreads()
TList * GetListOfMedia() const
void SetCldirChecked(Double_t *dir)
const Double_t * GetCurrentDirection() const
void Matrix(Int_t index, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3)
TGeoElementTable * GetElementTable()
virtual Bool_t cd(const char *path="")
TGeoVolume * Volume(const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t npar=0)
void SetUserPaintVolume(TGeoVolume *vol)
Int_t fNtracks
Definition TGeoManager.h:79
THashList * fHashPNE
Bool_t IsVisLeaves() const
Bool_t IsNullStep() const
TObjArray * GetListOfTracks() const
static Int_t fgVerboseLevel
! Verbosity level for Info messages (no IO).
Definition TGeoManager.h:56
Bool_t IsStartSafe() const
Bool_t InitArrayPNE() const
TObjArray * fPhysicalNodes
void SetLoopVolumes(Bool_t flag=kTRUE)
TObjArray * fUniqueVolumes
static UInt_t fgExportPrecision
! Precision to be used in ASCII exports
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)
TObjArray * fGShapes
! list of runtime shapes
TGeoVolume * fPaintVolume
! volume currently painted
Bool_t PopPoint(Int_t index)
TGeoSkinSurface * GetSkinSurface(const char *name) const
void UpdateElements()
void CheckOverlapsBySampling(Double_t ovlp, Int_t npoints)
TVirtualGeoChecker * GetGeomChecker()
ConstPropMap_t fProperties
TGeoVolume * MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz)
static Int_t Parse(const char *expr, TString &expr1, TString &expr2, TString &expr3)
void DoBackupState()
TList * fMaterials
Int_t GetNmany() const
static void SetVerboseLevel(Int_t vl)
void CheckBoundaryErrors(Int_t ntracks=1000000, Double_t radius=-1.)
TGeoHMatrix * GetGLMatrix() const
TObjArray * fVolumes
TObjArray * GetListOfVolumes() const
Int_t * fValuePNEId
Int_t AddTrack(TVirtualGeoTrack *track)
TGeoNode * GetNextNode() const
TGeoPNEntry * GetAlignableEntryByUID(Int_t uid) const
void AddGDMLMatrix(TGDMLMatrix *mat)
Bool_t IsMatrixTransform() const
Bool_t fTimeCut
Definition TGeoManager.h:90
TGeoManager(const char *name, const char *title)
void AddBorderSurface(TGeoBorderSurface *surf)
void RebuildVoxels()
NavigatorsMap_t::iterator NavigatorsMapIt_t
void SetClippingShape(TGeoShape *clip)
void SetMatrixReflection(Bool_t flag=kTRUE)
TGeoVolume * fCurrentVolume
! current volume
TGeoShape * GetClippingShape() const
static void SetExportPrecision(UInt_t prec)
void ClearOverlaps()
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)
void SetStartSafe(Bool_t flag=kTRUE)
TObjArray * GetListOfSkinSurfaces() const
THashList * fHashGVolumes
! hash list of group volumes providing fast search
TObjArray * GetListOfGDMLMatrices() const
TVirtualGeoChecker * fChecker
! current checker
Definition TGeoManager.h:97
Double_t GetLastSafety() const
Int_t fVisOption
Definition TGeoManager.h:76
static std::mutex fgMutex
! mutex for navigator booking in MT mode
Definition TGeoManager.h:54
Bool_t IsLoopingVolumes() const
Bool_t IsInPhiRange() const
TObjArray * GetListOfGVolumes() const
void SetParticleName(const char *pname)
TGeoNode * SearchNode(Bool_t downwards=kFALSE, const TGeoNode *skipnode=nullptr)
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)
void LocalToMaster(const Double_t *local, Double_t *master) const
static TGeoManager * Import(const char *filename, const char *name="", Option_t *option="")
void SetCurrentTrack(Int_t i)
Double_t fPhimin
! lowest range for phi cut
Definition TGeoManager.h:67
static ThreadsMap_t * fgThreadId
! Thread id's map
TObjArray * GetListOfMatrices() const
static Int_t GetMaxDaughters()
TGeoVolume * GetPaintVolume() const
TString fParticleName
! particles to be drawn
Definition TGeoManager.h:73
static void SetDefaultUnits(EDefaultUnits new_value)
TGeoNode * FindNode(Double_t x, Double_t y, Double_t z)
static void LockGeometry()
static Bool_t fgLockNavigators
! Lock existing navigators
static Int_t GetMaxXtruVert()
void SaveAttributes(const char *filename="tgeoatt.C")
void RestoreMasterVolume()
TVirtualGeoTrack * GetCurrentTrack()
Bool_t fDrawExtra
! flag that the list of physical nodes has to be drawn
Definition TGeoManager.h:91
TGeoVolume * MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices=nullptr)
TGeoNode * FindNextDaughterBoundary(Double_t *point, Double_t *dir, Int_t &idaughter, Bool_t compmatrix=kFALSE)
Int_t GetUID(const char *volname) const
TGeoShape * fClippingShape
! clipping shape for raytracing
TGeoNavigator * GetCurrentNavigator() const
THashList * fHashVolumes
! hash list of volumes providing fast search
TObjArray * fMatrices
Definition TGeoManager.h:99
TGeoVolumeMulti * MakeVolumeMulti(const char *name, TGeoMedium *medium)
void ClearNavigators()
Int_t GetRTmode() const
TGeoVolume * GetMasterVolume() const
Int_t AddTransformation(const TGeoMatrix *matrix)
static Bool_t IsLocked()
TObjArray * fOpticalSurfaces
TVirtualGeoTrack * GetParentTrackOfId(Int_t id) const
void SetCurrentTrack(TVirtualGeoTrack *track)
void CdNode(Int_t nodeid)
UChar_t * fBits
! bits used for voxelization
Bool_t IsClosed() const
Double_t fTmin
! lower time limit for tracks drawing
Definition TGeoManager.h:69
void LocalToMasterVect(const Double_t *local, Double_t *master) const
Int_t GetNproperties() const
TGeoVolume * fTopVolume
! top level volume in geometry
TGeoVolume * fUserPaintVolume
!
TVirtualGeoPainter * GetGeomPainter()
void GetBranchOnlys(Int_t *isonly) const
TObjArray * GetListOfNodes()
TGeoNode * GetCurrentNode() const
Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *particle=nullptr)
TGeoManager(const TGeoManager &)=delete
void SetVisOption(Int_t option=0)
TObjArray * GetListOfBorderSurfaces() const
void SetPdgName(Int_t pdg, const char *name)
TObjArray * fBorderSurfaces
Int_t GetNAlignable(Bool_t with_uid=kFALSE) const
void RefreshPhysicalNodes(Bool_t lock=kTRUE)
static Bool_t fgLock
! Lock preventing a second geometry to be loaded
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)
void TopToMaster(const Double_t *top, Double_t *master) const
TGeoParallelWorld * GetParallelWorld() const
TObjArray * fShapes
Double_t GetVisDensity() const
void SetCurrentDirection(Double_t *dir)
void AddOpticalSurface(TGeoOpticalSurface *optsurf)
Bool_t fLoopVolumes
! flag volume lists loop
Definition TGeoManager.h:85
Int_t AddMaterial(const TGeoMaterial *material)
void ClearAttributes()
static Int_t fgMaxDaughters
! Maximum number of daughters
Definition TGeoManager.h:58
Bool_t fUsePWNav
void SetRTmode(Int_t mode)
Bool_t CheckPath(const char *path) const
void InspectState() const
static Int_t GetMaxLevels()
void ConvertReflections()
void SetVisLevel(Int_t level=3)
void SetMatrixTransform(Bool_t on=kTRUE)
TGeoNode * FindNextBoundary(Double_t stepmax=TGeoShape::Big(), const char *path="", Bool_t frombdr=kFALSE)
void MasterToLocalBomb(const Double_t *master, Double_t *local) const
TGeoPhysicalNode * MakePhysicalNode(const char *path=nullptr)
void CountLevels()
Bool_t PopPath(Int_t index)
Int_t fMaxThreads
! Max number of threads
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, Double_t *upar, Int_t npar=0)
Bool_t fIsGeomReading
! flag set when reading geometry
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)
TGeoHMatrix * GetHMatrix()
TGeoParallelWorld * fParallelWorld
void RegisterMatrix(const TGeoMatrix *matrix)
TVirtualGeoTrack * GetTrack(Int_t index)
Int_t AddVolume(TGeoVolume *volume)
TVirtualGeoPainter * fPainter
! current painter
Definition TGeoManager.h:96
void SetVolumeAttribute(const char *name, const char *att, Int_t val)
const char * GetPdgName(Int_t pdg) const
static Bool_t LockDefaultUnits(Bool_t new_value)
void CheckGeometryFull(Int_t ntracks=1000000, Double_t vx=0., Double_t vy=0., Double_t vz=0., Option_t *option="ob")
Bool_t IsFolder() const override
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Bool_t fIsNodeSelectable
! flag that nodes are the selected objects in pad rather than volumes
Definition TGeoManager.h:95
TGeoHMatrix * GetMotherMatrix(Int_t up=1) const
std::map< std::thread::id, TGeoNavigatorArray * > NavigatorsMap_t
TGeoNode * Step(Bool_t is_geom=kTRUE, Bool_t cross=kTRUE)
Bool_t GotoSafeLevel()
Bool_t IsDrawingExtra() const
Bool_t fActivity
! switch ON/OFF volume activity (default OFF - all volumes active))
Definition TGeoManager.h:94
Int_t GetMaxLevel() const
void GetBranchNames(Int_t *names) const
TObjArray * GetListOfGShapes() const
void CloseGeometry(Option_t *option="d")
void SetCheckingOverlaps(Bool_t flag=kTRUE)
TVirtualGeoTrack * MakeTrack(Int_t id, Int_t pdgcode, TObject *particle)
Int_t GetTrackIndex(Int_t id) const
Int_t fNNodes
Definition TGeoManager.h:71
Int_t GetNtracks() const
Bool_t IsParallelWorldNav() const
Bool_t IsExiting() const
void OptimizeVoxels(const char *filename="tgeovox.C")
TGeoMaterial * GetMaterial(Int_t id) const
TGeoVolume * GetVolume(const char *name) const
Int_t GetNodeId() const
void SetAnimateTracks(Bool_t flag=kTRUE)
Bool_t fIsGeomCleaning
! flag to notify that the manager is being destructed
Definition TGeoManager.h:88
void DefaultColors(const TGeoColorScheme *cs=nullptr)
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)
TGeoVolume * MakeTrd2(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz)
Int_t GetMaxVisNodes() const
void SetCurrentPoint(Double_t *point)
Double_t * FindNormal(Bool_t forward=kTRUE)
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)
TGeoElementTable * fElementTable
! table of elements
TGeoPhysicalNode * MakeAlignablePN(TGeoPNEntry *entry)
static Int_t fgMaxXtruVert
! Maximum number of Xtru vertices
Definition TGeoManager.h:59
TGeoNode * FindNode(Bool_t safe_start=kTRUE)
Int_t GetVisOption() const
virtual Int_t GetByteCount(Option_t *option=nullptr)
static UInt_t GetExportPrecision()
const Double_t * GetCurrentPoint() const
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option)
TGeoVolume * GetUserPaintVolume() const
Bool_t IsActivityEnabled() const
static Int_t fgMaxLevel
! Maximum level in geometry
Definition TGeoManager.h:57
void PrintOverlaps() const
const Double_t * GetNormal() const
TGeoVolume * MakeTrd1(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy, Double_t dz)
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)
void ResetUserData()
TGeoVolume * FindVolumeFast(const char *name, Bool_t multi=kFALSE)
Double_t GetSafeDistance() const
TList * fMedia
TGeoNode * InitTrack(Double_t x, Double_t y, Double_t z, Double_t nx, Double_t ny, Double_t nz)
Bool_t IsOutside() const
Bool_t GetTminTmax(Double_t &tmin, Double_t &tmax) const
TGeoNode * InitTrack(const Double_t *point, const Double_t *dir)
ThreadsMap_t::const_iterator ThreadsMapIt_t
Double_t GetProperty(size_t i, TString &name, Bool_t *error=nullptr) const
Bool_t fMatrixTransform
! flag for using GL matrix
Definition TGeoManager.h:92
void SetVisibility(TObject *obj, Bool_t vis)
void SetTopVolume(TGeoVolume *vol)
Bool_t fMatrixReflection
! flag for GL reflections
Definition TGeoManager.h:93
TGeoPNEntry * SetAlignableEntry(const char *unique_name, const char *path, Int_t uid=-1)
Int_t GetLevel() const
void ClearShape(const TGeoShape *shape)
void ModifiedPad() const
Double_t GetStep() const
const Double_t * GetCldir() const
virtual ULong_t SizeOf(const TGeoNode *node, Option_t *option)
TGeoHMatrix * GetCurrentMatrix() const
TGeoManager & operator=(const TGeoManager &)=delete
void BombTranslation(const Double_t *tr, Double_t *bombtr)
TGeoNavigator * fCurrentNavigator
! current navigator
Int_t fMaxVisNodes
Definition TGeoManager.h:80
const char * GetParticleName() const
TGeoMedium * GetMedium(const char *medium) const
Bool_t InsertPNEId(Int_t uid, Int_t ientry)
Int_t fVisLevel
Definition TGeoManager.h:77
void ViewLeaves(Bool_t flag=kTRUE)
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)
TGeoNode * GetTopNode() const
void SetTminTmax(Double_t tmin=0, Double_t tmax=999)
NavigatorsMap_t fNavigators
! Map between thread id's and navigator arrays
void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) const
TVirtualGeoChecker * GetChecker() const
void SetNodeSelectable(Bool_t flag=kTRUE)
Int_t GetNNodes()
TString fPath
! path to current node
Definition TGeoManager.h:72
Bool_t fPhiCut
Definition TGeoManager.h:89
TGeoNodeCache * GetCache() const
TGeoNode * CrossBoundaryAndLocate(Bool_t downwards, TGeoNode *skipnode)
void DrawTracks(Option_t *option="")
void BuildDefaultMaterials()
void SetMaxThreads(Int_t nthreads)
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)
UChar_t * GetBits()
void SetExplodedView(Int_t iopt=0)
Double_t Weight(Double_t precision=0.01, Option_t *option="va")
void ClearPhysicalNodes(Bool_t mustdelete=kFALSE)
static void UnlockGeometry()
void MasterToLocalVect(const Double_t *master, Double_t *local) const
std::map< std::string, Double_t > ConstPropMap_t
Bool_t IsSameLocation(Double_t x, Double_t y, Double_t z, Bool_t change=kFALSE)
void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const
Double_t GetProperty(const char *name, Bool_t *error=nullptr) const
TObjArray * fTracks
Bool_t IsAnimatingTracks() const
const char * GetPath() const
static Int_t fgNumThreads
! Number of registered threads
TObjArray * fGDMLMatrices
void SetPaintVolume(TGeoVolume *vol)
TGeoPhysicalNode * MakeAlignablePN(const char *name)
void SetCheckedNode(TGeoNode *node)
Int_t AddOverlap(const TNamed *ovlp)
void SetClipping(Bool_t flag=kTRUE)
void CreateThreadData() const
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="")
Bool_t IsMultiThread() const
Int_t GetStackLevel() const
TGDMLMatrix * GetGDMLMatrix(const char *name) const
Double_t fTmax
! upper time limit for tracks drawing
Definition TGeoManager.h:70
void InvalidateMeshCaches()
Int_t TransformVolumeToAssembly(const char *vname)
TGeoRegion * GetRegion(int i)
Bool_t fMultiThread
! Flag for multi-threading
static void SetNavigatorsLock(Bool_t flag)
TGeoVolume * MakePgon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
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)
void DrawCurrentPoint(Int_t color=2)
TGeoOpticalSurface * GetOpticalSurface(const char *name) const
void SetNsegments(Int_t nseg)
Bool_t IsSamePoint(Double_t x, Double_t y, Double_t z) const
void SetStep(Double_t step)
void SetNmeshPoints(Int_t npoints=1000)
void CheckBoundaryReference(Int_t icheck=-1)
TGeoVolume * GetCurrentVolume() const
Int_t GetVisLevel() const
Bool_t AddProperty(const char *property, Double_t value)
~TGeoManager() override
TVirtualGeoPainter * GetPainter() const
TObjArray * fNodes
Int_t CountNodes(const TGeoVolume *vol=nullptr, Int_t nlevels=10000, Int_t option=0)
TGeoMaterial * Mixture(const char *name, Double_t *a, Double_t *z, Double_t dens, Int_t nelem, Double_t *wmat, Int_t uid)
TGeoMaterial * GetMaterial(const char *matname) const
static Int_t GetVerboseLevel()
void CheckGeometry(Option_t *option="")
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to an event at (px,py).
Double_t GetTmax() const
TGeoVolumeAssembly * MakeVolumeAssembly(const char *name)
Int_t GetBombMode() const
TObjArray * GetListOfOpticalSurfaces() const
Int_t AddRegion(TGeoRegion *region)
void SelectTrackingMedia()
void EnableInactiveVolumes()
void CdNext()
void CdTop()
Double_t Safety(Bool_t inside=kFALSE)
Int_t * fKeyPNEId
void DefaultAngles()
TGeoMaterial * Mixture(const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nelem, Float_t *wmat, Int_t uid)
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.)
void SetUseParallelWorldNav(Bool_t flag)
Bool_t IsCheckingOverlaps() const
static void ClearThreadsMap()
void MasterToLocal(const Double_t *master, Double_t *local) const
TGeoPhysicalNode * GetPhysicalNode(Int_t i) const
TVirtualGeoTrack * GetLastTrack()
void Browse(TBrowser *b) override
Browse object. May be overridden for another default action.
const Double_t * GetCldirChecked() const
void Test(Int_t npoints=1000000, Option_t *option="")
Int_t GetSafeLevel() const
TObjArray * fGVolumes
! list of runtime volumes
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)
TGeoNode * fTopNode
! top physical node
void UnbombTranslation(const Double_t *tr, Double_t *bombtr)
static EDefaultUnits GetDefaultUnits()
void ResetState()
void RandomPoints(const TGeoVolume *vol, Int_t npoints=10000, Option_t *option="")
TGeoParallelWorld * CreateParallelWorld(const char *name)
Int_t GetMaterialIndex(const char *matname) const
void CdDown(Int_t index)
TGeoNavigatorArray * GetListOfNavigators() const
TGeoNode * GetNode(Int_t level) const
static Int_t ThreadId()
virtual Int_t Export(const char *filename, const char *name="", Option_t *option="vg")
TList * GetListOfMaterials() const
static EDefaultUnits fgDefaultUnits
! Default units in GDML if not explicit in some tags
Definition TGeoManager.h:61
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)
void SetAllIndex()
TObjArray * fSkinSurfaces
TObjArray * GetListOfShapes() const
TGeoMedium * GetMedium(Int_t numed) const
void SetVisDensity(Double_t dens=0.01)
Int_t fExplodedView
Definition TGeoManager.h:75
Bool_t fClosed
! flag that geometry is closed
Definition TGeoManager.h:84
Int_t GetNsegments() const
void SetPhiRange(Double_t phimin=0., Double_t phimax=360.)
TGeoHMatrix * fGLMatrix
TVirtualGeoTrack * fCurrentTrack
! current track
Definition TGeoManager.h:81
TObjArray * fPdgNames
Bool_t IsNodeSelectable() const
void DrawPath(const char *path, Option_t *option="")
TGeoVolume * GetTopVolume() const
int GetNregions() const
TObjArray * GetListOfPhysicalNodes()
Bool_t IsCleaning() const
Bool_t SetCurrentNavigator(Int_t index)
void SetTopVisible(Bool_t vis=kTRUE)
TGeoVolume * MakeHype(const char *name, TGeoMedium *medium, Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
TGeoVolume * MakeParaboloid(const char *name, TGeoMedium *medium, Double_t rlo, Double_t rhi, Double_t dz)
Int_t AddShape(const TGeoShape *shape)
void SetMaxVisNodes(Int_t maxnodes=10000)
void CleanGarbage()
void Voxelize(Option_t *option=nullptr)
Int_t GetVirtualLevel()
TGeoBorderSurface * GetBorderSurface(const char *name) const
void ClearThreadData() const
virtual void Edit(Option_t *option="")
void ClearTracks()
Int_t fSizePNEId
void PopDummy(Int_t ipop=9999)
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="")
TGeoVolume * MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Int_t fPdgId[1024]
Definition TGeoManager.h:83
void SortOverlaps()
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)
Bool_t IsEntering() const
Bool_t PopPath()
void RemoveNavigator(const TGeoNavigator *nav)
void MasterToTop(const Double_t *master, Double_t *top) const
Bool_t fStreamVoxels
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
TNamed()
Definition TNamed.h:38
An array of TObjects.
Definition TObjArray.h:31
TObject()
TObject constructor.
Definition TObject.h:259
Basic string class.
Definition TString.h:138
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