TGeoVolumeMulti


class description - source file - inheritance tree

class TGeoVolumeMulti : public TGeoVolume


    public:
TGeoVolumeMulti TGeoVolumeMulti() TGeoVolumeMulti TGeoVolumeMulti(const char* name, TGeoMaterial* mat = 0) TGeoVolumeMulti TGeoVolumeMulti(const TGeoVolumeMulti&) virtual void ~TGeoVolumeMulti() virtual void AddNode(TGeoVolume* vol, Int_t copy_no, TGeoMatrix* mat, Option_t* option) virtual void AddNodeOverlap(TGeoVolume* vol, Int_t copy_no, TGeoMatrix* mat, Option_t* option) void AddVolume(TGeoVolume* vol) static TClass* Class() virtual TGeoVolume* Divide(const char* divname, Int_t ndiv, Option_t* option) virtual TGeoVolume* Divide(const char* divname, Int_t ndiv, Double_t start, Double_t step, Option_t* option) virtual TGeoVolume* Divide(const char* divname, Double_t start, Double_t end, Double_t step, Option_t* option) virtual TGeoVolume* Divide(const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step) virtual TGeoVolume* Divide(const char* divname, Int_t iaxis, Double_t step) virtual TGeoVolume* Divide(const char* divname, TObject* userdiv, Double_t* params, Option_t* option) TGeoShape* GetLastShape() 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 SetVisibility(Bool_t vis = kTRUE) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TObjArray* fVolumes list of volumes 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 material. 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);
        TGeoMaterial *mat = gGeoManager->GetMaterial("lead");
        TGeoVolume   *vol = new TGeoVolume("shield", sph, mat);

   The volume is registering itself to the current TGeoManager and can be
 retreived 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
 memory.

/*

*/


TGeoVolumeMulti()
 dummy constructor

TGeoVolumeMulti(const char *name, TGeoMaterial *mat)
 default constructor

~TGeoVolumeMulti()
 Destructor

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

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

TGeoVolume* Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
 division a la G3

void SetLineColor(Color_t lcolor)

void SetLineStyle(Style_t lstyle)

void SetLineWidth(Width_t lwidth)

void SetVisibility(Bool_t vis)



Inline Functions


                   void AddVolume(TGeoVolume* vol)
            TGeoVolume* GetVolume(Int_t id) const
            TGeoVolume* Divide(const char* divname, Int_t ndiv, Double_t start, Double_t step, Option_t* option)
            TGeoVolume* Divide(const char* divname, Double_t start, Double_t end, Double_t step, Option_t* option)
            TGeoVolume* Divide(const char* divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step)
            TGeoVolume* Divide(const char* divname, Int_t iaxis, Double_t step)
            TGeoVolume* Divide(const char* divname, TObject* userdiv, Double_t* params, Option_t* option)
             TGeoShape* GetLastShape() 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.6 2002/09/27 16:16:06 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.