Warning, file /include/root/TGeoManager.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TGeoManager
0013 #define ROOT_TGeoManager
0014
0015 #include <mutex>
0016 #include <thread>
0017 #include <map>
0018
0019 #include "TNamed.h"
0020 #include "TObjArray.h"
0021 #include "TGeoNavigator.h"
0022
0023
0024 class TVirtualGeoTrack;
0025 class TGeoNode;
0026 class TGeoPhysicalNode;
0027 class TGeoPNEntry;
0028 class TGeoVolume;
0029 class TGeoVolumeMulti;
0030 class TGeoMatrix;
0031 class TGeoHMatrix;
0032 class TGeoMaterial;
0033 class TGeoMedium;
0034 class TGeoShape;
0035 class TVirtualGeoPainter;
0036 class THashList;
0037 class TGeoParallelWorld;
0038 class TGeoRegion;
0039 class TGDMLMatrix;
0040 class TGeoOpticalSurface;
0041 class TGeoSkinSurface;
0042 class TGeoBorderSurface;
0043
0044 class TGeoManager : public TNamed {
0045 public:
0046 enum EDefaultUnits { kG4Units = 0, kRootUnits = 1 };
0047
0048 protected:
0049 static std::mutex fgMutex;
0050 static Bool_t fgLock;
0051 static Int_t fgVerboseLevel;
0052 static Int_t fgMaxLevel;
0053 static Int_t fgMaxDaughters;
0054 static Int_t fgMaxXtruVert;
0055 static UInt_t fgExportPrecision;
0056 static EDefaultUnits fgDefaultUnits;
0057
0058 TGeoManager(const TGeoManager &) = delete;
0059 TGeoManager &operator=(const TGeoManager &) = delete;
0060
0061 private:
0062 Double_t fPhimin;
0063 Double_t fPhimax;
0064 Double_t fTmin;
0065 Double_t fTmax;
0066 Int_t fNNodes;
0067 TString fPath;
0068 TString fParticleName;
0069 Double_t fVisDensity;
0070 Int_t fExplodedView;
0071 Int_t fVisOption;
0072 Int_t fVisLevel;
0073 Int_t fNsegments;
0074 Int_t fNtracks;
0075 Int_t fMaxVisNodes;
0076 TVirtualGeoTrack *fCurrentTrack;
0077 Int_t fNpdg;
0078 Int_t fPdgId[1024];
0079 Bool_t fClosed;
0080 Bool_t fLoopVolumes;
0081 Bool_t fStreamVoxels;
0082 Bool_t fIsGeomReading;
0083 Bool_t fIsGeomCleaning;
0084 Bool_t fPhiCut;
0085 Bool_t fTimeCut;
0086 Bool_t fDrawExtra;
0087 Bool_t fMatrixTransform;
0088 Bool_t fMatrixReflection;
0089 Bool_t fActivity;
0090 Bool_t fIsNodeSelectable;
0091 TVirtualGeoPainter *fPainter;
0092
0093 TObjArray *fMatrices;
0094 TObjArray *fShapes;
0095 TObjArray *fVolumes;
0096 TObjArray *fPhysicalNodes;
0097 TObjArray *fGShapes;
0098 TObjArray *fGVolumes;
0099 TObjArray *fTracks;
0100 TObjArray *fPdgNames;
0101 TObjArray *fGDMLMatrices;
0102 TObjArray *fOpticalSurfaces;
0103 TObjArray *fSkinSurfaces;
0104 TObjArray *fBorderSurfaces;
0105 TList *fMaterials;
0106 TList *fMedia;
0107 TObjArray *fNodes;
0108 TObjArray *fOverlaps;
0109 TObjArray *fRegions;
0110 UChar_t *fBits;
0111
0112 typedef std::map<std::thread::id, TGeoNavigatorArray *> NavigatorsMap_t;
0113 typedef NavigatorsMap_t::iterator NavigatorsMapIt_t;
0114 typedef std::map<std::thread::id, Int_t> ThreadsMap_t;
0115 typedef ThreadsMap_t::const_iterator ThreadsMapIt_t;
0116
0117 typedef std::map<std::string, Double_t> ConstPropMap_t;
0118
0119 NavigatorsMap_t fNavigators;
0120 static ThreadsMap_t *fgThreadId;
0121 static Int_t fgNumThreads;
0122 static Bool_t fgLockNavigators;
0123 TGeoNavigator *fCurrentNavigator;
0124 TGeoVolume *fCurrentVolume;
0125 TGeoVolume *fTopVolume;
0126 TGeoNode *fTopNode;
0127 TGeoVolume *fMasterVolume;
0128 TGeoHMatrix *fGLMatrix;
0129 TObjArray *fUniqueVolumes;
0130 TGeoShape *fClippingShape;
0131 TGeoElementTable *fElementTable;
0132
0133 Int_t fNLevel;
0134 TGeoVolume *fPaintVolume;
0135 TGeoVolume *fUserPaintVolume;
0136 THashList *fHashVolumes;
0137 THashList *fHashGVolumes;
0138 THashList *fHashPNE;
0139 mutable TObjArray *fArrayPNE;
0140 Int_t fSizePNEId;
0141 Int_t fNPNEId;
0142 Int_t *fKeyPNEId;
0143 Int_t *fValuePNEId;
0144 Int_t fMaxThreads;
0145 Bool_t fMultiThread;
0146 Int_t fRaytraceMode;
0147 Bool_t fUsePWNav;
0148 TGeoParallelWorld *fParallelWorld;
0149 ConstPropMap_t fProperties;
0150
0151 Bool_t IsLoopingVolumes() const { return fLoopVolumes; }
0152 void Init();
0153 Bool_t InitArrayPNE() const;
0154 Bool_t InsertPNEId(Int_t uid, Int_t ientry);
0155 void SetLoopVolumes(Bool_t flag = kTRUE) { fLoopVolumes = flag; }
0156 void UpdateElements();
0157 void Voxelize(Option_t *option = nullptr);
0158
0159 public:
0160
0161 TGeoManager();
0162 TGeoManager(const char *name, const char *title);
0163
0164 ~TGeoManager() override;
0165
0166 Int_t AddMaterial(const TGeoMaterial *material);
0167 Int_t AddOverlap(const TNamed *ovlp);
0168 Int_t AddRegion(TGeoRegion *region);
0169 Int_t AddTransformation(const TGeoMatrix *matrix);
0170 Int_t AddShape(const TGeoShape *shape);
0171 Int_t AddTrack(Int_t id, Int_t pdgcode, TObject *particle = nullptr);
0172 Int_t AddTrack(TVirtualGeoTrack *track);
0173 Int_t AddVolume(TGeoVolume *volume);
0174 TGeoNavigator *AddNavigator();
0175 Bool_t AddProperty(const char *property, Double_t value);
0176 Double_t GetProperty(const char *name, Bool_t *error = nullptr) const;
0177 Double_t GetProperty(size_t i, TString &name, Bool_t *error = nullptr) const;
0178 Int_t GetNproperties() const { return fProperties.size(); }
0179 void ClearOverlaps();
0180 void RegisterMatrix(const TGeoMatrix *matrix);
0181 void SortOverlaps();
0182
0183 void Browse(TBrowser *b) override;
0184 void SetVisibility(TObject *obj, Bool_t vis);
0185 virtual Bool_t cd(const char *path = "");
0186 Bool_t CheckPath(const char *path) const;
0187 void CdNode(Int_t nodeid);
0188 void CdDown(Int_t index);
0189 void CdUp();
0190 void CdTop();
0191 void CdNext();
0192 void GetBranchNames(Int_t *names) const;
0193 void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) const;
0194 void GetBranchOnlys(Int_t *isonly) const;
0195 Int_t GetNmany() const { return GetCurrentNavigator()->GetNmany(); }
0196 const char *GetPdgName(Int_t pdg) const;
0197 void SetPdgName(Int_t pdg, const char *name);
0198 Bool_t IsFolder() const override { return kTRUE; }
0199
0200 virtual void Edit(Option_t *option = "");
0201 void BombTranslation(const Double_t *tr, Double_t *bombtr);
0202 void UnbombTranslation(const Double_t *tr, Double_t *bombtr);
0203 void ClearAttributes();
0204 void DefaultAngles();
0205 void DefaultColors();
0206 TGeoShape *GetClippingShape() const { return fClippingShape; }
0207 Int_t GetNsegments() const;
0208 TVirtualGeoPainter *GetGeomPainter();
0209 TVirtualGeoPainter *GetPainter() const { return fPainter; }
0210 Int_t GetBombMode() const { return fExplodedView; }
0211 void GetBombFactors(Double_t &bombx, Double_t &bomby, Double_t &bombz, Double_t &bombr) const;
0212 Int_t GetMaxVisNodes() const { return fMaxVisNodes; }
0213 Bool_t GetTminTmax(Double_t &tmin, Double_t &tmax) const;
0214 Double_t GetTmax() const { return fTmax; }
0215 TGeoVolume *GetPaintVolume() const { return fPaintVolume; }
0216 TGeoVolume *GetUserPaintVolume() const { return fUserPaintVolume; }
0217 Double_t GetVisDensity() const { return fVisDensity; }
0218 Int_t GetVisLevel() const;
0219 Int_t GetVisOption() const;
0220 Bool_t IsInPhiRange() const;
0221 Bool_t IsDrawingExtra() const { return fDrawExtra; }
0222 Bool_t IsNodeSelectable() const { return fIsNodeSelectable; }
0223 Bool_t IsVisLeaves() const { return fVisOption == 1; }
0224 void ModifiedPad() const;
0225 void OptimizeVoxels(const char *filename = "tgeovox.C");
0226 void SetClipping(Bool_t flag = kTRUE) { SetClippingShape(flag ? fClippingShape : nullptr); }
0227 void SetClippingShape(TGeoShape *clip);
0228 void SetExplodedView(Int_t iopt = 0);
0229 void SetPhiRange(Double_t phimin = 0., Double_t phimax = 360.);
0230 void SetNsegments(Int_t nseg);
0231 Bool_t SetCurrentNavigator(Int_t index);
0232 void
0233 SetBombFactors(Double_t bombx = 1.3, Double_t bomby = 1.3, Double_t bombz = 1.3, Double_t bombr = 1.3);
0234 void SetPaintVolume(TGeoVolume *vol) { fPaintVolume = vol; }
0235 void SetUserPaintVolume(TGeoVolume *vol) { fUserPaintVolume = vol; }
0236 void SetTopVisible(Bool_t vis = kTRUE);
0237 void SetTminTmax(Double_t tmin = 0, Double_t tmax = 999);
0238 void SetDrawExtraPaths(Bool_t flag = kTRUE) { fDrawExtra = flag; }
0239 void SetNodeSelectable(Bool_t flag = kTRUE) { fIsNodeSelectable = flag; }
0240 void SetVisDensity(Double_t dens = 0.01);
0241 void SetVisLevel(Int_t level = 3);
0242 void SetVisOption(Int_t option = 0);
0243 void ViewLeaves(Bool_t flag = kTRUE);
0244 void SaveAttributes(const char *filename = "tgeoatt.C");
0245 void RestoreMasterVolume();
0246 void SetMaxVisNodes(Int_t maxnodes = 10000);
0247
0248 void AnimateTracks(Double_t tmin = 0, Double_t tmax = 5E-8, Int_t nframes = 200, Option_t *option = "/*");
0249 void CheckBoundaryErrors(Int_t ntracks = 1000000, Double_t radius = -1.);
0250 void CheckBoundaryReference(Int_t icheck = -1);
0251 void CheckGeometryFull(Int_t ntracks = 1000000, Double_t vx = 0., Double_t vy = 0., Double_t vz = 0.,
0252 Option_t *option = "ob");
0253 void CheckGeometry(Option_t *option = "");
0254 void CheckOverlaps(Double_t ovlp = 0.1, Option_t *option = "");
0255 void CheckPoint(Double_t x = 0, Double_t y = 0, Double_t z = 0, Option_t *option = "", Double_t safety = 0.);
0256 void CheckShape(TGeoShape *shape, Int_t testNo, Int_t nsamples, Option_t *option);
0257 void ConvertReflections();
0258 void DrawCurrentPoint(Int_t color = 2);
0259 void DrawTracks(Option_t *option = "");
0260 void SetParticleName(const char *pname) { fParticleName = pname; }
0261 const char *GetParticleName() const { return fParticleName.Data(); }
0262 void DrawPath(const char *path, Option_t *option = "");
0263 void PrintOverlaps() const;
0264 void RandomPoints(const TGeoVolume *vol, Int_t npoints = 10000, Option_t *option = "");
0265 void RandomRays(Int_t nrays = 1000, Double_t startx = 0, Double_t starty = 0, Double_t startz = 0,
0266 const char *target_vol = nullptr, Bool_t check_norm = kFALSE);
0267 TGeoNode *SamplePoints(Int_t npoints, Double_t &dist, Double_t epsil = 1E-5, const char *g3path = "");
0268 void SetNmeshPoints(Int_t npoints = 1000);
0269 void SetCheckedNode(TGeoNode *node);
0270 void Test(Int_t npoints = 1000000, Option_t *option = "");
0271 void TestOverlaps(const char *path = "");
0272 Double_t Weight(Double_t precision = 0.01, Option_t *option = "va");
0273
0274
0275 TGeoVolume *Division(const char *name, const char *mother, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step,
0276 Int_t numed = 0, Option_t *option = "");
0277 void
0278 Matrix(Int_t index, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3);
0279 TGeoMaterial *Material(const char *name, Double_t a, Double_t z, Double_t dens, Int_t uid, Double_t radlen = 0,
0280 Double_t intlen = 0);
0281 TGeoMaterial *
0282 Mixture(const char *name, Float_t *a, Float_t *z, Double_t dens, Int_t nelem, Float_t *wmat, Int_t uid);
0283 TGeoMaterial *
0284 Mixture(const char *name, Double_t *a, Double_t *z, Double_t dens, Int_t nelem, Double_t *wmat, Int_t uid);
0285 TGeoMedium *Medium(const char *name, Int_t numed, Int_t nmat, Int_t isvol, Int_t ifield, Double_t fieldm,
0286 Double_t tmaxfd, Double_t stemax, Double_t deemax, Double_t epsil, Double_t stmin);
0287 void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
0288 Bool_t isOnly, Float_t *upar, Int_t npar = 0);
0289 void Node(const char *name, Int_t nr, const char *mother, Double_t x, Double_t y, Double_t z, Int_t irot,
0290 Bool_t isOnly, Double_t *upar, Int_t npar = 0);
0291 TGeoVolume *Volume(const char *name, const char *shape, Int_t nmed, Float_t *upar, Int_t npar = 0);
0292 TGeoVolume *Volume(const char *name, const char *shape, Int_t nmed, Double_t *upar, Int_t npar = 0);
0293 void SetVolumeAttribute(const char *name, const char *att, Int_t val);
0294
0295 void BuildDefaultMaterials();
0296 void CloseGeometry(Option_t *option = "d");
0297 Bool_t IsClosed() const { return fClosed; }
0298 TGeoVolume *MakeArb8(const char *name, TGeoMedium *medium, Double_t dz, Double_t *vertices = nullptr);
0299 TGeoVolume *MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz);
0300 TGeoVolume *MakeCone(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1,
0301 Double_t rmin2, Double_t rmax2);
0302 TGeoVolume *MakeCons(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1,
0303 Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2);
0304 TGeoVolume *MakeCtub(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1,
0305 Double_t phi2, Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz);
0306 TGeoVolume *MakeEltu(const char *name, TGeoMedium *medium, Double_t a, Double_t b, Double_t dz);
0307 TGeoVolume *MakeGtra(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t twist,
0308 Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2,
0309 Double_t tl2, Double_t alpha2);
0310 TGeoVolume *MakePara(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz, Double_t alpha,
0311 Double_t theta, Double_t phi);
0312 TGeoVolume *MakePcon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nz);
0313 TGeoVolume *MakeParaboloid(const char *name, TGeoMedium *medium, Double_t rlo, Double_t rhi, Double_t dz);
0314 TGeoVolume *MakeHype(const char *name, TGeoMedium *medium, Double_t rin, Double_t stin, Double_t rout,
0315 Double_t stout, Double_t dz);
0316 TGeoVolume *MakePgon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz);
0317 TGeoVolume *MakeSphere(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t themin = 0,
0318 Double_t themax = 180, Double_t phimin = 0, Double_t phimax = 360);
0319 TGeoVolume *MakeTorus(const char *name, TGeoMedium *medium, Double_t r, Double_t rmin, Double_t rmax,
0320 Double_t phi1 = 0, Double_t dphi = 360);
0321 TGeoVolume *MakeTrap(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t h1,
0322 Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2,
0323 Double_t alpha2);
0324 TGeoVolume *MakeTrd1(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy, Double_t dz);
0325 TGeoVolume *
0326 MakeTrd2(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz);
0327 TGeoVolume *MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz);
0328 TGeoVolume *MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1,
0329 Double_t phi2);
0330 TGeoVolume *MakeXtru(const char *name, TGeoMedium *medium, Int_t nz);
0331
0332 TGeoPNEntry *SetAlignableEntry(const char *unique_name, const char *path, Int_t uid = -1);
0333 TGeoPNEntry *GetAlignableEntry(const char *name) const;
0334 TGeoPNEntry *GetAlignableEntry(Int_t index) const;
0335 TGeoPNEntry *GetAlignableEntryByUID(Int_t uid) const;
0336 Int_t GetNAlignable(Bool_t with_uid = kFALSE) const;
0337 TGeoPhysicalNode *MakeAlignablePN(const char *name);
0338 TGeoPhysicalNode *MakeAlignablePN(TGeoPNEntry *entry);
0339 TGeoPhysicalNode *MakePhysicalNode(const char *path = nullptr);
0340 void ClearPhysicalNodes(Bool_t mustdelete = kFALSE);
0341 void RefreshPhysicalNodes(Bool_t lock = kTRUE);
0342 TVirtualGeoTrack *MakeTrack(Int_t id, Int_t pdgcode, TObject *particle);
0343 TGeoVolumeAssembly *MakeVolumeAssembly(const char *name);
0344 TGeoVolumeMulti *MakeVolumeMulti(const char *name, TGeoMedium *medium);
0345 void SetTopVolume(TGeoVolume *vol);
0346
0347
0348 TGeoNode *CrossBoundaryAndLocate(Bool_t downwards, TGeoNode *skipnode);
0349 TGeoNode *FindNextBoundary(Double_t stepmax = TGeoShape::Big(), const char *path = "", Bool_t frombdr = kFALSE);
0350 TGeoNode *FindNextDaughterBoundary(Double_t *point, Double_t *dir, Int_t &idaughter, Bool_t compmatrix = kFALSE);
0351 TGeoNode *FindNextBoundaryAndStep(Double_t stepmax = TGeoShape::Big(), Bool_t compsafe = kFALSE);
0352 TGeoNode *FindNode(Bool_t safe_start = kTRUE);
0353 TGeoNode *FindNode(Double_t x, Double_t y, Double_t z);
0354 Double_t *FindNormal(Bool_t forward = kTRUE);
0355 Double_t *FindNormalFast();
0356 TGeoNode *InitTrack(const Double_t *point, const Double_t *dir);
0357 TGeoNode *InitTrack(Double_t x, Double_t y, Double_t z, Double_t nx, Double_t ny, Double_t nz);
0358 void ResetState();
0359 Double_t Safety(Bool_t inside = kFALSE);
0360 TGeoNode *SearchNode(Bool_t downwards = kFALSE, const TGeoNode *skipnode = nullptr);
0361 TGeoNode *Step(Bool_t is_geom = kTRUE, Bool_t cross = kTRUE);
0362 void DisableInactiveVolumes() { fActivity = kTRUE; }
0363 void EnableInactiveVolumes() { fActivity = kFALSE; }
0364 void SetCurrentTrack(Int_t i) { fCurrentTrack = (TVirtualGeoTrack *)fTracks->At(i); }
0365 void SetCurrentTrack(TVirtualGeoTrack *track) { fCurrentTrack = track; }
0366 Int_t GetNtracks() const { return fNtracks; }
0367 TVirtualGeoTrack *GetCurrentTrack() { return fCurrentTrack; }
0368 TVirtualGeoTrack *GetLastTrack()
0369 {
0370 return (TVirtualGeoTrack *)((fNtracks > 0) ? fTracks->At(fNtracks - 1) : nullptr);
0371 }
0372 const Double_t *GetLastPoint() const { return GetCurrentNavigator()->GetLastPoint(); }
0373 TVirtualGeoTrack *GetTrack(Int_t index)
0374 {
0375 return (index < fNtracks) ? (TVirtualGeoTrack *)fTracks->At(index) : nullptr;
0376 }
0377 Int_t GetTrackIndex(Int_t id) const;
0378 TVirtualGeoTrack *GetTrackOfId(Int_t id) const;
0379 TVirtualGeoTrack *FindTrackWithId(Int_t id) const;
0380 TVirtualGeoTrack *GetParentTrackOfId(Int_t id) const;
0381 Int_t GetVirtualLevel();
0382 Bool_t GotoSafeLevel();
0383 Int_t GetSafeLevel() const;
0384 Double_t GetSafeDistance() const { return GetCurrentNavigator()->GetSafeDistance(); }
0385 Double_t GetLastSafety() const { return GetCurrentNavigator()->GetLastSafety(); }
0386 Double_t GetStep() const { return GetCurrentNavigator()->GetStep(); }
0387 void InspectState() const;
0388 Bool_t IsAnimatingTracks() const { return fIsGeomReading; }
0389 Bool_t IsCheckingOverlaps() const { return GetCurrentNavigator()->IsCheckingOverlaps(); }
0390 Bool_t IsMatrixTransform() const { return fMatrixTransform; }
0391 Bool_t IsMatrixReflection() const { return fMatrixReflection; }
0392 Bool_t IsSameLocation(Double_t x, Double_t y, Double_t z, Bool_t change = kFALSE);
0393 Bool_t IsSameLocation() const { return GetCurrentNavigator()->IsSameLocation(); }
0394 Bool_t IsSamePoint(Double_t x, Double_t y, Double_t z) const;
0395 Bool_t IsStartSafe() const { return GetCurrentNavigator()->IsStartSafe(); }
0396 void SetCheckingOverlaps(Bool_t flag = kTRUE) { GetCurrentNavigator()->SetCheckingOverlaps(flag); }
0397 void SetStartSafe(Bool_t flag = kTRUE) { GetCurrentNavigator()->SetStartSafe(flag); }
0398 void SetMatrixTransform(Bool_t on = kTRUE) { fMatrixTransform = on; }
0399 void SetMatrixReflection(Bool_t flag = kTRUE) { fMatrixReflection = flag; }
0400 void SetStep(Double_t step) { GetCurrentNavigator()->SetStep(step); }
0401 Bool_t IsCurrentOverlapping() const { return GetCurrentNavigator()->IsCurrentOverlapping(); }
0402 Bool_t IsEntering() const { return GetCurrentNavigator()->IsEntering(); }
0403 Bool_t IsExiting() const { return GetCurrentNavigator()->IsExiting(); }
0404 Bool_t IsStepEntering() const { return GetCurrentNavigator()->IsStepEntering(); }
0405 Bool_t IsStepExiting() const { return GetCurrentNavigator()->IsStepExiting(); }
0406 Bool_t IsOutside() const { return GetCurrentNavigator()->IsOutside(); }
0407 Bool_t IsOnBoundary() const { return GetCurrentNavigator()->IsOnBoundary(); }
0408 Bool_t IsNullStep() const { return GetCurrentNavigator()->IsNullStep(); }
0409 Bool_t IsActivityEnabled() const { return fActivity; }
0410 void SetOutside(Bool_t flag = kTRUE) { GetCurrentNavigator()->SetOutside(flag); }
0411
0412
0413 void CleanGarbage();
0414 void ClearShape(const TGeoShape *shape);
0415 void ClearTracks()
0416 {
0417 fTracks->Delete();
0418 fNtracks = 0;
0419 }
0420 void ClearNavigators();
0421 void RemoveMaterial(Int_t index);
0422 void RemoveNavigator(const TGeoNavigator *nav);
0423 void ResetUserData();
0424
0425
0426 Int_t CountNodes(const TGeoVolume *vol = nullptr, Int_t nlevels = 10000, Int_t option = 0);
0427 void CountLevels();
0428 void ExecuteEvent(Int_t event, Int_t px, Int_t py) override;
0429 static Int_t Parse(const char *expr, TString &expr1, TString &expr2, TString &expr3);
0430 Int_t ReplaceVolume(TGeoVolume *vorig, TGeoVolume *vnew);
0431 Int_t TransformVolumeToAssembly(const char *vname);
0432 UChar_t *GetBits() { return fBits; }
0433 virtual Int_t GetByteCount(Option_t *option = nullptr);
0434 void SetAllIndex();
0435 static Int_t GetMaxDaughters();
0436 static Int_t GetMaxLevels();
0437 static Int_t GetMaxXtruVert();
0438 Int_t GetMaxThreads() const { return fMaxThreads - 1; }
0439 void SetMaxThreads(Int_t nthreads);
0440 Int_t GetRTmode() const { return fRaytraceMode; }
0441 void SetRTmode(Int_t mode);
0442 Bool_t IsMultiThread() const { return fMultiThread; }
0443 static void SetNavigatorsLock(Bool_t flag);
0444 static Int_t ThreadId();
0445 static Int_t GetNumThreads();
0446 static void ClearThreadsMap();
0447 void ClearThreadData() const;
0448 void CreateThreadData() const;
0449
0450
0451 virtual Int_t Export(const char *filename, const char *name = "", Option_t *option = "vg");
0452 static void LockGeometry();
0453 static void UnlockGeometry();
0454 static Int_t GetVerboseLevel();
0455 static void SetVerboseLevel(Int_t vl);
0456 static TGeoManager *Import(const char *filename, const char *name = "", Option_t *option = "");
0457 static Bool_t IsLocked();
0458 static void SetExportPrecision(UInt_t prec);
0459 static UInt_t GetExportPrecision();
0460 static void SetDefaultUnits(EDefaultUnits new_value);
0461 static EDefaultUnits GetDefaultUnits();
0462 static Bool_t LockDefaultUnits(Bool_t new_value);
0463 Bool_t IsStreamingVoxels() const { return fStreamVoxels; }
0464 Bool_t IsCleaning() const { return fIsGeomCleaning; }
0465
0466
0467 TObjArray *GetListOfNodes() { return fNodes; }
0468 TObjArray *GetListOfPhysicalNodes() { return fPhysicalNodes; }
0469 TObjArray *GetListOfOverlaps() { return fOverlaps; }
0470 TObjArray *GetListOfMatrices() const { return fMatrices; }
0471 TList *GetListOfMaterials() const { return fMaterials; }
0472 TList *GetListOfMedia() const { return fMedia; }
0473 TObjArray *GetListOfVolumes() const { return fVolumes; }
0474 TObjArray *GetListOfGVolumes() const { return fGVolumes; }
0475 TObjArray *GetListOfShapes() const { return fShapes; }
0476 TObjArray *GetListOfGShapes() const { return fGShapes; }
0477 TObjArray *GetListOfUVolumes() const { return fUniqueVolumes; }
0478 TObjArray *GetListOfTracks() const { return fTracks; }
0479 TObjArray *GetListOfGDMLMatrices() const { return fGDMLMatrices; }
0480 TObjArray *GetListOfOpticalSurfaces() const { return fOpticalSurfaces; }
0481 TObjArray *GetListOfSkinSurfaces() const { return fSkinSurfaces; }
0482 TObjArray *GetListOfBorderSurfaces() const { return fBorderSurfaces; }
0483 TObjArray *GetListOfRegions() const { return fRegions; }
0484 TGeoNavigatorArray *GetListOfNavigators() const;
0485 TGeoElementTable *GetElementTable();
0486
0487
0488 void DoBackupState();
0489 void DoRestoreState();
0490 TGeoNode *GetNode(Int_t level) const { return (TGeoNode *)fNodes->UncheckedAt(level); }
0491 Int_t GetNodeId() const { return GetCurrentNavigator()->GetNodeId(); }
0492 TGeoNode *GetNextNode() const { return GetCurrentNavigator()->GetNextNode(); }
0493 TGeoNode *GetMother(Int_t up = 1) const { return GetCurrentNavigator()->GetMother(up); }
0494 TGeoHMatrix *GetMotherMatrix(Int_t up = 1) const { return GetCurrentNavigator()->GetMotherMatrix(up); }
0495 TGeoHMatrix *GetHMatrix();
0496 TGeoHMatrix *GetCurrentMatrix() const { return GetCurrentNavigator()->GetCurrentMatrix(); }
0497 TGeoHMatrix *GetGLMatrix() const { return fGLMatrix; }
0498 TGeoNavigator *GetCurrentNavigator() const;
0499 TGeoNode *GetCurrentNode() const { return GetCurrentNavigator()->GetCurrentNode(); }
0500 Int_t GetCurrentNodeId() const;
0501 const Double_t *GetCurrentPoint() const { return GetCurrentNavigator()->GetCurrentPoint(); }
0502 const Double_t *GetCurrentDirection() const { return GetCurrentNavigator()->GetCurrentDirection(); }
0503 TGeoVolume *GetCurrentVolume() const { return GetCurrentNavigator()->GetCurrentVolume(); }
0504 const Double_t *GetCldirChecked() const { return GetCurrentNavigator()->GetCldirChecked(); }
0505 const Double_t *GetCldir() const { return GetCurrentNavigator()->GetCldir(); }
0506 const Double_t *GetNormal() const { return GetCurrentNavigator()->GetNormal(); }
0507 Int_t GetLevel() const { return GetCurrentNavigator()->GetLevel(); }
0508 Int_t GetMaxLevel() const { return fNLevel; }
0509 const char *GetPath() const;
0510 Int_t GetStackLevel() const { return GetCurrentNavigator()->GetStackLevel(); }
0511 TGeoVolume *GetMasterVolume() const { return fMasterVolume; }
0512 TGeoVolume *GetTopVolume() const { return fTopVolume; }
0513 TGeoNode *GetTopNode() const { return fTopNode; }
0514 TGeoPhysicalNode *GetPhysicalNode(Int_t i) const { return (TGeoPhysicalNode *)fPhysicalNodes->UncheckedAt(i); }
0515 void SetCurrentPoint(Double_t *point) { GetCurrentNavigator()->SetCurrentPoint(point); }
0516 void SetCurrentPoint(Double_t x, Double_t y, Double_t z) { GetCurrentNavigator()->SetCurrentPoint(x, y, z); }
0517 void SetLastPoint(Double_t x, Double_t y, Double_t z) { GetCurrentNavigator()->SetLastPoint(x, y, z); }
0518 void SetCurrentDirection(Double_t *dir) { GetCurrentNavigator()->SetCurrentDirection(dir); }
0519 void SetCurrentDirection(Double_t nx, Double_t ny, Double_t nz)
0520 {
0521 GetCurrentNavigator()->SetCurrentDirection(nx, ny, nz);
0522 }
0523 void SetCldirChecked(Double_t *dir) { GetCurrentNavigator()->SetCldirChecked(dir); }
0524
0525
0526 void LocalToMaster(const Double_t *local, Double_t *master) const
0527 {
0528 GetCurrentNavigator()->LocalToMaster(local, master);
0529 }
0530 void LocalToMasterVect(const Double_t *local, Double_t *master) const
0531 {
0532 GetCurrentNavigator()->LocalToMasterVect(local, master);
0533 }
0534 void LocalToMasterBomb(const Double_t *local, Double_t *master) const
0535 {
0536 GetCurrentNavigator()->LocalToMasterBomb(local, master);
0537 }
0538 void MasterToLocal(const Double_t *master, Double_t *local) const
0539 {
0540 GetCurrentNavigator()->MasterToLocal(master, local);
0541 }
0542 void MasterToLocalVect(const Double_t *master, Double_t *local) const
0543 {
0544 GetCurrentNavigator()->MasterToLocalVect(master, local);
0545 }
0546 void MasterToLocalBomb(const Double_t *master, Double_t *local) const
0547 {
0548 GetCurrentNavigator()->MasterToLocalBomb(master, local);
0549 }
0550 void MasterToTop(const Double_t *master, Double_t *top) const;
0551 void TopToMaster(const Double_t *top, Double_t *master) const;
0552
0553
0554 TGeoMaterial *FindDuplicateMaterial(const TGeoMaterial *mat) const;
0555 TGeoVolume *FindVolumeFast(const char *name, Bool_t multi = kFALSE);
0556 TGeoMaterial *GetMaterial(const char *matname) const;
0557 TGeoMaterial *GetMaterial(Int_t id) const;
0558 TGeoMedium *GetMedium(const char *medium) const;
0559 TGeoMedium *GetMedium(Int_t numed) const;
0560 Int_t GetMaterialIndex(const char *matname) const;
0561
0562
0563 TGDMLMatrix *GetGDMLMatrix(const char *name) const;
0564 void AddGDMLMatrix(TGDMLMatrix *mat);
0565 TGeoOpticalSurface *GetOpticalSurface(const char *name) const;
0566 void AddOpticalSurface(TGeoOpticalSurface *optsurf);
0567 TGeoSkinSurface *GetSkinSurface(const char *name) const;
0568 void AddSkinSurface(TGeoSkinSurface *surf);
0569 TGeoBorderSurface *GetBorderSurface(const char *name) const;
0570 void AddBorderSurface(TGeoBorderSurface *surf);
0571
0572
0573 TGeoVolume *GetVolume(const char *name) const;
0574 TGeoVolume *GetVolume(Int_t uid) const { return (TGeoVolume *)fUniqueVolumes->At(uid); }
0575 int GetNregions() const { return fRegions->GetEntriesFast(); }
0576 TGeoRegion *GetRegion(int i) { return (TGeoRegion *)fRegions->At(i); }
0577 Int_t GetUID(const char *volname) const;
0578 Int_t GetNNodes()
0579 {
0580 if (!fNNodes)
0581 CountNodes();
0582 return fNNodes;
0583 }
0584 TGeoNodeCache *GetCache() const { return GetCurrentNavigator()->GetCache(); }
0585
0586 void SetAnimateTracks(Bool_t flag = kTRUE) { fIsGeomReading = flag; }
0587 virtual ULong_t SizeOf(const TGeoNode *node, Option_t *option);
0588 void SelectTrackingMedia();
0589
0590
0591 Int_t PushPath(Int_t startlevel = 0) { return GetCurrentNavigator()->PushPath(startlevel); }
0592 Bool_t PopPath() { return GetCurrentNavigator()->PopPath(); }
0593 Bool_t PopPath(Int_t index) { return GetCurrentNavigator()->PopPath(index); }
0594 Int_t PushPoint(Int_t startlevel = 0) { return GetCurrentNavigator()->PushPoint(startlevel); }
0595 Bool_t PopPoint() { return GetCurrentNavigator()->PopPoint(); }
0596 Bool_t PopPoint(Int_t index) { return GetCurrentNavigator()->PopPoint(index); }
0597 void PopDummy(Int_t ipop = 9999) { return GetCurrentNavigator()->PopDummy(ipop); }
0598
0599
0600 TGeoParallelWorld *CreateParallelWorld(const char *name);
0601 TGeoParallelWorld *GetParallelWorld() const { return fParallelWorld; }
0602 void SetUseParallelWorldNav(Bool_t flag);
0603 Bool_t IsParallelWorldNav() const { return fUsePWNav; }
0604
0605 ClassDefOverride(TGeoManager, 17)
0606 };
0607
0608 R__EXTERN TGeoManager *gGeoManager;
0609
0610 #endif