TGeometry


class description - source file - inheritance tree

class TGeometry : public TNamed


    public:
TGeometry TGeometry() TGeometry TGeometry(const Text_t* name, const Text_t* title) TGeometry TGeometry(TGeometry&) virtual void ~TGeometry() virtual void Browse(TBrowser* b) virtual void cd(const Text_t* path = 0) TClass* Class() virtual void Draw(Option_t* option) Int_t GeomLevel() const TObjArray* Get(const char* name) Float_t GetBomb() const TRotMatrix* GetCurrentMatrix() const TNode* GetCurrentNode() const TRotMatrix* GetCurrentPosition(Float_t* x, Float_t* y, Float_t* z) const TRotMatrix* GetCurrentPosition(Double_t* x, Double_t* y, Double_t* z) const Bool_t GetCurrentReflection() const THashList* GetListOfMaterials() const THashList* GetListOfMatrices() const TList* GetListOfNodes() const THashList* GetListOfShapes() const TMaterial* GetMaterial(const Text_t* name) TMaterial* GetMaterialByNumber(Int_t number) TNode* GetNode(const Text_t* name) TRotMatrix* GetRotMatrix(const Text_t* name) TRotMatrix* GetRotMatrixByNumber(Int_t number) TShape* GetShape(const Text_t* name) TShape* GetShapeByNumber(Int_t number) virtual TClass* IsA() const virtual Bool_t IsFolder() virtual void Local2Master(Float_t* local, Float_t* master) virtual void Local2Master(Double_t* local, Double_t* master) virtual void ls(Option_t* option = rsn2) virtual void Node(const Text_t* name, const Text_t* title, const Text_t* shapename, Double_t x = 0, Double_t y = 0, Double_t z = 0, const Text_t* matrixname, Option_t* option) virtual Int_t PopLevel() virtual Int_t PushLevel() virtual void RecursiveRemove(TObject* obj) virtual void SetBomb(Float_t bomb = 1.4) virtual void SetCurrentNode(TNode* node) virtual void SetGeomLevel(Int_t level = 0) virtual void SetMatrix(TRotMatrix* matrix = 0) virtual void SetPosition(Double_t x, Double_t y, Double_t z) virtual void SetPosition(TRotMatrix* matrix, Double_t x = 0, Double_t y = 0, Double_t z = 0) virtual void SetPosition(Float_t x, Float_t y, Float_t z) virtual void SetPosition(TRotMatrix* matrix, Float_t x, Float_t y, Float_t z) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) virtual void UpdateMatrix(TNode* node) void UpdateTempMatrix(Double_t* dx1, Double_t* rmat1, Double_t x, Double_t y, Double_t z, Double_t* matrix, Double_t* dxnew, Double_t* rmatnew) virtual void UpdateTempMatrix(Double_t x, Double_t y, Double_t z, Double_t* matrix, Bool_t isReflection = kFALSE) virtual void UpdateTempMatrix(Double_t x = 0, Double_t y = 0, Double_t z = 0, TRotMatrix* matrix = 0)

Data Members

private:
THashList* fMaterials Collection of materials THashList* fMatrices Collection of rotation matrices THashList* fShapes Collection of shapes TList* fNodes Collection of nodes TNode* fCurrentNode Pointer to current node TMaterial** fMaterialPointer Pointers to materials TRotMatrix** fMatrixPointer Pointers to rotation matrices TShape** fShapePointer Pointers to shapes Float_t fBomb Bomb factor for exploded geometry TRotMatrix* fMatrix ! Pointers to current rotation matrices Double_t fX ! Double_t fY ! The global translation of the current node Double_t fZ ! Double_t fTranslation[20][3] ! Double_t fRotMatrix[20][9] ! Bool_t fIsReflection[20] ! Int_t fGeomLevel !

Class Description

*-*-*-*-*-*-*-*-*-*-*-* T G E O M E T R Y  description *-*-*-*-*-*-*-*-*-*-*
*-*                    ===============================
*-*
*-*    The Geometry class describes the geometry of a detector.
*-*    The current implementation supports the GEANT3 style description.
*-*    A special program provided in the ROOT utilities (toroot) can be used
*-*    to automatically translate a GEANT detector geometry into a ROOT geometry.
*-*
*-*   a Geometry object is entered into the list of geometries into the
*-*     ROOT main object (see TROOT description) when the TGeometry
*-*     constructor is invoked.
*-*   Several geometries may coexist in memory.
*-*
*-*   A Geometry object consist of the following linked lists:
*-*        - the TMaterial list (material definition only).
*-*        - the TRotmatrix list (Rotation matrices definition only).
*-*        - the TShape list (volume definition only).
*-*        - the TNode list assembling all detector elements.
*-*
*-*   Only the Build and Draw functions for a geometry are currently supported.
*-*
*-*---------------------------------------------------------------------------
*-*- The conversion program from Geant to Root has been added in the list
*-*  of utilities in utils directory.(see g2root)
*-*  The executable module of g2root can be found in $ROOTSYS/bin/g2root.
*-*
*-*  To use this conversion program, type the shell command:
*-*        g2root  geant_rzfile macro_name
*-*
*-*  for example
*-*        g2root na49.geom na49.C
*-*  will convert the GEANT RZ file na49.geom into a ROOT macro na49.C
*-*
*-*  To generate the Geometry structure within Root, do:
*-*    Root > .x na49.C
*-*    Root > na49.Draw()
*-*    Root > wh.x3d()    (this invokes the 3-d Root viewver)
*-*    Root > TFile gna49("na49.root","NEW")  //open a new root file
*-*    Root > na49.Write()                    //Write the na49 geometry structure
*-*    Root > gna49.Write()                   //Write all keys (in this case only one)
*-*  Note: all keys are also written on closing of the file, gna49.Close or
*-*  when the program exits, Root closes all open files correctly.
*-*  Once this file has been written, in a subsequent session, simply do:
*-*    Root > TFile gna49("na49.root")
*-*    Root > na49.Draw()
*-*
*-*  The figure below shows the geometry above using the x3d viewer.
*-*  This x3d viewver is invoked by selecting "View x3d" in the View menu
*-*  of a canvas (See example of this tool bar in TCanvas).

/*

*/

*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TGeometry()
*-*-*-*-*-*-*-*-*-*-*-*-*Geometry default constructor*-*-*-*-*-*-*-*-*-*-*-*

TGeometry(const Text_t *name,const Text_t *title ) : TNamed (name, title)
*-*-*-*-*-*-*-*-*-*-*-*-*Geometry normal constructor*-*-*-*-*-*-*-*-*-*-*-*
*-*                      ===========================

~TGeometry()
*-*-*-*-*-*-*-*-*-*-*-*-*Geometry default destructor*-*-*-*-*-*-*-*-*-*-*-*
*-*                      ========================

void Browse(TBrowser *b)

void cd(const Text_t *)
*-*-*-*-*-*Change Current Geometry to this*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*        ===============================

void Draw(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*-*-*Draw this Geometry*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                      ==================

TObjArray* Get(const Text_t *name)
 Static function called by TROOT to search name in the geometry.
 Returns a TObjArray containing a pointer to the found object
 and a pointer to the container where the object was found.


TMaterial* GetMaterial(const Text_t *name)
*-*-*-*-*-*-*-*-*Return pointer to Material with name*-*-*-*-*-*-*-*-*
*-*              ====================================

TMaterial* GetMaterialByNumber(Int_t number)
*-*-*-*-*-*-*-*-*Return pointer to Material with number*-*-*-*-*-*-*-*-*
*-*              ======================================

TNode* GetNode(const Text_t *name)
*-*-*-*-*-*-*Return pointer to node with name in the geometry tree*-*-*-*-*
*-*          =====================================================

TRotMatrix* GetRotMatrix(const Text_t *name)
*-*-*-*-*-*-*-*-*Return pointer to RotMatrix with name*-*-*-*-*-*-*-*-*-*
*-*              =====================================

TRotMatrix* GetRotMatrixByNumber(Int_t number)
*-*-*-*-*-*-*-*-*Return pointer to RotMatrix with number*-*-*-*-*-*-*-*-*-*
*-*              =======================================

TShape* GetShape(const Text_t *name)
*-*-*-*-*-*-*-*-*Return pointer to Shape with name*-*-*-*-*-*-*-*-*-*
*-*              =================================

TShape* GetShapeByNumber(Int_t number)
*-*-*-*-*-*-*-*-*Return pointer to Shape with number*-*-*-*-*-*-*-*-*-*
*-*              ===================================

void Local2Master(Double_t *local, Double_t *master)
*-*-*-*-*Convert one point from local system to master reference system*-*-*
*-*      ==============================================================

  Note that before invoking this function, the global rotation matrix
  and translation vector for this node must have been computed.
  This is automatically done by the Paint functions.
  Otherwise TNode::UpdateMatrix should be called before.

void Local2Master(Float_t *local, Float_t *master)
*-*-*-*-*Convert one point from local system to master reference system*-*-*
*-*      ==============================================================

  Note that before invoking this function, the global rotation matrix
  and translation vector for this node must have been computed.
  This is automatically done by the Paint functions.
  Otherwise TNode::UpdateMatrix should be called before.

void ls(Option_t *option)
*-*-*-*-*-*-*-*-*-*-*-*List this geometry*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                   ===================

void Node(const Text_t *name, const Text_t *title, const Text_t *shapename, Double_t x, Double_t y, Double_t z, const Text_t *matrixname, Option_t *option)
*-*-*-*-*-*-*-*Add a node to the current node in this geometry*-*-*-*-*-*-*
*-*            ===============================================

void RecursiveRemove(TObject *obj)
*-*-*-*-*-*-*-*Recursively remove object from a Geometry list*-*-*-*-*-*-*-*
*-*            =========================================

void Streamer(TBuffer &b)
*-*-*-*-*-*-*-*-*Stream a class object*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*              =========================================

void UpdateMatrix(TNode *node)
    Update global rotation matrix/translation vector for this node
   this function must be called before invoking Local2Master

void UpdateTempMatrix(Double_t x, Double_t y, Double_t z, TRotMatrix *rotMatrix)

void UpdateTempMatrix(Double_t x, Double_t y, Double_t z, Double_t *matrix,Bool_t isReflection)

void UpdateTempMatrix(Double_t *dx,Double_t *rmat , Double_t x, Double_t y, Double_t z, Double_t *matrix , Double_t *dxnew, Double_t *rmatnew)
*-*-*-*-*-*-*Compute new translation vector and global matrix*-*-*-*-*-*-*-*
*-*          ================================================
*-*
*-*  dx      old translation vector
*-*  rmat    old global matrix
*-*  x,y,z   offset of new local system with respect to mother
*-*  dxnew   new translation vector
*-*  rmatnew new global rotation matrix
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-



Inline Functions


            Float_t GetBomb() const
              Int_t GeomLevel() const
         THashList* GetListOfShapes() const
             TList* GetListOfNodes() const
         THashList* GetListOfMaterials() const
         THashList* GetListOfMatrices() const
             TNode* GetCurrentNode() const
        TRotMatrix* GetCurrentMatrix() const
        TRotMatrix* GetCurrentPosition(Double_t* x, Double_t* y, Double_t* z) const
        TRotMatrix* GetCurrentPosition(Float_t* x, Float_t* y, Float_t* z) const
             Bool_t GetCurrentReflection() const
             Bool_t IsFolder()
              Int_t PushLevel()
              Int_t PopLevel()
               void SetBomb(Float_t bomb = 1.4)
               void SetCurrentNode(TNode* node)
               void SetGeomLevel(Int_t level = 0)
               void SetMatrix(TRotMatrix* matrix = 0)
               void SetPosition(TRotMatrix* matrix, Double_t x = 0, Double_t y = 0, Double_t z = 0)
               void SetPosition(TRotMatrix* matrix, Float_t x, Float_t y, Float_t z)
               void SetPosition(Double_t x, Double_t y, Double_t z)
               void SetPosition(Float_t x, Float_t y, Float_t z)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
          TGeometry TGeometry(TGeometry&)


Author: Rene Brun 22/09/95
Last update: 2.23/02 06/09/99 16.55.10 by Fons Rademakers
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *


ROOT page - Class index - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.