library: libGeom #include "TGeoManager.h"

# TGeoManager

class description - source file - inheritance tree (.pdf)

## class TGeoManager : public TNamed

| Inheritance Chart:

`TObject`

<-

`TNamed`

<-

`TGeoManager`

        private:

               void BuildCache(Bool_t dummy = kFALSE, Bool_t nodeid = kFALSE)
               void BuildIdArray()
          TGeoNode* FindInCluster(Int_t* cluster, Int_t nc)
              Int_t GetTouchedCluster(Int_t start, Double_t* point, Int_t* check_list, Int_t ncheck, Int_t* result)
               void Init()
             Bool_t IsLoopingVolumes() const
               void SafetyOverlaps()
               void SetLoopVolumes(Bool_t flag = kTRUE)
               void Voxelize(Option_t* option = "0")

        public:

                              TGeoManager()
                              TGeoManager(const char* name, const char* title)
                              TGeoManager(const TGeoManager&)
                      virtual ~TGeoManager()
                        Int_t AddMaterial(const TGeoMaterial* material)
                        Int_t AddOverlap(const TNamed* ovlp)
                        Int_t AddShape(const TGeoShape* shape)
                        Int_t AddTrack(Int_t id, Int_t pdgcode, TObject* particle = 0)
                        Int_t AddTransformation(const TGeoMatrix* matrix)
                        Int_t AddVolume(TGeoVolume* volume)
                         void AnimateTracks(Double_t tmin = 0, Double_t tmax = 5E-8, Int_t nframes = 200, Option_t* option = "/*")
                         void BombTranslation(const Double_t* tr, Double_t* bombtr)
                 virtual void Browse(TBrowser* b)
                         void BuildDefaultMaterials()
               virtual Bool_t cd(const char* path = "")
                         void CdDown(Int_t index)
                         void CdNode(Int_t nodeid)
                         void CdTop()
                         void CdUp()
                         void CheckGeometry(Option_t* option = "")
                         void CheckOverlaps(Double_t ovlp = 0.1, Option_t* option = "")
                         void CheckPoint(Double_t x = 0, Double_t y = 0, Double_t z = 0, Option_t* option = "")
               static TClass* Class()
                         void CleanGarbage()
                         void ClearAttributes()
                         void ClearOverlaps()
                         void ClearPhysicalNodes(Bool_t mustdelete = kFALSE)
                         void ClearShape(const TGeoShape* shape)
                         void ClearTracks()
                         void CloseGeometry(Option_t* option = "d")
                        Int_t CountNodes(const TGeoVolume* vol = 0, Int_t nlevels = 10000, Int_t option = 0)
                         void DefaultAngles()
                         void DefaultColors()
                  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 = "")
                         void DrawCurrentPoint(Int_t color = 2)
                         void DrawPath(const char* path)
                         void DrawTracks(Option_t* option = "")
                virtual Int_t Export(const char* filename, const char* name = "", Option_t* option = "v")
                TGeoMaterial* FindDuplicateMaterial(const TGeoMaterial* mat) const
                    TGeoNode* FindNextBoundary(Double_t stepmax = 1e30, const char* path = "")
                    TGeoNode* FindNextDaughterBoundary(Double_t* point, Double_t* dir, Bool_t compmatrix = kFALSE)
                    TGeoNode* FindNode(Bool_t safe_start = kTRUE)
                    TGeoNode* FindNode(Double_t x, Double_t y, Double_t z)
                    Double_t* FindNormal(Bool_t forward = kTRUE)
                    Double_t* FindNormalFast()
                  TGeoVolume* FindVolumeFast(const char* name, Bool_t multi = kFALSE)
                     UChar_t* GetBits()
                         void GetBombFactors(Double_t& bombx, Double_t& bomby, Double_t& bombz, Double_t& bombr) const
                        Int_t GetBombMode() const
                         void GetBranchNames(Int_t* names) const
                         void GetBranchNumbers(Int_t* copyNumbers, Int_t* volumeNumbers) const
                         void GetBranchOnlys(Int_t* isonly) const
                virtual Int_t GetByteCount(Option_t* option = "0")
               TGeoNodeCache* GetCache() const
                    Double_t* GetCldir() const
                    Double_t* GetCldirChecked() const
                   TGeoShape* GetClippingShape() const
                    Double_t* GetCurrentDirection() const
                 TGeoHMatrix* GetCurrentMatrix() const
                    TGeoNode* GetCurrentNode() const
                        Int_t GetCurrentNodeId() const
                    Double_t* GetCurrentPoint() const
            TVirtualGeoTrack* GetCurrentTrack()
                  TGeoVolume* GetCurrentVolume() const
                    Double_t* GetDblBuffer(Int_t length)
            TGeoElementTable* GetElementTable() const
          TVirtualGeoPainter* GetGeomPainter()
                 TGeoHMatrix* GetGLMatrix() const
                 TGeoHMatrix* GetHMatrix()
                       Int_t* GetIntBuffer(Int_t length)
              const Double_t* GetLastPoint() const
            TVirtualGeoTrack* GetLastTrack()
                        Int_t GetLevel() const
                   TObjArray* GetListOfGVolumes() const
                       TList* GetListOfMaterials() const
                   TObjArray* GetListOfMatrices() const
                       TList* GetListOfMedia() const
                   TObjArray* GetListOfNodes()
                   TObjArray* GetListOfOverlaps()
                   TObjArray* GetListOfPhysicalNodes()
                   TObjArray* GetListOfShapes() const
                   TObjArray* GetListOfTracks() const
                   TObjArray* GetListOfUVolumes() const
                   TObjArray* GetListOfVolumes() const
                  TGeoVolume* GetMasterVolume() const
                TGeoMaterial* GetMaterial(const char* matname) const
                TGeoMaterial* GetMaterial(Int_t id) const
                        Int_t GetMaterialIndex(const char* matname) const
                        Int_t GetMaxVisNodes() const
                  TGeoMedium* GetMedium(const char* medium) const
                  TGeoMedium* GetMedium(Int_t numed) const
                    TGeoNode* GetMother(Int_t up = 1) const
                    TGeoNode* GetNextNode() const
                        Int_t GetNNodes()
                    TGeoNode* GetNode(Int_t level) const
                        Int_t GetNodeId() const
              const Double_t* GetNormal() const
                        Int_t GetNsegments() const
                        Int_t GetNtracks() const
          TVirtualGeoPainter* GetPainter() const
                  TGeoVolume* GetPaintVolume() const
            TVirtualGeoTrack* GetParentTrackOfId(Int_t id) const
                  const char* GetParticleName() const
                  const char* GetPath() const
                  const char* GetPdgName(Int_t pdg) const
            TGeoPhysicalNode* GetPhysicalNode(Int_t i) const
                     Double_t GetSafeDistance() const
                        Int_t GetSafeLevel() const
                        Int_t GetStackLevel() const
                     Double_t GetStep() const
                     Double_t GetTmax() const
                       Bool_t GetTminTmax(Double_t& tmin, Double_t& tmax) const
                    TGeoNode* GetTopNode() const
                  TGeoVolume* GetTopVolume() const
            TVirtualGeoTrack* GetTrack(Int_t index)
                        Int_t GetTrackIndex(Int_t id) const
            TVirtualGeoTrack* GetTrackOfId(Int_t id) const
                        Int_t GetUID(const char* volname) const
                        Int_t GetVirtualLevel()
                     Double_t GetVisDensity() const
                        Int_t GetVisLevel() const
                        Int_t GetVisOption() const
                  TGeoVolume* GetVolume(const char* name) const
                  TGeoVolume* GetVolume(Int_t uid) const
                       Bool_t GotoSafeLevel()
          static TGeoManager* Import(const char* filename, const char* name = "", Option_t* option = "")
                    TGeoNode* InitTrack(Double_t* point, Double_t* dir)
                    TGeoNode* InitTrack(Double_t x, Double_t y, Double_t z, Double_t nx, Double_t ny, Double_t nz)
              virtual TClass* IsA() const
                       Bool_t IsAnimatingTracks() const
                       Bool_t IsCheckingOverlaps() const
                       Bool_t IsClosed() const
                       Bool_t IsCurrentOverlapping() const
                       Bool_t IsDrawingExtra() const
                       Bool_t IsEntering() const
                       Bool_t IsExiting() const
               virtual Bool_t IsFolder() const
                       Bool_t IsInPhiRange() const
                       Bool_t IsMatrixReflection() const
                       Bool_t IsMatrixTransform() const
                       Bool_t IsNullStep() const
                       Bool_t IsOnBoundary() const
                       Bool_t IsOutside() const
                       Bool_t IsSameLocation(Double_t x, Double_t y, Double_t z, Bool_t change = kFALSE)
                       Bool_t IsSameLocation() const
                       Bool_t IsSamePoint(Double_t x, Double_t y, Double_t z) const
                       Bool_t IsStartSafe() const
                       Bool_t IsStepEntering() const
                       Bool_t IsStepExiting() const
                       Bool_t IsStreamingVoxels() const
                       Bool_t IsVisLeaves() const
                         void LocalToMaster(const Double_t* local, Double_t* master) const
                         void LocalToMasterBomb(const Double_t* local, Double_t* master) const
                         void LocalToMasterVect(const Double_t* local, Double_t* master) const
                  TGeoVolume* MakeArb8(const char* name, const TGeoMedium* medium, Double_t dz, Double_t* vertices = 0)
                  TGeoVolume* MakeBox(const char* name, const TGeoMedium* medium, Double_t dx, Double_t dy, Double_t dz)
                  TGeoVolume* MakeCone(const char* name, const TGeoMedium* medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
                  TGeoVolume* MakeCons(const char* name, const TGeoMedium* medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
                  TGeoVolume* MakeCtub(const char* name, const 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)
                  TGeoVolume* MakeEltu(const char* name, const TGeoMedium* medium, Double_t a, Double_t b, Double_t dz)
                  TGeoVolume* MakeGtra(const char* name, const 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)
                  TGeoVolume* MakeHype(const char* name, const TGeoMedium* medium, Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
                  TGeoVolume* MakePara(const char* name, const TGeoMedium* medium, Double_t dx, Double_t dy, Double_t dz, Double_t alpha, Double_t theta, Double_t phi)
                  TGeoVolume* MakeParaboloid(const char* name, const TGeoMedium* medium, Double_t rlo, Double_t rhi, Double_t dz)
                  TGeoVolume* MakePcon(const char* name, const TGeoMedium* medium, Double_t phi, Double_t dphi, Int_t nz)
                  TGeoVolume* MakePgon(const char* name, const TGeoMedium* medium, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
            TGeoPhysicalNode* MakePhysicalNode(const char* path = "0")
                  TGeoVolume* MakeSphere(const char* name, const TGeoMedium* medium, Double_t rmin, Double_t rmax, Double_t themin = 0, Double_t themax = 180, Double_t phimin = 0, Double_t phimax = 360)
                  TGeoVolume* MakeTorus(const char* name, const TGeoMedium* medium, Double_t r, Double_t rmin, Double_t rmax, Double_t phi1 = 0, Double_t dphi = 360)
            TVirtualGeoTrack* MakeTrack(Int_t id, Int_t pdgcode, TObject* particle)
                  TGeoVolume* MakeTrap(const char* name, const 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)
                  TGeoVolume* MakeTrd1(const char* name, const TGeoMedium* medium, Double_t dx1, Double_t dx2, Double_t dy, Double_t dz)
                  TGeoVolume* MakeTrd2(const char* name, const TGeoMedium* medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz)
                  TGeoVolume* MakeTube(const char* name, const TGeoMedium* medium, Double_t rmin, Double_t rmax, Double_t dz)
                  TGeoVolume* MakeTubs(const char* name, const TGeoMedium* medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
          TGeoVolumeAssembly* MakeVolumeAssembly(const char* name)
             TGeoVolumeMulti* MakeVolumeMulti(const char* name, const TGeoMedium* medium)
                  TGeoVolume* MakeXtru(const char* name, const TGeoMedium* medium, Int_t nz)
                         void MasterToLocal(const Double_t* master, Double_t* local) const
                         void MasterToLocalBomb(const Double_t* master, Double_t* local) const
                         void MasterToLocalVect(const Double_t* master, Double_t* local) const
                         void MasterToTop(const Double_t* master, Double_t* top) const
                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 Matrix(Int_t index, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3)
                  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)
                TGeoMaterial* Mixture(const char* name, Float_t* a, Float_t* z, Double_t dens, Int_t nelem, Float_t* wmat, Int_t uid)
                TGeoMaterial* Mixture(const char* name, Double_t* a, Double_t* z, Double_t dens, Int_t nelem, Double_t* wmat, Int_t uid)
                         void ModifiedPad() const
                         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)
                         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)
                 TGeoManager& operator=(const TGeoManager&)
                         void OptimizeVoxels(const char* filename = "tgeovox.C")
                 static Int_t Parse(const char* expr, TString& expr1, TString& expr2, TString& expr3)
                         void PopDummy(Int_t ipop = 9999)
                       Bool_t PopPath()
                       Bool_t PopPath(Int_t index)
                       Bool_t PopPoint()
                       Bool_t PopPoint(Int_t index)
                         void PrintOverlaps() const
                        Int_t PushPath(Int_t startlevel = 0)
                        Int_t PushPoint(Int_t startlevel = 0)
                         void RandomPoints(const TGeoVolume* vol, Int_t npoints = 10000, Option_t* option = "")
                         void RandomRays(Int_t nrays = 1000, Double_t startx = 0, Double_t starty = 0, Double_t startz = 0)
                         void RegisterMatrix(const TGeoMatrix* matrix)
                         void RemoveMaterial(Int_t index)
                         void ResetUserData()
                         void RestoreMasterVolume()
                     Double_t Safety(Bool_t inside = kFALSE)
                    TGeoNode* SamplePoints(Int_t npoints, Double_t& dist, Double_t epsil = 1E-5, const char* g3path = "")
                         void SaveAttributes(const char* filename = "tgeoatt.C")
                    TGeoNode* SearchNode(Bool_t downwards = kFALSE, const TGeoNode* skipnode = 0)
                         void SelectTrackingMedia()
                         void SetAllIndex()
                         void SetAnimateTracks(Bool_t flag = kTRUE)
                         void SetBombFactors(Double_t bombx = 1.3, Double_t bomby = 1.3, Double_t bombz = 1.3, Double_t bombr = 1.3)
                         void SetCache(const TGeoNodeCache* cache)
                         void SetCldirChecked(Double_t* dir)
                         void SetClipping(Bool_t flag = kTRUE)
                         void SetClippingShape(TGeoShape* clip)
                         void SetCurrentDirection(Double_t* dir)
                         void SetCurrentDirection(Double_t nx, Double_t ny, Double_t nz)
                         void SetCurrentPoint(Double_t* point)
                         void SetCurrentPoint(Double_t x, Double_t y, Double_t z)
                         void SetCurrentTrack(Int_t i)
                         void SetCurrentTrack(TVirtualGeoTrack* track)
                         void SetDrawExtraPaths(Bool_t flag = kTRUE)
                         void SetExplodedView(Int_t iopt = 0)
                         void SetLastPoint(Double_t x, Double_t y, Double_t z)
                         void SetMatrixReflection(Bool_t flag = kTRUE)
                         void SetMatrixTransform(Bool_t on = kTRUE)
                         void SetMaxVisNodes(Int_t maxnodes = 10000)
                         void SetNsegments(Int_t nseg)
                         void SetOutside(Bool_t flag = kTRUE)
                         void SetPaintVolume(TGeoVolume* vol)
                         void SetParticleName(const char* pname)
                         void SetPdgName(Int_t pdg, const char* name)
                         void SetPhiRange(Double_t phimin = 0., Double_t phimax = 360.)
                         void SetStartSafe(Bool_t flag = kTRUE)
                         void SetStep(Double_t step)
                         void SetTminTmax(Double_t tmin = 0, Double_t tmax = 999)
                         void SetTopVisible(Bool_t vis = kTRUE)
                         void SetTopVolume(TGeoVolume* vol)
                         void SetVisDensity(Double_t dens = 0.01)
                         void SetVisLevel(Int_t level = 3)
                         void SetVisOption(Int_t option = 0)
                         void SetVolumeAttribute(const char* name, const char* att, Int_t val)
                 virtual void ShowMembers(TMemberInspector& insp, char* parent)
              virtual ULong_t SizeOf(const TGeoNode* node, Option_t* option)
                         void SortOverlaps()
                    TGeoNode* Step(Bool_t is_geom = kTRUE, Bool_t cross = kTRUE)
                 virtual void Streamer(TBuffer& b)
                         void StreamerNVirtual(TBuffer& b)
                         void Test(Int_t npoints = 1000000, Option_t* option = "")
                         void TestOverlaps(const char* path = "")
                         void TopToMaster(const Double_t* top, Double_t* master) const
                         void UnbombTranslation(const Double_t* tr, Double_t* bombtr)
                         void UpdateCurrentPosition(Double_t* nextpoint)
                         void ViewLeaves(Bool_t flag = kTRUE)
                  TGeoVolume* Volume(const char* name, const char* shape, Int_t nmed, Float_t* upar, Int_t npar = 0)
                  TGeoVolume* Volume(const char* name, const char* shape, Int_t nmed, Double_t* upar, Int_t npar = 0)
                     Double_t Weight(Double_t precision = 0.01, Option_t* option = "v")

### Data Members

        private:

                     Double_t fStep                ! step to be done from current point and direction
                     Double_t fSafety              ! safety radius from current point
                     Double_t fLastSafety          ! last computed safety radius
                     Double_t fPhimin              ! lowest range for phi cut
                     Double_t fPhimax              ! highest range for phi cut
                     Double_t fTmin                ! lower time limit for tracks drawing
                     Double_t fTmax                ! upper time limit for tracks drawing
                        Int_t fLevel               ! current geometry level;
                        Int_t fNNodes              total number of physical nodes
                      TString fPath                ! path to current node
                      TString fParticleName        ! particles to be drawn
                     Double_t fNormal[3]           ! cosine of incident angle on current checked surface
                    Double_t* fCldir               ! unit vector to current closest shape
                    Double_t* fCldirChecked        ! unit vector to current checked shape
                    Double_t* fPoint               ![3] current point
                    Double_t* fDirection           ![3] current direction
                     Double_t fVisDensity          transparency threshold by density
                        Int_t fExplodedView        exploded view mode
                        Int_t fVisOption           global visualization option
                        Int_t fVisLevel            maximum visualization depth
                        Int_t fNsegments           number of segments to approximate circles
                        Int_t fNtracks             number of tracks
                        Int_t fMaxVisNodes         maximum number of visible nodes
            TVirtualGeoTrack* fCurrentTrack        ! current track
                        Int_t fNpdg                number of different pdg's stored
                        Int_t fPdgId[256]          pdg conversion table
                       Bool_t fSearchOverlaps      ! flag set when an overlapping cluster is searched
                       Bool_t fCurrentOverlapping  ! flags the type of the current node
                       Bool_t fLoopVolumes         ! flag volume lists loop
                       Bool_t fStartSafe           ! flag a safe start for point classification
                       Bool_t fIsEntering          ! flag if current step just got into a new node
                       Bool_t fIsExiting           ! flag that current track is about to leave current node
                       Bool_t fIsStepEntering      ! flag that next geometric step will enter new volume
                       Bool_t fIsStepExiting       ! flaag that next geometric step will exit current volume
                       Bool_t fIsOutside           ! flag that current point is outside geometry
                       Bool_t fIsOnBoundary        ! flag that current point is on some boundary
                       Bool_t fIsSameLocation      ! flag that a new point is in the same node as previous
                       Bool_t fIsNullStep          ! flag that last geometric step was null
                       Bool_t fStreamVoxels        flag to allow voxelization I/O
                       Bool_t fIsGeomReading       ! flag set when reading geometry
                       Bool_t fPhiCut              flag for phi cuts
                       Bool_t fTimeCut             time cut for tracks
                       Bool_t fDrawExtra           ! flag that the list of physical nodes has to be drawn
                       Bool_t fMatrixTransform     ! flag for using GL matrix
                       Bool_t fMatrixReflection    ! flag for GL reflections
               TGeoNodeCache* fCache               ! cache for physical nodes
          TVirtualGeoPainter* fPainter             ! current painter
                   TObjArray* fMatrices            -> list of local transformations
                   TObjArray* fShapes              -> list of shapes
                   TObjArray* fVolumes             -> list of volumes
                   TObjArray* fPhysicalNodes       -> list of physical nodes
                   TObjArray* fGShapes             ! list of runtime shapes
                   TObjArray* fGVolumes            ! list of runtime volumes
                   TObjArray* fTracks              -> list of tracks attached to geometry
                   TObjArray* fPdgNames            -> list of pdg names for tracks
                       TList* fMaterials           -> list of materials
                       TList* fMedia               -> list of tracking media
                   TObjArray* fNodes               -> current branch of nodes
                   TObjArray* fOverlaps            -> list of geometrical overlaps
                     UChar_t* fBits                ! bits used for voxelization
                  TGeoVolume* fCurrentVolume       ! current volume
                  TGeoVolume* fTopVolume           ! top level volume in geometry
                    TGeoNode* fCurrentNode         ! current node
                    TGeoNode* fTopNode             ! top physical node
                    TGeoNode* fLastNode            ! last searched node
                    TGeoNode* fNextNode            ! next node that will be crossed
                  TGeoVolume* fMasterVolume        master volume
                 TGeoHMatrix* fCurrentMatrix       ! current global matrix
                 TGeoHMatrix* fGLMatrix            matrix to be used for view transformations
                   TObjArray* fUniqueVolumes       -> list of unique volumes
                   TGeoShape* fClippingShape       ! clipping shape for raytracing
            TGeoElementTable* fElementTable        ! table of elements
                       Int_t* fNodeIdArray         ! array of node id's
                        Int_t fIntSize             ! int buffer size
                        Int_t fDblSize             ! dbl buffer size
                        Int_t fOverlapSize         ! current size of fOverlapClusters
                        Int_t fOverlapMark         ! current recursive position in fOverlapClusters
                       Int_t* fIntBuffer           ! transient int buffer
                       Int_t* fOverlapClusters     ! internal array for overlaps
                        Int_t fNLevel              maximum accepted level in geometry
                    Double_t* fDblBuffer           ! transient dbl buffer
                     Double_t fLastPoint[3]        ! last point for which safety was computed
                  TGeoVolume* fPaintVolume         ! volume currently painted
                   THashList* fHashVolumes         ! hash list of volumes providing fast search
                   THashList* fHashGVolumes        ! hash list of group volumes providing fast search

## Class Description

     General architecture
     --------------------

       The new ROOT geometry package is a tool designed for building, browsing,
     tracking and visualizing a detector geometry. The code is independent from
     other external MC for simulation, therefore it does not contain any
     constraints related to physics. However, the package defines a number of
     hooks for tracking, such as media, materials, magnetic field or track state flags,
     in order to allow interfacing to tracking MC's. The final goal is to be
     able to use the same geometry for several purposes, such as tracking,
     reconstruction or visualization, taking advantage of the ROOT features
     related to bookkeeping, I/O, histograming, browsing and GUI's.

       The geometrical modeler is the most important component of the package and
     it provides answers to the basic questions like "Where am I ?" or "How far
     from the next boundary ?", but also to more complex ones like "How far from
     the closest surface ?" or "Which is the next crossing along a helix ?".

       The architecture of the modeler is a combination between a GEANT-like
     containment scheme and a normal CSG binary tree at the level of shapes. An
     important common feature of all detector geometry descriptions is the
     mother-daughter concept. This is the most natural approach when tracking
     is concerned and imposes a set of constraints to the way geometry is defined.
     Constructive solid geometry composition is used only in order to create more
     complex shapes from an existing set of primitives through boolean operations.
     This feature is not implemented yet but in future full definition of boolean
     expressions will be supported.

       Practically every geometry defined in GEANT style can be mapped by the modeler.
     The basic components used for building the logical hierarchy of the geometry
     are called "volumes" and "nodes". Volumes (sometimes called "solids") are fully
     defined geometrical objects having a given shape and medium and possibly
     containing a list of nodes. Nodes represent just positioned instances of volumes
     inside a container volume and they are not directly defined by user. They are
     automatically created as a result of adding one volume inside other or dividing
     a volume. The geometrical transformation hold by nodes is always defined with
     respect to their mother (relative positioning). Reflection matrices are allowed.
     All volumes have to be fully aware of their containees when the geometry is
     closed. They will build aditional structures (voxels) in order to fasten-up
     the search algorithms. Finally, nodes can be regarded as bidirectional links
     between containers and containees objects.

       The structure defined in this way is a graph structure since volumes are
     replicable (same volume can become daughter node of several other volumes),
     every volume becoming a branch in this graph. Any volume in the logical graph
     can become the actual top volume at run time (see TGeoManager::SetTopVolume()).
     All functionalities of the modeler will behave in this case as if only the
     corresponding branch starting from this volume is the registered geometry.

/* */

       A given volume can be positioned several times in the geometry. A volume
     can be divided according default or user-defined patterns, creating automatically
     the list of division nodes inside. The elementary volumes created during the
     dividing process follow the same scheme as usual volumes, therefore it is possible
     to position further geometrical structures inside or to divide them further more
     (see TGeoVolume::Divide()).

       The primitive shapes supported by the package are basically the GEANT3
     shapes (see class TGeoShape), arbitrary wedges with eight vertices on two parallel
     planes. All basic primitives inherits from class TGeoBBox since the bounding box
     of a solid is essential for the tracking algorithms. They also implement the
     virtual methods defined in the virtual class TGeoShape (point and segment
     classification). User-defined primitives can be direcly plugged into the modeler
     provided that they override these methods. Composite shapes will be soon supported
     by the modeler. In order to build a TGeoCompositeShape, one will have to define
     first the primitive components. The object that handle boolean
     operations among components is called TGeoBoolCombinator and it has to be
     constructed providing a string boolean expression between the components names.

     Example for building a simple geometry :
    -----------------------------------------

    ______________________________________________________________________________
    void rootgeom()
    {
    //--- Definition of a simple geometry
       gSystem->Load("libGeom");
       TGeoManager *geom = new TGeoManager("simple1", "Simple geometry");

       //--- define some materials
       TGeoMaterial *matVacuum = new TGeoMaterial("Vacuum", 0,0,0);
       TGeoMaterial *matAl = new TGeoMaterial("Al", 26.98,13,2.7);
       //--- define some media
       TGeoMedium *med;
       TGeoMedium *Vacuum = new TGeoMedium(1, matVacuum);
       TGeoMedium *Al = new TGeoMedium(2, matAl);

       //--- define the transformations
       TGeoTranslation *tr1 = new TGeoTranslation(20., 0, 0.);
       TGeoTranslation *tr2 = new TGeoTranslation(10., 0., 0.);
       TGeoTranslation *tr3 = new TGeoTranslation(10., 20., 0.);
       TGeoTranslation *tr4 = new TGeoTranslation(5., 10., 0.);
       TGeoTranslation *tr5 = new TGeoTranslation(20., 0., 0.);
       TGeoTranslation *tr6 = new TGeoTranslation(-5., 0., 0.);
       TGeoTranslation *tr7 = new TGeoTranslation(7.5, 7.5, 0.);
       TGeoRotation   *rot1 = new TGeoRotation("rot1", 90., 0., 90., 270., 0., 0.);
       TGeoCombiTrans *combi1 = new TGeoCombiTrans(7.5, -7.5, 0., rot1);
       TGeoTranslation *tr8 = new TGeoTranslation(7.5, -5., 0.);
       TGeoTranslation *tr9 = new TGeoTranslation(7.5, 20., 0.);
       TGeoTranslation *tr10 = new TGeoTranslation(85., 0., 0.);
       TGeoTranslation *tr11 = new TGeoTranslation(35., 0., 0.);
       TGeoTranslation *tr12 = new TGeoTranslation(-15., 0., 0.);
       TGeoTranslation *tr13 = new TGeoTranslation(-65., 0., 0.);

       TGeoTranslation  *tr14 = new TGeoTranslation(0,0,-100);
       TGeoCombiTrans *combi2 = new TGeoCombiTrans(0,0,100,
                                       new TGeoRotation("rot2",90,180,90,90,180,0));
       TGeoCombiTrans *combi3 = new TGeoCombiTrans(100,0,0,
                                       new TGeoRotation("rot3",90,270,0,0,90,180));
       TGeoCombiTrans *combi4 = new TGeoCombiTrans(-100,0,0,
                                       new TGeoRotation("rot4",90,90,0,0,90,0));
       TGeoCombiTrans *combi5 = new TGeoCombiTrans(0,100,0,
                                       new TGeoRotation("rot5",0,0,90,180,90,270));
       TGeoCombiTrans *combi6 = new TGeoCombiTrans(0,-100,0,
                                       new TGeoRotation("rot6",180,0,90,180,90,90));

       //--- make the top container volume
       Double_t worldx = 110.;
       Double_t worldy = 50.;
       Double_t worldz = 5.;
       TGeoVolume *top = geom->MakeBox("TOP", Vacuum, 270., 270., 120.);
       geom->SetTopVolume(top); // mandatory !
       //--- build other container volumes
       TGeoVolume *replica = geom->MakeBox("REPLICA", Vacuum,120,120,120);
       replica->SetVisibility(kFALSE);
       TGeoVolume *rootbox = geom->MakeBox("ROOT", Vacuum, 110., 50., 5.);
       rootbox->SetVisibility(kFALSE); // this will hold word 'ROOT'

       //--- make letter 'R'
       TGeoVolume *R = geom->MakeBox("R", Vacuum, 25., 25., 5.);