TGeometry
class description - source file - inheritance tree
public:
TGeometry TGeometry()
TGeometry TGeometry(Text_t* name, Text_t* title)
TGeometry TGeometry(TGeometry&)
virtual void ~TGeometry()
virtual void Browse(TBrowser* b)
virtual void cd(Text_t* path = 0)
TClass* Class()
virtual void Draw(Option_t* option)
Float_t GetBomb()
TNode* GetCurrentNode()
THashList* GetListOfMaterials()
THashList* GetListOfMatrices()
TList* GetListOfNodes()
THashList* GetListOfShapes()
TMaterial* GetMaterial(Text_t* name)
TMaterial* GetMaterialByNumber(Int_t number)
TNode* GetNode(Text_t* name)
TRotMatrix* GetRotMatrix(Text_t* name)
TRotMatrix* GetRotMatrixByNumber(Int_t number)
TShape* GetShape(Text_t* name)
TShape* GetShapeByNumber(Int_t number)
virtual TClass* IsA()
virtual Bool_t IsFolder()
virtual void ls(Option_t* option = rsn2)
virtual void Node(Text_t* name, Text_t* title, Text_t* shapename, Double_t x = 0, Double_t y = 0, Double_t z = 0, Text_t* matrixname, Option_t* option)
virtual void RecursiveRemove(TObject* obj)
virtual void SetBomb(Float_t bomb = 1.4)
virtual void SetCurrentNode(TNode* node)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
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
*-*-*-*-*-*-*-*-*-*-*-* 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*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ==================
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 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*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* =========================================
Inline Functions
Float_t GetBomb()
THashList* GetListOfShapes()
TList* GetListOfNodes()
THashList* GetListOfMaterials()
THashList* GetListOfMatrices()
TNode* GetCurrentNode()
Bool_t IsFolder()
void SetBomb(Float_t bomb = 1.4)
void SetCurrentNode(TNode* node)
TClass* Class()
TClass* IsA()
void ShowMembers(TMemberInspector& insp, char* parent)
TGeometry TGeometry(TGeometry&)
Author: Rene Brun 22/09/95
Last update: 2.00/11 09/08/98 10.30.13 by Rene Brun
Copyright (c) 1995-1998, 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.