library: libTable #include "TVolumePosition.h"

# TVolumePosition

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

## class TVolumePosition : public TObject

| Inheritance Chart:

`TObject`

<-

`TVolumePosition`

        protected:

          void DeleteOwnMatrix()

        public:

                                   TVolumePosition(TVolume* node = 0, Double_t x = 0, Double_t y = 0, Double_t z = 0, TRotMatrix* matrix = 0)
                                   TVolumePosition(TVolume* node, Double_t x, Double_t y, Double_t z, const Text_t* matrixname)
                                   TVolumePosition(const TVolumePosition* oldPosition, const TVolumePosition* curPosition)
                                   TVolumePosition(const TVolumePosition& pos)
                           virtual ~TVolumePosition()
                      virtual void Browse(TBrowser* b)
                    static TClass* Class()
                 virtual Double_t* Cormx2Local(const Double_t* masterCorr, Double_t* localCorr) const
                  virtual Float_t* Cormx2Local(const Float_t* masterCorr, Float_t* localCorr) const
                 virtual Double_t* Cormx2Master(const Double_t* localCorr, Double_t* masterCorr) const
                  virtual Float_t* Cormx2Master(const Float_t* localCorr, Float_t* masterCorr) const
                 virtual TDataSet* DefineSet()
                     virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
                      virtual void Draw(Option_t* depth = "3")
                  virtual Float_t* Errmx2Local(const Float_t* masterError, Float_t* localError) const
                 virtual Double_t* Errmx2Local(const Double_t* masterError, Double_t* localError) const
                  virtual Float_t* Errmx2Master(const Float_t* localError, Float_t* masterError) const
                 virtual Double_t* Errmx2Master(const Double_t* localError, Double_t* masterError) const
                      virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
                    virtual UInt_t GetId() const
                 const TRotMatrix* GetMatrix() const
                       TRotMatrix* GetMatrix()
             virtual const Char_t* GetName() const
                  virtual TVolume* GetNode() const
                   virtual Text_t* GetObjectInfo(Int_t px, Int_t py) const
                 virtual Option_t* GetOption() const
                             Int_t GetVisibility() const
                  virtual Double_t GetX(Int_t indx = 0) const
           virtual const Double_t* GetXYZ() const
                  virtual Double_t GetY() const
                  virtual Double_t GetZ() const
                    virtual Bool_t Is3D() const
                   virtual TClass* IsA() const
                    virtual Bool_t IsFolder() const
                            Bool_t IsMatrixOwner() const
                 virtual Double_t* Local2Master(const Double_t* local, Double_t* master, Int_t nPoints = 1) const
                  virtual Float_t* Local2Master(const Float_t* local, Float_t* master, Int_t nPoints = 1) const
                 virtual Double_t* Master2Local(const Double_t* master, Double_t* local, Int_t nPoints = 1) const
                  virtual Float_t* Master2Local(const Float_t* master, Float_t* local, Int_t nPoints = 1) const
          virtual TVolumePosition& Mult(const TVolumePosition& position)
                  TVolumePosition& operator=(const TVolumePosition& rhs)
                      virtual void Paint(Option_t* option = "")
                      virtual void Print(Option_t* option = "") const
          virtual TVolumePosition* Reset(TVolume* node = 0, Double_t x = 0, Double_t y = 0, Double_t z = 0, TRotMatrix* matrix = 0)
                      virtual void SavePrimitive(ofstream& out, Option_t* option)
                      virtual void SetId(UInt_t id)
                      virtual void SetLineAttributes()
                      virtual void SetMatrix(TRotMatrix* matrix = 0)
                            Bool_t SetMatrixOwner(Bool_t ownerShips = kTRUE)
                      virtual void SetNode(TVolume* node)
                      virtual void SetPosition(Double_t x = 0, Double_t y = 0, Double_t z = 0)
                      virtual void SetVisibility(Int_t vis = 1)
                      virtual void SetX(Double_t x)
                      virtual void SetXYZ(Double_t* xyz = 0)
                      virtual void SetY(Double_t y)
                      virtual void SetZ(Double_t z)
                      virtual void ShowMembers(TMemberInspector& insp, char* parent)
                      virtual void Streamer(TBuffer& b)
                              void StreamerNVirtual(TBuffer& b)
                      virtual void UpdatePosition(Option_t* option = "")

### Data Members

        protected:

             Double_t fX[3]    X offset with respect to parent object
          TRotMatrix* fMatrix  Pointer to rotation matrix
             TVolume* fNode    Refs pointer to the node defined
               UInt_t fId      Unique ID of this position

        public:

          static const TVolumePosition::EPositionBits kIsOwn

## Class Description

    *-*-*-*-*-*-*-*-* S T N O D E P O S I T I O N   description *-*-*-*-*-*-*-*-*-
    *-*               ===========================
    *-*
    *-*    A TVolumePosition object is used to build the geometry hierarchy (see TGeometry).
    *-*    A node may contain other nodes.
    *-*
    *-*    A geometry node has attributes:
    *-*      - name and title
    *-*      - pointer to the referenced shape (see TShape).
    *-*      - x,y,z offset with respect to the mother node.
    *-*      - pointer to the rotation matrix (see TRotMatrix).
    *-*
    *-*    A node can be drawn.
    *-*
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TVolumePosition(TVolume *node,Double_t x, Double_t y, Double_t z, const Text_t *matrixname) : fMatrix(0),fNode(node),fId(0)

    *-*-*-*-*-*-*-*-*-*-*Node normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
    *-*                  ======================
    *-*
    *-*    name    is the name of the node
    *-*    title   is title
    *-*    x,y,z   are the offsets of the volume with respect to his mother
    *-*    matrixname  is the name of the rotation matrix
    *-*
    *-*    This new node is added into the list of sons of the current node
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TVolumePosition(TVolume *node,Double_t x, Double_t y, Double_t z, TRotMatrix *matrix) : fMatrix(matrix),fNode(node),fId(0)

    *-*-*-*-*-*-*-*-*-*-*Node normal constructor*-*-*-*-*-*-*-*-*-*-*
    *-*                  ================================
    *-*
    *-*    name    is the name of the node
    *-*    title   is title
    *-*    x,y,z   are the offsets of the volume with respect to his mother
    *-*    matrix  is the pointer to the rotation matrix
    *-*
    *-*    This new node is added into the list of sons of the current node
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

TVolumePosition(const TVolumePosition* oldPosition, const TVolumePosition* curPosition)

     Pick the "old" position by pieces

TVolumePosition(const TVolumePosition&pos): TObject() , fMatrix(((TVolumePosition &)pos).GetMatrix()),fNode(pos.GetNode()),fId(pos.GetId())

~TVolumePosition()

void Browse(TBrowser *b)

Int_t DistancetoPrimitive(Int_t, Int_t)

    *-*-*-*-*-*-*-*-*-*-*Compute distance from point px,py to a Node*-*-*-*-*-*
    *-*                  ===========================================
    *-*  Compute the closest distance of approach from point px,py to this node.
    *-*  The distance is computed in pixels units.
    *-*
    *-*
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void Draw(Option_t *option)

    *-*-*-*-*-*-*-*-*-*-*-*Draw Referenced node with current parameters*-*-*-*
    *-*                   =============================================

void ExecuteEvent(Int_t, Int_t, Int_t)

    *-*-*-*-*-*-*-*-*-*-*Execute action corresponding to one event*-*-*-*
    *-*                  =========================================
    *-*  This member function must be implemented to realize the action
    *-*  corresponding to the mouse click on the object in the window
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Text_t* GetObjectInfo(Int_t, Int_t) const

Double_t* Errmx2Master(const Double_t *localError, Double_t *masterError) const

Float_t* Errmx2Master(const Float_t *localError, Float_t *masterError) const

Double_t* Cormx2Master(const Double_t *localCorr, Double_t *masterCorr)const

Float_t* Cormx2Master(const Float_t *localCorr, Float_t *masterCorr) const

Double_t* Errmx2Local(const Double_t *masterError, Double_t *localError) const

Float_t* Errmx2Local(const Float_t *masterError, Float_t *localError) const

Double_t* Cormx2Local(const Double_t *localCorr, Double_t *masterCorr) const

Float_t* Cormx2Local(const Float_t *localCorr, Float_t *masterCorr) const

Double_t* Local2Master(const Double_t *local, Double_t *master, Int_t nPoints) const

    *-*-*-*-*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 TVolumePosition::UpdateMatrix should be called before.

Float_t* Local2Master(const Float_t *local, Float_t *master, Int_t nPoints) const

    *-*-*-*Convert nPoints points 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 TVolumePosition::UpdateMatrix should be called before.

Double_t* Master2Local(const Double_t *master, Double_t *local, Int_t nPoints) const

    *-*-*-*-*Convert one point from master system to local 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 TVolumePosition::UpdateMatrix should be called before.

Float_t* Master2Local(const Float_t *master, Float_t *local, Int_t nPoints) const

    *-*-*-*Convert nPoints points from master system to local 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 TVolumePosition::UpdateMatrix should be called before.

void Paint(Option_t *)

    *-*-*-*-*-*-*-*-*-*-*-*Paint Referenced node with current parameters*-*-*-*
    *-*                   ==============================================
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void Print(Option_t *) const

TVolumePosition* Reset(TVolume *node,Double_t x, Double_t y, Double_t z, TRotMatrix *matrix)

    *-*-*-*-*-*-*-*-*-*-*-*-*-*-* Reset this position *-*-*-*-*-*-*-*-*-*-*
    *-*                           ===================
    *-*    x,y,z   are the offsets of the volume with respect to his mother
    *-*    matrix  is the pointer to the rotation matrix
    *-*
    *-*    This method is to re-use the memory this object without delete/create steps
    *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void SavePrimitive(ofstream &, Option_t *)

void SetLineAttributes()

void SetMatrix(TRotMatrix *matrix)

void UpdatePosition(Option_t *)

void SetVisibility(Int_t vis)

TVolumePosition& Mult(const TVolumePosition &curPosition)

void SetXYZ(Double_t *xyz)

void Streamer(TBuffer &R__b)

     Stream an object of class TVolumePosition.

### Inline Functions

                         void DeleteOwnMatrix()
                    TDataSet* DefineSet()
                     TVolume* GetNode() const
                    Option_t* GetOption() const
                const Char_t* GetName() const
            const TRotMatrix* GetMatrix() const
                  TRotMatrix* GetMatrix()
                        Int_t GetVisibility() const
                     Double_t GetX(Int_t indx = 0) const
              const Double_t* GetXYZ() const
                     Double_t GetY() const
                     Double_t GetZ() const
                       UInt_t GetId() const
                       Bool_t IsMatrixOwner() const
                       Bool_t SetMatrixOwner(Bool_t ownerShips = kTRUE)
                       Bool_t IsFolder() const
                       Bool_t Is3D() const
                         void SetNode(TVolume* node)
                         void SetPosition(Double_t x = 0, Double_t y = 0, Double_t z = 0)
                         void SetX(Double_t x)
                         void SetY(Double_t y)
                         void SetZ(Double_t z)
                         void SetId(UInt_t id)
             TVolumePosition& operator=(const TVolumePosition& rhs)
                      TClass* Class()
                      TClass* IsA() const
                         void ShowMembers(TMemberInspector& insp, char* parent)
                         void StreamerNVirtual(TBuffer& b)

Author: Valery Fine(fine@bnl.gov) 25/12/98
Last update: root/star:$Name: $:$Id: TVolumePosition.cxx,v 1.5 2003/07/17 06:19:14 brun Exp $