TRotMatrix


class description - source file - inheritance tree

class TRotMatrix : public TNamed

    private:
virtual void SetReflection() protected:
public:
TRotMatrix TRotMatrix() TRotMatrix TRotMatrix(const char* name, const char* title, Double_t* matrix) TRotMatrix TRotMatrix(const char* name, const char* title, Double_t theta, Double_t phi, Double_t psi) TRotMatrix TRotMatrix(const char* name, const char* title, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3) TRotMatrix TRotMatrix(TRotMatrix&) virtual void ~TRotMatrix() static TClass* Class() virtual Double_t Determinant() const virtual Double_t* GetGLMatrix(Double_t* rGLMatrix) const virtual Double_t* GetMatrix() virtual Int_t GetNumber() const virtual Double_t GetPhi() const virtual Double_t GetPsi() const virtual Double_t GetTheta() const virtual Int_t GetType() const virtual TClass* IsA() const virtual Bool_t IsReflection() const virtual const Double_t* SetAngles(Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2, Double_t theta3, Double_t phi3) const virtual void SetMatrix(const Double_t* matrix) virtual void SetName(const char* name) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

protected:
Int_t fNumber Rotation matrix number Int_t fType Type of matrix (0=identity, 1=reflexion, 2=otherwise) Double_t fTheta theta angle Double_t fPhi phi angle Double_t fPsi psi angle Double_t fMatrix[9] Rotation matrix public:

Class Description

 Manages a detector rotation matrix. See class TGeometry.


TRotMatrix()
*-*-*-*-*-*-*-*-*-*-*RotMatrix default constructor*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ============================

TRotMatrix(const char *name, const char *title, Double_t *matrix) :TNamed(name,title)

TRotMatrix(const char *name, const char *title, Double_t theta, Double_t phi, Double_t psi) :TNamed(name,title)
*-*-*-*-*-*-*-*-*-*-*RotMatrix normal constructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ============================

TRotMatrix(const char *name, const char *title, Double_t theta1, Double_t phi1 , Double_t theta2, Double_t phi2 , Double_t theta3, Double_t phi3) :TNamed(name,title)
*-*-*-*-*-*RotMatrix normal constructor defined a la GEANT*-*-*-*-*-*-*
*-*        ===============================================

 The TRotMatrix constructor with six angles uses the GEANT convention:

 theta1 is the polar angle of the x-prim axis in the main reference system
 (MRS), theta2 and theta3 have the same meaning for the y-prim and z-prim
 axis.

 Phi1 is the azimuthal angle of the x-prim in the MRS and phi2 and phi3
 have the same meaning for y-prim and z-prim.


 for example, the unit matrix is defined in the following way.

     x-prim || x, y-prim || y, z-prim || z

     means:  theta1=90, theta2=90, theta3=0, phi1=0, phi2=90, phi3=0

~TRotMatrix()
*-*-*-*-*-*-*-*-*-*-*RotMatrix default destructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-*                  ============================

Double_t Determinant() const
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*
*-*  Determinant() returns the value of the determiant of this matrix
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Double_t* GetGLMatrix(Double_t *rGLMatrix) const
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*  Convert this matrix to the OpenGL [4x4]
*-*
*-*  [  fMatrix[0]   fMatrix[1]   fMatrix[2]    0  ]
*-*  [  fMatrix[3]   fMatrix[4]   fMatrix[5]    0  ]
*-*  [  fMatrix[6]   fMatrix[7]   fMatrix[8]    0  ]
*-*  [     0             0           0          1  ]
*-*
*-*  Input:
*-*  -----
*-*  Double_t *rGLMatrix - pointer to Double_t 4x4 buffer array
*-*
*-*  Return:
*-*  ------
*-*  Double_t pointer to the input buffer
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

const Double_t* SetAngles(Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2,Double_t theta3, Double_t phi3)
 theta1 is the polar angle of the x-prim axis in the main reference system
 (MRS), theta2 and theta3 have the same meaning for the y-prim and z-prim
 axis.

 Phi1 is the azimuthal angle of the x-prim in the MRS and phi2 and phi3
 have the same meaning for y-prim and z-prim.


 for example, the unit matrix is defined in the following way.

     x-prim || x, y-prim || y, z-prim || z

     means:  theta1=90, theta2=90, theta3=0, phi1=0, phi2=90, phi3=0

void SetMatrix(const Double_t *matrix)
 copy predefined 3x3 matrix into TRotMatrix object

void SetReflection()
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-*  SetReflection() -  checks whether the determinant of this
*-*                     matrix defines the reflection transformation
*-*                     and set the "reflection" flag if any
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

void Streamer(TBuffer &R__b)
 Stream an object of class TRotMatrix.



Inline Functions


          Double_t* GetMatrix()
              Int_t GetNumber() const
              Int_t GetType() const
           Double_t GetTheta() const
           Double_t GetPhi() const
           Double_t GetPsi() const
             Bool_t IsReflection() const
               void SetName(const char* name)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void StreamerNVirtual(TBuffer& b)
         TRotMatrix TRotMatrix(TRotMatrix&)


Author: Rene Brun 14/09/95
Last update: root/g3d:$Name: $:$Id: TRotMatrix.cxx,v 1.3 2000/11/21 20:18:03 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.