TGeoMatrix.h

Go to the documentation of this file.
00001 // @(#)root/geom:$Id: TGeoMatrix.h 34744 2010-08-07 06:16:36Z brun $
00002 // Author: Andrei Gheata   25/10/01
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TGeoMatrix
00013 #define ROOT_TGeoMatrix
00014 
00015 /*************************************************************************
00016  * Geometrical transformations. TGeoMatrix - base class, TGeoTranslation *
00017  * TGeoRotation, TGeoScale, TGeoCombiTrans, TGeoGenTrans .               *
00018  *                                                                       *
00019  *************************************************************************/
00020 
00021 #ifndef ROOT_TNamed
00022 #include "TNamed.h"
00023 #endif
00024 
00025 //--- globals 
00026 const Double_t kNullVector[3]       =       {0.0,  0.0,  0.0};
00027 
00028 const Double_t kIdentityMatrix[3*3] =       {1.0,  0.0,  0.0,
00029                                              0.0,  1.0,  0.0,
00030                                              0.0,  0.0,  1.0};
00031 
00032 const Double_t kUnitScale[3]        =       {1.0,  1.0,  1.0};
00033 
00034 ////////////////////////////////////////////////////////////////////////////
00035 //                                                                        //
00036 // TGeoMatrix - base class for geometrical transformations.               //
00037 //                                                                        //
00038 ////////////////////////////////////////////////////////////////////////////
00039 
00040 class TGeoMatrix : public TNamed
00041 {
00042 public:
00043 enum EGeoTransfTypes {
00044    kGeoIdentity  = 0,
00045    kGeoTranslation  = BIT(17),
00046    kGeoRotation     = BIT(18),
00047    kGeoScale        = BIT(19),
00048    kGeoReflection   = BIT(20),
00049    kGeoRegistered   = BIT(21),
00050    kGeoSavePrimitive = BIT(22),
00051    kGeoMatrixOwned   = BIT(23),
00052    kGeoCombiTrans   = kGeoTranslation | kGeoRotation,
00053    kGeoGenTrans     = kGeoTranslation | kGeoRotation | kGeoScale
00054 };
00055 
00056 protected:
00057    TGeoMatrix(const TGeoMatrix &other);
00058 
00059 public :
00060    TGeoMatrix();
00061    TGeoMatrix(const char *name);
00062    virtual ~TGeoMatrix();
00063 
00064    TGeoMatrix& operator=(const TGeoMatrix &matrix);
00065 // Preventing warnings with -Weffc++ in GCC since the behaviour of operator * was chosen so by design.
00066 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
00067 #pragma GCC diagnostic push
00068 #pragma GCC diagnostic ignored "-Weffc++"
00069 #endif
00070    TGeoMatrix& operator*(const TGeoMatrix &right) const;
00071 #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) >= 40600
00072 #pragma GCC diagnostic pop
00073 #endif
00074    Bool_t      operator ==(const TGeoMatrix &other) const;
00075    
00076    Bool_t               IsIdentity()    const {return !TestBit(kGeoGenTrans);}
00077    Bool_t               IsTranslation() const {return TestBit(kGeoTranslation);}
00078    Bool_t               IsRotation()    const {return TestBit(kGeoRotation);}
00079    Bool_t               IsReflection()  const {return TestBit(kGeoReflection);}
00080    Bool_t               IsScale()       const {return TestBit(kGeoScale);}
00081    Bool_t               IsCombi()       const {return (TestBit(kGeoTranslation) 
00082                                                && TestBit(kGeoRotation));}
00083    Bool_t               IsGeneral()     const {return (TestBit(kGeoTranslation) 
00084                             && TestBit(kGeoRotation) && TestBit(kGeoScale));}
00085    Bool_t               IsRegistered()  const {return TestBit(kGeoRegistered);}
00086    Bool_t               IsRotAboutZ()   const;
00087    void                 GetHomogenousMatrix(Double_t *hmat) const;
00088    char                *GetPointerName() const;
00089 
00090    virtual Int_t              GetByteCount() const;
00091    virtual const Double_t    *GetTranslation()    const = 0;
00092    virtual const Double_t    *GetRotationMatrix() const = 0;
00093    virtual const Double_t    *GetScale()          const = 0;
00094    virtual TGeoMatrix&  Inverse()                 const = 0;
00095    virtual void         LocalToMaster(const Double_t *local, Double_t *master) const;
00096    virtual void         LocalToMasterVect(const Double_t *local, Double_t *master) const;
00097    virtual void         LocalToMasterBomb(const Double_t *local, Double_t *master) const;
00098    virtual TGeoMatrix  *MakeClone() const = 0;
00099    virtual void         MasterToLocal(const Double_t *master, Double_t *local) const;
00100    virtual void         MasterToLocalVect(const Double_t *master, Double_t *local) const;
00101    virtual void         MasterToLocalBomb(const Double_t *master, Double_t *local) const;
00102    static void          Normalize(Double_t *vect);
00103    void                 Print(Option_t *option="") const; // *MENU*
00104    virtual void         RotateX(Double_t) {}
00105    virtual void         RotateY(Double_t) {}
00106    virtual void         RotateZ(Double_t) {}
00107    virtual void         ReflectX(Bool_t leftside,Bool_t rotonly=kFALSE);
00108    virtual void         ReflectY(Bool_t leftside,Bool_t rotonly=kFALSE);
00109    virtual void         ReflectZ(Bool_t leftside,Bool_t rotonly=kFALSE);
00110    virtual void         RegisterYourself();
00111    void                 SetDefaultName();
00112    virtual void         SetDx(Double_t) {}
00113    virtual void         SetDy(Double_t) {}
00114    virtual void         SetDz(Double_t) {}
00115    
00116    ClassDef(TGeoMatrix, 1)                 // base geometrical transformation class
00117 };
00118 
00119 
00120 
00121 ////////////////////////////////////////////////////////////////////////////
00122 //                                                                        //
00123 // TGeoTranslation - class describing translations. A translation is      //
00124 //    basicaly an array of 3 doubles matching the positions 12, 13        //
00125 //    and 14 in the homogenous matrix description.                        //
00126 //                                                                        //
00127 //                                                                        //
00128 ////////////////////////////////////////////////////////////////////////////
00129 
00130 class TGeoTranslation : public TGeoMatrix
00131 {
00132 protected:
00133    Double_t             fTranslation[3];  // translation vector
00134 public :
00135    TGeoTranslation();
00136    TGeoTranslation(const TGeoTranslation &other);
00137    TGeoTranslation(const TGeoMatrix &other);
00138    TGeoTranslation(Double_t dx, Double_t dy, Double_t dz);
00139    TGeoTranslation(const char *name, Double_t dx, Double_t dy, Double_t dz);
00140    virtual ~TGeoTranslation() {}
00141    
00142    TGeoTranslation& operator=(const TGeoMatrix &matrix);
00143    TGeoTranslation& operator=(const TGeoTranslation &other) {return operator=((const TGeoMatrix&)other);};
00144 
00145    void                 Add(const TGeoTranslation *other);
00146    virtual TGeoMatrix&  Inverse() const;
00147    virtual void         LocalToMaster(const Double_t *local, Double_t *master) const;
00148    virtual void         LocalToMasterVect(const Double_t *local, Double_t *master) const;
00149    virtual void         LocalToMasterBomb(const Double_t *local, Double_t *master) const;
00150    virtual TGeoMatrix  *MakeClone() const;
00151    virtual void         MasterToLocal(const Double_t *master, Double_t *local) const;
00152    virtual void         MasterToLocalVect(const Double_t *master, Double_t *local) const;
00153    virtual void         MasterToLocalBomb(const Double_t *master, Double_t *local) const;
00154    virtual void         RotateX(Double_t angle);
00155    virtual void         RotateY(Double_t angle);
00156    virtual void         RotateZ(Double_t angle);
00157    virtual void         SavePrimitive(ostream &out, Option_t *option = "");
00158    void                 Subtract(const TGeoTranslation *other);
00159    void                 SetTranslation(Double_t dx, Double_t dy, Double_t dz);
00160    void                 SetTranslation(const TGeoMatrix &other);
00161    virtual void         SetDx(Double_t dx) {SetTranslation(dx, fTranslation[1], fTranslation[2]);}
00162    virtual void         SetDy(Double_t dy) {SetTranslation(fTranslation[0], dy, fTranslation[2]);}
00163    virtual void         SetDz(Double_t dz) {SetTranslation(fTranslation[0], fTranslation[1], dz);}
00164    
00165    virtual const Double_t    *GetTranslation() const {return &fTranslation[0];}
00166    virtual const Double_t    *GetRotationMatrix() const {return &kIdentityMatrix[0];}
00167    virtual const Double_t    *GetScale()       const {return &kUnitScale[0];}
00168 
00169    ClassDef(TGeoTranslation, 1)                 // translation class
00170 };
00171 
00172 ////////////////////////////////////////////////////////////////////////////
00173 //                                                                        //
00174 // TGeoRotation - class describing rotations. A rotation is a 3*3 array   //
00175 //    Column vectors has to be orthogonal unit vectors.                   //
00176 //                                                                        //
00177 ////////////////////////////////////////////////////////////////////////////
00178 
00179 class TGeoRotation : public TGeoMatrix
00180 {
00181 protected:
00182    Double_t             fRotationMatrix[3*3];   // rotation matrix
00183 
00184    void                 CheckMatrix();
00185 public :
00186    TGeoRotation();
00187    TGeoRotation(const TGeoRotation &other);
00188    TGeoRotation(const TGeoMatrix &other);
00189    TGeoRotation(const char *name);
00190 //   TGeoRotation(const char *name, Double_t *matrix) ;
00191    TGeoRotation(const char *name, Double_t phi, Double_t theta, Double_t psi);
00192    TGeoRotation(const char *name, Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2,
00193                 Double_t theta3, Double_t phi3);
00194    virtual ~TGeoRotation() {}
00195    
00196    TGeoRotation& operator=(const TGeoMatrix &matrix);
00197    TGeoRotation& operator=(const TGeoRotation &other) {return operator=((const TGeoMatrix&)other);};
00198    
00199    Bool_t               IsValid() const;
00200    virtual TGeoMatrix&  Inverse() const;
00201    void                 Clear(Option_t *option ="");
00202    Double_t             Determinant() const;
00203    void                 FastRotZ(Double_t *sincos);
00204    void                 GetAngles(Double_t &theta1, Double_t &phi1, Double_t &theta2, Double_t &phi2,
00205                                   Double_t &theta3, Double_t &phi3) const;
00206    void                 GetAngles(Double_t &phi, Double_t &theta, Double_t &psi) const;
00207    Double_t             GetPhiRotation(Bool_t fixX=kFALSE) const;
00208    virtual void         LocalToMaster(const Double_t *local, Double_t *master) const;
00209    virtual void         LocalToMasterVect(const Double_t *local, Double_t *master) const {TGeoRotation::LocalToMaster(local, master);}
00210    virtual void         LocalToMasterBomb(const Double_t *local, Double_t *master) const {TGeoRotation::LocalToMaster(local, master);}
00211    virtual TGeoMatrix  *MakeClone() const;
00212    virtual void         MasterToLocal(const Double_t *master, Double_t *local) const;
00213    virtual void         MasterToLocalVect(const Double_t *master, Double_t *local) const {TGeoRotation::MasterToLocal(master, local);}
00214    virtual void         MasterToLocalBomb(const Double_t *master, Double_t *local) const {TGeoRotation::MasterToLocal(master, local);}
00215    void                 MultiplyBy(TGeoRotation *rot, Bool_t after=kTRUE);
00216    virtual void         RotateX(Double_t angle);
00217    virtual void         RotateY(Double_t angle);
00218    virtual void         RotateZ(Double_t angle);
00219    virtual void         SavePrimitive(ostream &out, Option_t *option = "");
00220    virtual void         ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE);
00221    virtual void         ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE);
00222    virtual void         ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE);
00223    void                 SetAngles(Double_t phi, Double_t theta, Double_t psi);
00224    void                 SetAngles(Double_t theta1, Double_t phi1, Double_t theta2, Double_t phi2,
00225                                   Double_t theta3, Double_t phi3);
00226    void                 SetMatrix(const Double_t *rot) {memcpy(&fRotationMatrix[0], rot, 9*sizeof(Double_t));CheckMatrix();}
00227    void                 SetRotation(const TGeoMatrix &other);
00228    void                 GetInverse(Double_t *invmat) const;
00229    
00230    virtual const Double_t    *GetTranslation()    const {return &kNullVector[0];}
00231    virtual const Double_t    *GetRotationMatrix() const {return &fRotationMatrix[0];}
00232    virtual const Double_t    *GetScale()          const {return &kUnitScale[0];}
00233 
00234    ClassDef(TGeoRotation, 1)               // rotation class
00235 };
00236 
00237 ////////////////////////////////////////////////////////////////////////////
00238 //                                                                        //
00239 // TGeoScale - class describing scale transformations. A scale is an      //
00240 //    array of 3 doubles (sx, sy, sz) multiplying elements 0, 5 and 10    //
00241 //    of the homogenous matrix. A scale is normalized : sx*sy*sz = 1      //
00242 //                                                                        //
00243 ////////////////////////////////////////////////////////////////////////////
00244 
00245 class TGeoScale : public TGeoMatrix
00246 {
00247 protected:
00248    Double_t             fScale[3];        // scale (x, y, z)
00249 public :
00250    TGeoScale();
00251    TGeoScale(const TGeoScale &other);
00252    TGeoScale(Double_t sx, Double_t sy, Double_t sz);
00253    TGeoScale(const char *name, Double_t sx, Double_t sy, Double_t sz);
00254    virtual ~TGeoScale();
00255    
00256    virtual TGeoMatrix&  Inverse() const;
00257    void                 SetScale(Double_t sx, Double_t sy, Double_t sz);
00258    virtual void         LocalToMaster(const Double_t *local, Double_t *master) const;
00259    Double_t             LocalToMaster(Double_t dist, const Double_t *dir=0) const;
00260    virtual void         LocalToMasterVect(const Double_t *local, Double_t *master) const {TGeoScale::LocalToMaster(local, master);}
00261    virtual TGeoMatrix  *MakeClone() const;
00262    virtual void         MasterToLocal(const Double_t *master, Double_t *local) const;
00263    Double_t             MasterToLocal(Double_t dist, const Double_t *dir=0) const;
00264    virtual void         MasterToLocalVect(const Double_t *master, Double_t *local) const {TGeoScale::MasterToLocal(master, local);}
00265    virtual void         ReflectX(Bool_t, Bool_t) {fScale[0]=-fScale[0]; SetBit(kGeoReflection, !IsReflection());}
00266    virtual void         ReflectY(Bool_t, Bool_t) {fScale[1]=-fScale[1]; SetBit(kGeoReflection, !IsReflection());}
00267    virtual void         ReflectZ(Bool_t, Bool_t) {fScale[2]=-fScale[2]; SetBit(kGeoReflection, !IsReflection());}
00268    
00269    virtual const Double_t    *GetTranslation()    const {return &kNullVector[0];}
00270    virtual const Double_t    *GetRotationMatrix() const {return &kIdentityMatrix[0];}
00271    virtual const Double_t    *GetScale()          const {return &fScale[0];}
00272 
00273    ClassDef(TGeoScale, 1)                 // scaling class
00274 };
00275 
00276 ////////////////////////////////////////////////////////////////////////////
00277 //                                                                        //
00278 // TGeoCombiTrans - class describing rotation + translation. Most         //
00279 //    frequently used in the description of TGeoNode 's                   //
00280 //                                                                        //
00281 ////////////////////////////////////////////////////////////////////////////
00282 
00283 class TGeoCombiTrans : public TGeoMatrix
00284 {
00285 protected:
00286    Double_t             fTranslation[3]; // translation vector
00287    TGeoRotation        *fRotation;       // rotation matrix
00288 public :
00289    TGeoCombiTrans();
00290    TGeoCombiTrans(const TGeoCombiTrans &other);
00291    TGeoCombiTrans(const TGeoMatrix &other);
00292    TGeoCombiTrans(const TGeoTranslation &tr, const TGeoRotation &rot);
00293    TGeoCombiTrans(const char *name);
00294    TGeoCombiTrans(Double_t dx, Double_t dy, Double_t dz, TGeoRotation *rot);
00295    TGeoCombiTrans(const char *name, Double_t dx, Double_t dy, Double_t dz, TGeoRotation *rot);
00296 
00297    TGeoCombiTrans& operator=(const TGeoMatrix &matrix);
00298    TGeoCombiTrans& operator=(const TGeoCombiTrans &other) {return operator=((const TGeoMatrix&)other);};
00299 
00300    virtual ~TGeoCombiTrans();
00301    
00302    void                 Clear(Option_t *option ="");
00303    virtual TGeoMatrix&  Inverse() const;
00304    virtual TGeoMatrix  *MakeClone() const;
00305    virtual void         RegisterYourself();
00306    virtual void         RotateX(Double_t angle);
00307    virtual void         RotateY(Double_t angle);
00308    virtual void         RotateZ(Double_t angle);
00309    virtual void         ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE);
00310    virtual void         ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE);
00311    virtual void         ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE);
00312    virtual void         SavePrimitive(ostream &out, Option_t *option = "");
00313    virtual void         SetDx(Double_t dx) {SetTranslation(dx, fTranslation[1], fTranslation[2]);}
00314    virtual void         SetDy(Double_t dy) {SetTranslation(fTranslation[0], dy, fTranslation[2]);}
00315    virtual void         SetDz(Double_t dz) {SetTranslation(fTranslation[0], fTranslation[1], dz);}
00316    void                 SetTranslation(const TGeoTranslation &tr);
00317    void                 SetTranslation(Double_t dx, Double_t dy, Double_t dz);
00318    void                 SetTranslation(Double_t *vect);
00319    void                 SetRotation(const TGeoRotation &other);
00320    void                 SetRotation(const TGeoRotation *rot);
00321 
00322    TGeoRotation              *GetRotation() const    {return fRotation;}
00323 
00324    virtual const Double_t    *GetTranslation()    const {return &fTranslation[0];}
00325    virtual const Double_t    *GetRotationMatrix() const;
00326    virtual const Double_t    *GetScale()          const {return &kUnitScale[0];}
00327 
00328    ClassDef(TGeoCombiTrans, 1)            // rotation + translation
00329 };
00330 
00331 ////////////////////////////////////////////////////////////////////////////
00332 //                                                                        //
00333 // TGeoGenTrans - most general transformation, holding a translation,     //
00334 //    a rotation and a scale                                              //
00335 //                                                                        //
00336 ////////////////////////////////////////////////////////////////////////////
00337 
00338 class TGeoGenTrans : public TGeoCombiTrans
00339 {
00340 protected:
00341    Double_t             fScale[3];       // scale (x, y, z)
00342 public :
00343    TGeoGenTrans();
00344    TGeoGenTrans(const char *name);
00345    TGeoGenTrans(Double_t dx, Double_t dy, Double_t dz,
00346                 Double_t sx, Double_t sy, Double_t sz, TGeoRotation *rot);
00347    TGeoGenTrans(const char *name, Double_t dx, Double_t dy, Double_t dz,
00348                 Double_t sx, Double_t sy, Double_t sz, TGeoRotation *rot);
00349    virtual ~TGeoGenTrans();
00350    
00351    void                 Clear(Option_t *option ="");
00352    virtual TGeoMatrix&  Inverse() const;
00353    void                 SetScale(Double_t sx, Double_t sy, Double_t sz);
00354    void                 SetScale(Double_t *scale) {memcpy(&fScale[0], scale, 3*sizeof(Double_t));}
00355    virtual TGeoMatrix  *MakeClone() const {return NULL;}
00356    Bool_t               Normalize();
00357 
00358    virtual const Double_t    *GetScale()     const {return &fScale[0];}
00359 
00360    ClassDef(TGeoGenTrans, 1)            // rotation + translation + scale
00361 };
00362 
00363 ////////////////////////////////////////////////////////////////////////////
00364 //                                                                        //
00365 // TGeoIdentity - an identity transformation. It holds no data member     //
00366 //    and returns pointers to static null translation and identity        //
00367 //    transformations for rotation and scale                              //
00368 //                                                                        //
00369 ////////////////////////////////////////////////////////////////////////////
00370 
00371 class TGeoIdentity : public TGeoMatrix
00372 {
00373 private:
00374    // no data members
00375 public :
00376    TGeoIdentity();
00377    TGeoIdentity(const char *name);
00378    virtual ~TGeoIdentity() {}
00379    
00380    virtual TGeoMatrix&  Inverse() const;
00381    virtual void         LocalToMaster(const Double_t *local, Double_t *master) const {memcpy(master, local, 3*sizeof(Double_t));}
00382    virtual void         LocalToMasterVect(const Double_t *local, Double_t *master) const {memcpy(master, local, 3*sizeof(Double_t));}
00383    virtual void         LocalToMasterBomb(const Double_t *local, Double_t *master) const {TGeoIdentity::LocalToMaster(local, master);}
00384    virtual TGeoMatrix  *MakeClone() const {return NULL;}
00385    virtual void         MasterToLocal(const Double_t *master, Double_t *local) const {memcpy(local, master, 3*sizeof(Double_t));}
00386    virtual void         MasterToLocalVect(const Double_t *master, Double_t *local) const {memcpy(local, master, 3*sizeof(Double_t));}
00387    virtual void         MasterToLocalBomb(const Double_t *master, Double_t *local) const {TGeoIdentity::MasterToLocal(master, local);}
00388 
00389    virtual const Double_t    *GetTranslation() const {return &kNullVector[0];}
00390    virtual const Double_t    *GetRotationMatrix() const {return &kIdentityMatrix[0];}
00391    virtual const Double_t    *GetScale()       const {return &kUnitScale[0];}
00392    virtual void         SavePrimitive(ostream &, Option_t * = "") {;}
00393 
00394    ClassDef(TGeoIdentity, 1)                 // identity transformation class
00395 };
00396 
00397 
00398 
00399 ////////////////////////////////////////////////////////////////////////////
00400 //                                                                        //
00401 // TGeoHMatrix - Matrix class used for computing global transformations   //
00402 //     Should NOT be used for node definition. An instance of this class  //
00403 //     is generally used to pile-up local transformations starting from   //
00404 //     the top level physical node, down to the current node.             //
00405 //                                                                        //
00406 ////////////////////////////////////////////////////////////////////////////
00407 
00408 class TGeoHMatrix : public TGeoMatrix
00409 {
00410 private:
00411    Double_t              fTranslation[3];    // translation component
00412    Double_t              fRotationMatrix[9]; // rotation matrix
00413    Double_t              fScale[3];          // scale component
00414    
00415 public :
00416    TGeoHMatrix();
00417    TGeoHMatrix(const TGeoMatrix &matrix);
00418    TGeoHMatrix(const char *name);
00419    virtual ~TGeoHMatrix();
00420    
00421    TGeoHMatrix& operator=(const TGeoMatrix *matrix);
00422    TGeoHMatrix& operator=(const TGeoMatrix &matrix);
00423    TGeoHMatrix& operator=(const TGeoHMatrix &other) {return operator=((const TGeoMatrix&)other);};
00424    
00425    TGeoHMatrix& operator*=(const TGeoMatrix &matrix) {Multiply(&matrix);return(*this);}
00426 
00427    void                 Clear(Option_t *option ="");
00428    void                 CopyFrom(const TGeoMatrix *other);
00429    Double_t             Determinant() const;
00430    virtual TGeoMatrix&  Inverse() const;
00431    virtual TGeoMatrix  *MakeClone() const;
00432    void                 Multiply(const TGeoMatrix *right);
00433    void                 MultiplyLeft(const TGeoMatrix *left);
00434 
00435    virtual void         RotateX(Double_t angle);
00436    virtual void         RotateY(Double_t angle);
00437    virtual void         RotateZ(Double_t angle);
00438    virtual void         ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE);
00439    virtual void         ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE);
00440    virtual void         ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE);
00441    virtual void         SavePrimitive(ostream &out, Option_t *option = "");
00442    virtual void         SetDx(Double_t dx) {fTranslation[0] = dx; SetBit(kGeoTranslation);}
00443    virtual void         SetDy(Double_t dy) {fTranslation[1] = dy; SetBit(kGeoTranslation);}
00444    virtual void         SetDz(Double_t dz) {fTranslation[2] = dz; SetBit(kGeoTranslation);}
00445    void                 SetTranslation(const Double_t *vect) {SetBit(kGeoTranslation); memcpy(&fTranslation[0], vect, 3*sizeof(Double_t));}
00446    void                 SetRotation(const Double_t *matrix) {SetBit(kGeoRotation); memcpy(&fRotationMatrix[0], matrix, 9*sizeof(Double_t));}
00447    void                 SetScale(const Double_t *scale) {SetBit(kGeoScale); memcpy(&fScale[0], scale, 3*sizeof(Double_t));}
00448 
00449 
00450    virtual const Double_t    *GetTranslation() const {return &fTranslation[0];}
00451    virtual const Double_t    *GetRotationMatrix() const {return &fRotationMatrix[0];}
00452    virtual const Double_t    *GetScale() const {return &fScale[0];}
00453 
00454    virtual Double_t    *GetTranslation() {return &fTranslation[0];}
00455    virtual Double_t    *GetRotationMatrix() {return &fRotationMatrix[0];}
00456    virtual Double_t    *GetScale() {return &fScale[0];}
00457    ClassDef(TGeoHMatrix, 1)                 // global matrix class
00458 };
00459 
00460 
00461 R__EXTERN TGeoIdentity *gGeoIdentity;
00462 
00463 #endif
00464 

Generated on Tue Jul 5 14:12:17 2011 for ROOT_528-00b_version by  doxygen 1.5.1