]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSgeomMatrix.h
Initialization of AliITSgeom from TGeo for the reconstruction pass. AliITSLoader...
[u/mrichter/AliRoot.git] / ITS / AliITSgeomMatrix.h
index 97591533f57ce1b6fe75e26b6b137cefd677b403..09ed5be75bf716ee30dae98692db61a9cb1a1901 100644 (file)
@@ -2,16 +2,21 @@
 #define ALIITSGEOMMATRIX_H
 /* Copyright(c) 2000, ALICE Experiment at CERN, All rights reserved. *
  * see cxx source for full Copyright notice.                         */
-/* $Id: */
-////////////////////////////////////////////////////////////////////////
-// ITS geometry manipulation routines on the module level. This class is
-// to replace the structure ITS_geom in the class AliITSgeom.
-// Created May 30 2000.
-// version 0.0.0
-// By Bjorn S. Nilsen
-////////////////////////////////////////////////////////////////////////
-
+/* 
+$Id:
+*/
+/*
+ ITS geometry manipulation routines on the module level. This class is
+ to replace the structure ITS_geom in the class AliITSgeom.
+ Created May 30 2000.
+ version 0.0.0
+ By Bjorn S. Nilsen
+*/
 #include <TObject.h>
+#include <TString.h>
+class TPolyLine3D;
+class TNode;
+class TShape;
 
 class AliITSgeomMatrix : public TObject {
  public:
@@ -40,9 +45,15 @@ class AliITSgeomMatrix : public TObject {
        void PrintTitles(ostream *os) const;
        // Reads in the content of this class in the format of Print
        void Read(istream *is);
-        virtual void Print(Option_t *option="") const {TObject::Print(option);}
-        virtual Int_t Read(const char *name) {return TObject::Read(name);}
+     virtual void Print(Option_t *option="") const {
+                       TObject::Print(option);}
+     virtual Int_t Read(const char *name) {return TObject::Read(name);}
 
+     // Returns the geometry path corresponding to this transformation
+     TString& GetPath(){return fPath;}
+     // Sets the geometry path
+     void SetPath(const Char_t *p){fPath = p;}
+     void SetPath(const TString &p){fPath = p;}
        // Given the rotation angles [radians] it fills frot and computes
        // the rotation matrix fm.
        void SetAngles(const Double_t rot[3]){// [radians]
@@ -50,7 +61,7 @@ class AliITSgeomMatrix : public TObject {
        // Sets the translation vector and computes fCylR and fCylPhi.
        void SetTranslation(const Double_t tran[3]);
        // sets the rotation matrix and computes the rotation angles [radians]
-       void SetMatrix(Double_t matrix[3][3]){ for(Int_t i=0;i<3;i++)
+       void SetMatrix(const Double_t matrix[3][3]){ for(Int_t i=0;i<3;i++)
         for(Int_t j=0;j<3;j++) fm[i][j]=matrix[i][j];this->AngleFromMatrix();}
        // Sets the detector index value
        void SetDetectorIndex(Int_t idt) {fDetectorIndex = idt;}
@@ -101,11 +112,11 @@ class AliITSgeomMatrix : public TObject {
        // given a position error matrix in ALICE Cartesian global
        // coordinates [cm] returns a position error matrix in detector/
        // module local Cartesian local coordinates [cm]
-       void GtoLPositionError(Double_t g[3][3],Double_t l[3][3]) const;
+       void GtoLPositionError(const Double_t g[3][3],Double_t l[3][3]) const;
        // given a position error matrix in detector/module Cartesian local
        // coordinates [cm] returns a position error matrix in ALICE
        // Cartesian global coordinates [cm]
-       void LtoGPositionError(Double_t l[3][3],Double_t g[3][3]) const;
+       void LtoGPositionError(const Double_t l[3][3],Double_t g[3][3]) const;
        // Tracking Related Routines
        void GtoLPositionTracking(const Double_t g[3],Double_t l[3]) const;
        // Given a position in Cartesian Tracking global coordinates [cm]
@@ -122,18 +133,26 @@ class AliITSgeomMatrix : public TObject {
        // given a position error matrix in Tracking Cartesian global
        // coordinates [cm] returns a position error matrix in detector/
        // module local Cartesian local coordinates [cm]
-       void GtoLPositionErrorTracking(Double_t g[3][3],
+       void GtoLPositionErrorTracking(const Double_t g[3][3],
                                       Double_t l[3][3]) const;
        // given a position error matrix in detector/module Cartesian local
        // coordinates [cm] returns a position error matrix in Tracking
        // Cartesian global coordinates [cm]
-       void LtoGPositionErrorTracking(Double_t l[3][3],
+       void LtoGPositionErrorTracking(const Double_t l[3][3],
                                       Double_t g[3][3]) const;
        // Computes the distance squared [cm^2] between a point t[3] and
        // this module/detector
        Double_t Distance2(const Double_t t[3]) const {Double_t d=0.0,q;
                  for(Int_t i=0;i<3;i++){q = t[i]-ftran[i]; d += q*q;}
                  return d;}
+     //
+     // Documentation related Class
+     TPolyLine3D* CreateLocalAxis();
+     TPolyLine3D* CreateLocalAxisTracking();
+     TNode* CreateNode(const Char_t *nodeName,const Char_t *nodeTitle,
+                       TNode *mother,TShape *shape,Bool_t axis=kTRUE);
+     void MakeFigures();
+     //
  private: // private functions
        // Given the rotation matrix fm it fills the rotation angles frot
        void MatrixFromAngle();
@@ -146,13 +165,14 @@ class AliITSgeomMatrix : public TObject {
        Double_t ftran[3];       // Translation vector of module x,y,z.
        Double_t fCylR,fCylPhi;  //! Translation vector in Cylindrical coord.
        Double_t fm[3][3];       // Rotation matrix based on frot.
+     TString  fPath;          // Path within Geometry to this volume
 
        // Note, fCylR and fCylPhi are added as data members because it costs
        // about a factor of 10 to compute them over looking them up. Since
        // they are used in some tracking algorithms this can be a large cost
        // in computing time. They are not written out but computed.
 
-       ClassDef(AliITSgeomMatrix,1) // Matrix class used by AliITSgeom.
+       ClassDef(AliITSgeomMatrix,2) // Matrix class used by AliITSgeom.
 };
 // Input and output function for standard C++ input/output.
 ostream &operator<<(ostream &os,AliITSgeomMatrix &source);