class description - source file - inheritance tree

class TGeoVolumeMulti : public TGeoVolume

TGeoVolumeMulti TGeoVolumeMulti() TGeoVolumeMulti TGeoVolumeMulti(const char* name, const TGeoMedium* med = 0) TGeoVolumeMulti TGeoVolumeMulti(const TGeoVolumeMulti&) virtual void ~TGeoVolumeMulti() virtual void AddNode(const TGeoVolume* vol, Int_t copy_no, const TGeoMatrix* mat, Option_t* option) virtual void AddNodeOverlap(const TGeoVolume* vol, Int_t copy_no, const TGeoMatrix* mat, Option_t* option) void AddVolume(TGeoVolume* vol) static TClass* Class() virtual TGeoVolume* Divide(const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed = 0, Option_t* option) Int_t GetAxis() const TGeoShape* GetLastShape() const Int_t GetNdiv() const Int_t GetNvolumes() const Double_t GetStart() const Double_t GetStep() const TGeoVolume* GetVolume(Int_t id) const virtual TClass* IsA() const virtual void SetLineColor(Color_t lcolor) virtual void SetLineStyle(Style_t lstyle) virtual void SetLineWidth(Width_t lwidth) virtual void SetMedium(const TGeoMedium* medium) virtual void SetVisibility(Bool_t vis = kTRUE) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

TObjArray* fVolumes list of volumes TGeoVolumeMulti* fDivision division of this volume Int_t fNumed medium number for divisions Int_t fNdiv number of divisions Int_t fAxis axis of division Double_t fStart division start offset Double_t fStep division step Bool_t fAttSet flag attributes set

Class Description

   TGeoVolume - class containing the full description of a geometrical object.

   A volume is a geometrical container possibly including other objects inside.
 The volume does not store any information about his own position/transformation
 nor any link to the upper level in the geometry tree. Therefore, the same
 volume can be referenced several times in the geometry.

   Positioned volumes are called nodes (see class TGeoNode) and can be placed
 only inside other volume. In order to define a correct geometry, nodes should
 not extend beyond the boundaries of their mother volume and must not overlap
 between each other. These conditions can become critical when tracking a
 geometry, so the package is provided with a simple but efficient checking
 tool (class TGeoChecker). Note that the nodes representing the daughters of
 a volume does NOT overlap with their mother - any point belonging to the
 daughter will automatically NOT belong to the mother any more. The geometry
 tree built in this fashion is a CSG tree with constraints.



   A volume is referencing a shape and a medium. These have to built BEFORE the
 volume itself - see TGeoMaterial::TGeoMaterial() , TGeoShape::TGeoShape() .
 Volumes must have unique names and any positioned volume (node) will append a
 copy number to the volume's name. For instance if a volume named PAD is
 referenced in several nodes, their names will become : PAD_1, PAD_2, ...

   A volume can be created with the sequence :

        TGeoSphere   *sph = new TGeoSphere("sph1", 10.0, 11.0);
        TGeoMedium   *med = gGeoManager->GetMedium("lead");
        TGeoVolume   *vol = new TGeoVolume("shield", sph, med);

   The volume is registering itself to the current TGeoManager and can be
 retrieved at any time with :

        TGeoVolume *vol = gGeoManager->GetVolume("shield");

 Deletion of volumes is also handled by TGeoManager class.
   Positioning of other geometry nodes inside a volume is done by :
        TGeoVolume::AddNode() method. The node to be placed does not have to
 be created before :

        TGeoVolume      *vol_in = ...;
        TGeoTranslation *tr     = new TGeoTranslation(x, y, z);
        TGeoNodeMatrix  *node   = vol->AddNodeMatrix (vol_in, tr, copy_number);

   A volume can be divided according a pattern. The most simple division can
 be done along an axis, in cartesian, cylindrical or spherical coordinates.
 For each division type there are corresponding TGeoVolume::AddNodeOffset() and
 TGeoVolume::Divide() methods. The option argument passed tothese methods can
 be :

        X, Y, Z - for cartesian axis divisions;
        CylR, CylPhi - for cylindrical divisions;
        SphR, SphPhi, SphTheta - for spherical divisions;
        honeycomb - for honeycomb structures

 For instance, dividing a volume in N segments along X axis, starting from Xmin
 up to Xmax can be done with :
        TGeoVolume::Divide(N, Xmin, Xmax, "X");

   The GEANT3 option MANY is supported by TGeoVolumeOverlap class. An overlapping
 volume is in fact a virtual container that does not represent a physical object.
 It contains a list of nodes that are not his daughters but that must be checked
 always before the container itself. This list must be defined by users and it
 is checked and resolved in a priority order. Note that the feature is non-standard
 to geometrical modelers and it was introduced just to support conversions of
 GEANT3 geometries, therefore its extensive usage should be avoided.

   The following picture represent how a simple geometry tree is built in



 dummy constructor

TGeoVolumeMulti(const char *name, const TGeoMedium *med)
 default constructor


void AddVolume(TGeoVolume *vol)
 Add a volume with valid shape to the list of volumes. Copy all existing nodes
 to this volume

void AddNode(const TGeoVolume *vol, Int_t copy_no, const TGeoMatrix *mat, Option_t *option)
 Add a new node to the list of nodes. This is the usual method for adding
 daughters inside the container volume.

void AddNodeOverlap(const TGeoVolume *vol, Int_t copy_no, const TGeoMatrix *mat, Option_t *option)

TGeoVolume* Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed, const char *option)
 division of multiple volumes

void SetLineColor(Color_t lcolor)

void SetLineStyle(Style_t lstyle)

void SetLineWidth(Width_t lwidth)

void SetMedium(const TGeoMedium *med)
 Set medium for a multiple volume.

void SetVisibility(Bool_t vis)

Inline Functions

            TGeoVolume* GetVolume(Int_t id) const
             TGeoShape* GetLastShape() const
                  Int_t GetNvolumes() const
                  Int_t GetAxis() const
                  Int_t GetNdiv() const
               Double_t GetStart() const
               Double_t GetStep() const
                TClass* Class()
                TClass* IsA() const
                   void ShowMembers(TMemberInspector& insp, char* parent)
                   void Streamer(TBuffer& b)
                   void StreamerNVirtual(TBuffer& b)
        TGeoVolumeMulti TGeoVolumeMulti(const TGeoVolumeMulti&)

Author: Andrei Gheata 30/05/02
Last update: root/geom:$Name: $:$Id: TGeoVolume.cxx,v 1.28 2003/02/17 11:57:31 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *

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.