// @(#)root/g3d:$Id$
// Author: Rene Brun   22/09/95

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TROOT.h"
#include "THashList.h"
#include "TObjArray.h"
#include "TGeometry.h"
#include "TNode.h"
#include "TMaterial.h"
#include "TBrowser.h"
#include "TClass.h"

TGeometry *gGeometry = 0;

ClassImp(TGeometry)


//______________________________________________________________________________
//                    T G E O M E T R Y  description
//                    ==============================
//
//    The Geometry class describes the geometry of a detector.
//    The current implementation supports the GEANT3 style description.
//    A special program provided in the ROOT utilities (toroot) can be used
//    to automatically translate a GEANT detector geometry into a ROOT geometry.
//
//   a Geometry object is entered into the list of geometries into the
//     ROOT main object (see TROOT description) when the TGeometry
//     constructor is invoked.
//   Several geometries may coexist in memory.
//
//   A Geometry object consist of the following linked lists:
//        - the TMaterial list (material definition only).
//        - the TRotmatrix list (Rotation matrices definition only).
//        - the TShape list (volume definition only).
//        - the TNode list assembling all detector elements.
//
//   Only the Build and Draw functions for a geometry are currently supported.
//
//---------------------------------------------------------------------------
//  The conversion program from Geant to Root has been added in the list
//  of utilities in utils directory.(see g2root)
//  The executable module of g2root can be found in $ROOTSYS/bin/g2root.
//
//  To use this conversion program, type the shell command:
//        g2root  geant_rzfile macro_name
//
//  for example
//        g2root na49.geom na49.C
//  will convert the GEANT RZ file na49.geom into a ROOT macro na49.C
//
//  To generate the Geometry structure within Root, do:
//    Root > .x na49.C
//    Root > na49.Draw()
//    Root > wh.x3d()    (this invokes the 3-d Root viewver)
//    Root > TFile gna49("na49.root","NEW")  //open a new root file
//    Root > na49.Write()                    //Write the na49 geometry structure
//    Root > gna49.Write()                   //Write all keys (in this case only one)
//  Note: all keys are also written on closing of the file, gna49.Close or
//  when the program exits, Root closes all open files correctly.
//  Once this file has been written, in a subsequent session, simply do:
//    Root > TFile gna49("na49.root")
//    Root > na49.Draw()
//
//  The figure below shows the geometry above using the x3d viewer.
//  This x3d viewver is invoked by selecting "View x3d" in the View menu
//  of a canvas (See example of this tool bar in TCanvas).
//Begin_Html
/*
<img src="gif/na49.gif">
*/
//End_Html


//______________________________________________________________________________
TGeometry::TGeometry()
{
   // Geometry default constructor.

   fMaterials       = new THashList(100,3);
   fMatrices        = new THashList(100,3);
   fShapes          = new THashList(500,3);
   fNodes           = new TList;
   fCurrentNode     = 0;
   fMaterialPointer = 0;
   fMatrixPointer   = 0;
   fShapePointer    = 0;
   gGeometry = this;
   fBomb            = 1;
   fMatrix          = 0;
   fX=fY=fZ         =0.0;
   fGeomLevel       =0;
   fIsReflection[fGeomLevel] = kFALSE;
}


//______________________________________________________________________________
TGeometry::TGeometry(const char *name,const char *title ) : TNamed (name, title)
{
   // Geometry normal constructor.

   fMaterials       = new THashList(1000,3);
   fMatrices        = new THashList(1000,3);
   fShapes          = new THashList(5000,3);
   fNodes           = new TList;
   fCurrentNode     = 0;
   fMaterialPointer = 0;
   fMatrixPointer   = 0;
   fShapePointer    = 0;
   gGeometry = this;
   fBomb            = 1;
   fMatrix          = 0;
   fX=fY=fZ         =0.0;
   gROOT->GetListOfGeometries()->Add(this);
   fGeomLevel       =0;
   fIsReflection[fGeomLevel] = kFALSE;
}

//______________________________________________________________________________
TGeometry::TGeometry(const TGeometry& geo) :
  TNamed(geo),
  fMaterials(geo.fMaterials),
  fMatrices(geo.fMatrices),
  fShapes(geo.fShapes),
  fNodes(geo.fNodes),
  fMatrix(geo.fMatrix),
  fCurrentNode(geo.fCurrentNode),
  fMaterialPointer(geo.fMaterialPointer),
  fMatrixPointer(geo.fMatrixPointer),
  fShapePointer(geo.fShapePointer),
  fBomb(geo.fBomb),
  fGeomLevel(geo.fGeomLevel),
  fX(geo.fX),
  fY(geo.fY),
  fZ(geo.fZ)
{
   //copy constructor
   for(Int_t i=0; i<kMAXLEVELS; i++) {
      for(Int_t j=0; j<kVectorSize; j++)
         fTranslation[i][j]=geo.fTranslation[i][j];
      for(Int_t j=0; j<kMatrixSize; j++)
         fRotMatrix[i][j]=geo.fRotMatrix[i][j];
      fIsReflection[i]=geo.fIsReflection[i];
   }
}

//______________________________________________________________________________
TGeometry& TGeometry::operator=(const TGeometry& geo)
{
   //assignement operator
   if(this!=&geo) {
      TNamed::operator=(geo);
      fMaterials=geo.fMaterials;
      fMatrices=geo.fMatrices;
      fShapes=geo.fShapes;
      fNodes=geo.fNodes;
      fMatrix=geo.fMatrix;
      fCurrentNode=geo.fCurrentNode;
      fMaterialPointer=geo.fMaterialPointer;
      fMatrixPointer=geo.fMatrixPointer;
      fShapePointer=geo.fShapePointer;
      fBomb=geo.fBomb;
      fGeomLevel=geo.fGeomLevel;
      fX=geo.fX;
      fY=geo.fY;
      fZ=geo.fZ;
      for(Int_t i=0; i<kMAXLEVELS; i++) {
         for(Int_t j=0; j<kVectorSize; j++)
            fTranslation[i][j]=geo.fTranslation[i][j];
         for(Int_t j=0; j<kMatrixSize; j++)
            fRotMatrix[i][j]=geo.fRotMatrix[i][j];
         fIsReflection[i]=geo.fIsReflection[i];
      }
   }
   return *this;
}

//______________________________________________________________________________
TGeometry::~TGeometry()
{
   // Geometry default destructor.

   if (!fMaterials) return;
   fMaterials->Delete();
   fMatrices->Delete();
   fShapes->Delete();
   fNodes->Delete();
   delete fMaterials;
   delete fMatrices;
   delete fShapes;
   delete fNodes;
   delete [] fMaterialPointer;
   delete [] fMatrixPointer;
   delete [] fShapePointer;
   fMaterials       = 0;
   fMatrices        = 0;
   fShapes          = 0;
   fNodes           = 0;
   fMaterialPointer = 0;
   fMatrixPointer   = 0;
   fShapePointer    = 0;

   if (gGeometry == this) {
      gGeometry = (TGeometry*) gROOT->GetListOfGeometries()->First();
      if (gGeometry == this)
         gGeometry = (TGeometry*) gROOT->GetListOfGeometries()->After(gGeometry);
   }
   gROOT->GetListOfGeometries()->Remove(this);
}


//______________________________________________________________________________
void TGeometry::Browse(TBrowser *b)
{
   // Browse.

   if( b ) {
      b->Add( fMaterials, "Materials" );
      b->Add( fMatrices, "Rotation Matrices" );
      b->Add( fShapes, "Shapes" );
      b->Add( fNodes, "Nodes" );
   }
}


//______________________________________________________________________________
void TGeometry::cd(const char *)
{
   // Change Current Geometry to this.

   gGeometry = this;
}


//______________________________________________________________________________
void TGeometry::Draw(Option_t *option)
{
   // Draw this Geometry.

   TNode *node1 = (TNode*)fNodes->First();
   if (node1) node1->Draw(option);

}


//______________________________________________________________________________
TObject *TGeometry::FindObject(const TObject *) const
{
   // Find object in a geometry node, material, etc

   Error("FindObject","Not yet implemented");
   return 0;
}


//______________________________________________________________________________
TObject *TGeometry::FindObject(const char *name) const
{
   // Search object identified by name in the geometry tree

   TObjArray *loc = TGeometry::Get(name);
   if (loc) return loc->At(0);
   return 0;
}


//______________________________________________________________________________
TObjArray *TGeometry::Get(const char *name)
{
   // Static function called by TROOT to search name in the geometry.
   // Returns a TObjArray containing a pointer to the found object
   // and a pointer to the container where the object was found.

   static TObjArray *locs = 0;
   if (!locs) locs = new TObjArray(2);
   TObjArray &loc = *locs;
   loc[0] = 0;
   loc[1] = 0;

   if (!gGeometry) return &loc;

   TObject *temp;
   TObject *where;

   temp  = gGeometry->GetListOfMaterials()->FindObject(name);
   where = gGeometry->GetListOfMaterials();

   if (!temp) {
      temp  = gGeometry->GetListOfShapes()->FindObject(name);
      where = gGeometry->GetListOfShapes();
   }
   if (!temp) {
      temp  = gGeometry->GetListOfMatrices()->FindObject(name);
      where = gGeometry->GetListOfMatrices();
   }
   if (!temp) {
      temp  = gGeometry->GetNode(name);
      where = gGeometry;
   }
   loc[0] = temp;
   loc[1] = where;

   return &loc;
}


//______________________________________________________________________________
TMaterial *TGeometry::GetMaterial(const char *name) const
{
   // Return pointer to Material with name.

   return (TMaterial*)fMaterials->FindObject(name);
}


//______________________________________________________________________________
TMaterial *TGeometry::GetMaterialByNumber(Int_t number) const
{
   // Return pointer to Material with number.

   TMaterial *mat;
   if (number < 0 || number >= fMaterials->GetSize()) return 0;
   if (fMaterialPointer)  return fMaterialPointer[number];
   TIter next(fMaterials);
   while ((mat = (TMaterial*) next())) {
      if (mat->GetNumber() == number) return mat;
   }
   return 0;
}


//______________________________________________________________________________
TNode *TGeometry::GetNode(const char *name) const
{
   // Return pointer to node with name in the geometry tree.

   TNode *node= (TNode*)GetListOfNodes()->First();
   if (!node) return 0;
   if (node->TestBit(kNotDeleted))  return node->GetNode(name);
   return 0;
}


//______________________________________________________________________________
TRotMatrix *TGeometry::GetRotMatrix(const char *name) const
{
   // Return pointer to RotMatrix with name.

   return (TRotMatrix*)fMatrices->FindObject(name);
}


//______________________________________________________________________________
TRotMatrix *TGeometry::GetRotMatrixByNumber(Int_t number) const
{
   // Return pointer to RotMatrix with number.

   TRotMatrix *matrix;
   if (number < 0 || number >= fMatrices->GetSize()) return 0;
   if (fMatrixPointer)  return fMatrixPointer[number];
   TIter next(fMatrices);
   while ((matrix = (TRotMatrix*) next())) {
      if (matrix->GetNumber() == number) return matrix;
   }
   return 0;
}


//______________________________________________________________________________
TShape *TGeometry::GetShape(const char *name) const
{
   // Return pointer to Shape with name.

   return (TShape*)fShapes->FindObject(name);
}


//______________________________________________________________________________
TShape *TGeometry::GetShapeByNumber(Int_t number) const
{
   // Return pointer to Shape with number.

   TShape *shape;
   if (number < 0 || number >= fShapes->GetSize()) return 0;
   if (fShapePointer)  return fShapePointer[number];
   TIter next(fShapes);
   while ((shape = (TShape*) next())) {
      if (shape->GetNumber() == number) return shape;
   }
   return 0;
}


//______________________________________________________________________________
void TGeometry::Local2Master(Double_t *local, Double_t *master)
{
   // 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 TNode::UpdateMatrix should be called before.

   if (GeomLevel()) {
      Double_t x,y,z;
      Double_t bomb = GetBomb();
      Double_t *matrix = &fRotMatrix[GeomLevel()][0];
      x = bomb*fX
        + local[0]*matrix[0]
        + local[1]*matrix[3]
        + local[2]*matrix[6];

      y = bomb*fY
        + local[0]*matrix[1]
        + local[1]*matrix[4]
        + local[2]*matrix[7];

      z = bomb*fZ
        + local[0]*matrix[2]
        + local[1]*matrix[5]
        + local[2]*matrix[8];
      master[0] = x; master[1] = y; master[2] = z;
   }
   else
      for (Int_t i=0;i<3;i++) master[i] = local[i];
}


//______________________________________________________________________________
void TGeometry::Local2Master(Float_t *local, Float_t *master)
{
   // 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 TNode::UpdateMatrix should be called before.

   if (GeomLevel()) {
      Float_t x,y,z;
      Float_t bomb = GetBomb();

      Double_t *matrix = &fRotMatrix[GeomLevel()][0];

      x = bomb*fX
        + local[0]*matrix[0]
        + local[1]*matrix[3]
        + local[2]*matrix[6];

      y = bomb*fY
        + local[0]*matrix[1]
        + local[1]*matrix[4]
        + local[2]*matrix[7];

      z = bomb*fZ
        + local[0]*matrix[2]
        + local[1]*matrix[5]
        + local[2]*matrix[8];

      master[0] = x; master[1] = y; master[2] = z;
   }
   else
      for (Int_t i=0;i<3;i++) master[i] = local[i];
}


//______________________________________________________________________________
void TGeometry::ls(Option_t *option) const
{
   // List this geometry.

   TString opt = option;
   opt.ToLower();
   if (opt.Contains("m")) {
      Printf("=================List of Materials================");
      fMaterials->ls(option);
   }
   if (opt.Contains("r")) {
      Printf("=================List of RotationMatrices================");
      fMatrices->ls(option);
   }
   if (opt.Contains("s")) {
      Printf("=================List of Shapes==========================");
      fShapes->ls(option);
   }
   if (opt.Contains("n")) {
      Printf("=================List of Nodes===========================");
      fNodes->ls(option);
   }
}


//______________________________________________________________________________
void TGeometry::Master2Local(Double_t *master, Double_t *local)
{
   // 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 TNode::UpdateMatrix should be called before.

   if (GeomLevel()) {
      Double_t x,y,z;
      Double_t bomb = GetBomb();
      Double_t *matrix = &fRotMatrix[GeomLevel()][0];

      Double_t xms = master[0] - bomb*fX;
      Double_t yms = master[1] - bomb*fY;
      Double_t zms = master[2] - bomb*fZ;

      x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
      y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
      z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];

      local[0] = x; local[1] = y; local[2] = z;
   }
   else
      memcpy(local,master,sizeof(Double_t)* kVectorSize);
}


//______________________________________________________________________________
void TGeometry::Master2Local(Float_t *master, Float_t *local)
{
   // 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 TNode::UpdateMatrix should be called before.

   if (GeomLevel()) {
      Float_t x,y,z;
      Float_t bomb = GetBomb();

      Double_t *matrix = &fRotMatrix[GeomLevel()][0];

      Double_t xms = master[0] - bomb*fX;
      Double_t yms = master[1] - bomb*fY;
      Double_t zms = master[2] - bomb*fZ;

      x = xms*matrix[0] + yms*matrix[1] + zms*matrix[2];
      y = xms*matrix[3] + yms*matrix[4] + zms*matrix[5];
      z = xms*matrix[6] + yms*matrix[7] + zms*matrix[8];

      local[0] = x; local[1] = y; local[2] = z;
   }
   else
      memcpy(local,master,sizeof(Float_t)* kVectorSize);
}


//______________________________________________________________________________
void TGeometry::Node(const char *name, const char *title, const char *shapename, Double_t x, Double_t y, Double_t z, const char *matrixname, Option_t *option)
{
   // Add a node to the current node in this geometry.

   new TNode(name,title,shapename,x,y,z,matrixname,option);
}


//______________________________________________________________________________
void TGeometry::RecursiveRemove(TObject *obj)
{
   // Recursively remove object from a Geometry list.

   if (fNodes) fNodes->RecursiveRemove(obj);
}


//______________________________________________________________________________
void TGeometry::Streamer(TBuffer &b)
{
   // Stream a class object.

   if (b.IsReading()) {
      UInt_t R__s, R__c;
      Version_t R__v = b.ReadVersion(&R__s, &R__c);
      if (R__v > 1) {
         b.ReadClassBuffer(TGeometry::Class(), this, R__v, R__s, R__c);
      } else {
         //====process old versions before automatic schema evolution
         TNamed::Streamer(b);
         fMaterials->Streamer(b);
         fMatrices->Streamer(b);
         fShapes->Streamer(b);
         fNodes->Streamer(b);
         b >> fBomb;
         b.CheckByteCount(R__s, R__c, TGeometry::IsA());
         //====end of old versions
      }
      // Build direct access pointers to individual materials,matrices and shapes
      Int_t i;
      TMaterial *onemat;
      TRotMatrix *onematrix;
      TShape *oneshape;
      Int_t nmat = fMaterials->GetSize();
      if (nmat) fMaterialPointer = new TMaterial* [nmat];
      TIter nextmat(fMaterials);
      i = 0;
      while ((onemat = (TMaterial*) nextmat())) {
         fMaterialPointer[i] = onemat;
         i++;
      }

      Int_t nrot = fMatrices->GetSize();
      if (nrot) fMatrixPointer = new TRotMatrix* [nrot];
      TIter nextmatrix(fMatrices);
      i = 0;
      while ((onematrix = (TRotMatrix*) nextmatrix())) {
         fMatrixPointer[i] = onematrix;
         i++;
      }

      Int_t nsha = fShapes->GetSize();
      if (nsha) fShapePointer = new TShape* [nsha];
      TIter nextshape(fShapes);
      i = 0;
      while ((oneshape = (TShape*) nextshape())) {
         fShapePointer[i] = oneshape;
         i++;
      }

      gROOT->GetListOfGeometries()->Add(this);

      fCurrentNode = (TNode*)GetListOfNodes()->First();
   } else {
      b.WriteClassBuffer(TGeometry::Class(),this);
   }
}


//______________________________________________________________________________
void TGeometry::UpdateMatrix(TNode *node)
{
   // Update global rotation matrix/translation vector for this node
   // this function must be called before invoking Local2Master

   TNode *nodes[kMAXLEVELS];
   for (Int_t i=0;i<kVectorSize;i++) fTranslation[0][i] = 0;
   for (Int_t i=0;i<kMatrixSize;i++) fRotMatrix[0][i] = 0;
   fRotMatrix[0][0] = 1;   fRotMatrix[0][4] = 1;   fRotMatrix[0][8] = 1;

   fGeomLevel  = 0;
   //build array of parent nodes
   while (node) {
      nodes[fGeomLevel] = node;
      node = node->GetParent();
      fGeomLevel++;
   }
   fGeomLevel--;
   Int_t saveGeomLevel = fGeomLevel;
   //Update matrices in the hierarchy
   for (fGeomLevel=1;fGeomLevel<=saveGeomLevel;fGeomLevel++) {
      node = nodes[fGeomLevel-1];
      UpdateTempMatrix(node->GetX(),node->GetY(),node->GetZ(),node->GetMatrix());
   }
}


//______________________________________________________________________________
void TGeometry::UpdateTempMatrix(Double_t x, Double_t y, Double_t z, TRotMatrix *rotMatrix)
{
   // Update temp matrix.

   Double_t *matrix = 0;
   Bool_t isReflection = kFALSE;
   if (rotMatrix && rotMatrix->GetType()) {
      matrix = rotMatrix->GetMatrix();
      isReflection = rotMatrix->IsReflection();
   }
   UpdateTempMatrix( x,y,z, matrix,isReflection);
}


//______________________________________________________________________________
void TGeometry::UpdateTempMatrix(Double_t x, Double_t y, Double_t z, Double_t *matrix,Bool_t isReflection)
{
   // Update temp matrix.

   Int_t i=GeomLevel();
   if (i) {
      if(matrix) {
         UpdateTempMatrix(&(fTranslation[i-1][0]),&fRotMatrix[i-1][0]
                          ,x,y,z,matrix
                          ,&fTranslation[i][0],&fRotMatrix[i][0]);
         fX = fTranslation[i][0];
         fY = fTranslation[i][1];
         fZ = fTranslation[i][2];
         fIsReflection[i] = fIsReflection[i-1] ^ isReflection;
      } else {
         fX = fTranslation[i][0] = fTranslation[i-1][0] + x;
         fY = fTranslation[i][1] = fTranslation[i-1][1] + y;
         fZ = fTranslation[i][2] = fTranslation[i-1][2] + z;
      }
   } else {
      fX=fY=fZ=0;
      fIsReflection[0] = kFALSE;
      for (i=0;i<kVectorSize;i++) fTranslation[0][i] = 0;
      for (i=0;i<kMatrixSize;i++) fRotMatrix[0][i] = 0;
      fRotMatrix[0][0] = 1;   fRotMatrix[0][4] = 1;   fRotMatrix[0][8] = 1;
   }
}


//______________________________________________________________________________
void TGeometry::UpdateTempMatrix(Double_t *dx,Double_t *rmat
                         , Double_t x, Double_t y, Double_t z, Double_t *matrix
                         , Double_t *dxnew, Double_t *rmatnew)
{
   // Compute new translation vector and global matrix.
   //
   //  dx      old translation vector
   //  rmat    old global matrix
   //  x,y,z   offset of new local system with respect to mother
   //  dxnew   new translation vector
   //  rmatnew new global rotation matrix

   dxnew[0] = dx[0] + x*rmat[0] + y*rmat[3] + z*rmat[6];
   dxnew[1] = dx[1] + x*rmat[1] + y*rmat[4] + z*rmat[7];
   dxnew[2] = dx[2] + x*rmat[2] + y*rmat[5] + z*rmat[8];

   rmatnew[0] = rmat[0]*matrix[0] + rmat[3]*matrix[1] + rmat[6]*matrix[2];
   rmatnew[1] = rmat[1]*matrix[0] + rmat[4]*matrix[1] + rmat[7]*matrix[2];
   rmatnew[2] = rmat[2]*matrix[0] + rmat[5]*matrix[1] + rmat[8]*matrix[2];
   rmatnew[3] = rmat[0]*matrix[3] + rmat[3]*matrix[4] + rmat[6]*matrix[5];
   rmatnew[4] = rmat[1]*matrix[3] + rmat[4]*matrix[4] + rmat[7]*matrix[5];
   rmatnew[5] = rmat[2]*matrix[3] + rmat[5]*matrix[4] + rmat[8]*matrix[5];
   rmatnew[6] = rmat[0]*matrix[6] + rmat[3]*matrix[7] + rmat[6]*matrix[8];
   rmatnew[7] = rmat[1]*matrix[6] + rmat[4]*matrix[7] + rmat[7]*matrix[8];
   rmatnew[8] = rmat[2]*matrix[6] + rmat[5]*matrix[7] + rmat[8]*matrix[8];
}
 TGeometry.cxx:1
 TGeometry.cxx:2
 TGeometry.cxx:3
 TGeometry.cxx:4
 TGeometry.cxx:5
 TGeometry.cxx:6
 TGeometry.cxx:7
 TGeometry.cxx:8
 TGeometry.cxx:9
 TGeometry.cxx:10
 TGeometry.cxx:11
 TGeometry.cxx:12
 TGeometry.cxx:13
 TGeometry.cxx:14
 TGeometry.cxx:15
 TGeometry.cxx:16
 TGeometry.cxx:17
 TGeometry.cxx:18
 TGeometry.cxx:19
 TGeometry.cxx:20
 TGeometry.cxx:21
 TGeometry.cxx:22
 TGeometry.cxx:23
 TGeometry.cxx:24
 TGeometry.cxx:25
 TGeometry.cxx:26
 TGeometry.cxx:27
 TGeometry.cxx:28
 TGeometry.cxx:29
 TGeometry.cxx:30
 TGeometry.cxx:31
 TGeometry.cxx:32
 TGeometry.cxx:33
 TGeometry.cxx:34
 TGeometry.cxx:35
 TGeometry.cxx:36
 TGeometry.cxx:37
 TGeometry.cxx:38
 TGeometry.cxx:39
 TGeometry.cxx:40
 TGeometry.cxx:41
 TGeometry.cxx:42
 TGeometry.cxx:43
 TGeometry.cxx:44
 TGeometry.cxx:45
 TGeometry.cxx:46
 TGeometry.cxx:47
 TGeometry.cxx:48
 TGeometry.cxx:49
 TGeometry.cxx:50
 TGeometry.cxx:51
 TGeometry.cxx:52
 TGeometry.cxx:53
 TGeometry.cxx:54
 TGeometry.cxx:55
 TGeometry.cxx:56
 TGeometry.cxx:57
 TGeometry.cxx:58
 TGeometry.cxx:59
 TGeometry.cxx:60
 TGeometry.cxx:61
 TGeometry.cxx:62
 TGeometry.cxx:63
 TGeometry.cxx:64
 TGeometry.cxx:65
 TGeometry.cxx:66
 TGeometry.cxx:67
 TGeometry.cxx:68
 TGeometry.cxx:69
 TGeometry.cxx:70
 TGeometry.cxx:71
 TGeometry.cxx:72
 TGeometry.cxx:73
 TGeometry.cxx:74
 TGeometry.cxx:75
 TGeometry.cxx:76
 TGeometry.cxx:77
 TGeometry.cxx:78
 TGeometry.cxx:79
 TGeometry.cxx:80
 TGeometry.cxx:81
 TGeometry.cxx:82
 TGeometry.cxx:83
 TGeometry.cxx:84
 TGeometry.cxx:85
 TGeometry.cxx:86
 TGeometry.cxx:87
 TGeometry.cxx:88
 TGeometry.cxx:89
 TGeometry.cxx:90
 TGeometry.cxx:91
 TGeometry.cxx:92
 TGeometry.cxx:93
 TGeometry.cxx:94
 TGeometry.cxx:95
 TGeometry.cxx:96
 TGeometry.cxx:97
 TGeometry.cxx:98
 TGeometry.cxx:99
 TGeometry.cxx:100
 TGeometry.cxx:101
 TGeometry.cxx:102
 TGeometry.cxx:103
 TGeometry.cxx:104
 TGeometry.cxx:105
 TGeometry.cxx:106
 TGeometry.cxx:107
 TGeometry.cxx:108
 TGeometry.cxx:109
 TGeometry.cxx:110
 TGeometry.cxx:111
 TGeometry.cxx:112
 TGeometry.cxx:113
 TGeometry.cxx:114
 TGeometry.cxx:115
 TGeometry.cxx:116
 TGeometry.cxx:117
 TGeometry.cxx:118
 TGeometry.cxx:119
 TGeometry.cxx:120
 TGeometry.cxx:121
 TGeometry.cxx:122
 TGeometry.cxx:123
 TGeometry.cxx:124
 TGeometry.cxx:125
 TGeometry.cxx:126
 TGeometry.cxx:127
 TGeometry.cxx:128
 TGeometry.cxx:129
 TGeometry.cxx:130
 TGeometry.cxx:131
 TGeometry.cxx:132
 TGeometry.cxx:133
 TGeometry.cxx:134
 TGeometry.cxx:135
 TGeometry.cxx:136
 TGeometry.cxx:137
 TGeometry.cxx:138
 TGeometry.cxx:139
 TGeometry.cxx:140
 TGeometry.cxx:141
 TGeometry.cxx:142
 TGeometry.cxx:143
 TGeometry.cxx:144
 TGeometry.cxx:145
 TGeometry.cxx:146
 TGeometry.cxx:147
 TGeometry.cxx:148
 TGeometry.cxx:149
 TGeometry.cxx:150
 TGeometry.cxx:151
 TGeometry.cxx:152
 TGeometry.cxx:153
 TGeometry.cxx:154
 TGeometry.cxx:155
 TGeometry.cxx:156
 TGeometry.cxx:157
 TGeometry.cxx:158
 TGeometry.cxx:159
 TGeometry.cxx:160
 TGeometry.cxx:161
 TGeometry.cxx:162
 TGeometry.cxx:163
 TGeometry.cxx:164
 TGeometry.cxx:165
 TGeometry.cxx:166
 TGeometry.cxx:167
 TGeometry.cxx:168
 TGeometry.cxx:169
 TGeometry.cxx:170
 TGeometry.cxx:171
 TGeometry.cxx:172
 TGeometry.cxx:173
 TGeometry.cxx:174
 TGeometry.cxx:175
 TGeometry.cxx:176
 TGeometry.cxx:177
 TGeometry.cxx:178
 TGeometry.cxx:179
 TGeometry.cxx:180
 TGeometry.cxx:181
 TGeometry.cxx:182
 TGeometry.cxx:183
 TGeometry.cxx:184
 TGeometry.cxx:185
 TGeometry.cxx:186
 TGeometry.cxx:187
 TGeometry.cxx:188
 TGeometry.cxx:189
 TGeometry.cxx:190
 TGeometry.cxx:191
 TGeometry.cxx:192
 TGeometry.cxx:193
 TGeometry.cxx:194
 TGeometry.cxx:195
 TGeometry.cxx:196
 TGeometry.cxx:197
 TGeometry.cxx:198
 TGeometry.cxx:199
 TGeometry.cxx:200
 TGeometry.cxx:201
 TGeometry.cxx:202
 TGeometry.cxx:203
 TGeometry.cxx:204
 TGeometry.cxx:205
 TGeometry.cxx:206
 TGeometry.cxx:207
 TGeometry.cxx:208
 TGeometry.cxx:209
 TGeometry.cxx:210
 TGeometry.cxx:211
 TGeometry.cxx:212
 TGeometry.cxx:213
 TGeometry.cxx:214
 TGeometry.cxx:215
 TGeometry.cxx:216
 TGeometry.cxx:217
 TGeometry.cxx:218
 TGeometry.cxx:219
 TGeometry.cxx:220
 TGeometry.cxx:221
 TGeometry.cxx:222
 TGeometry.cxx:223
 TGeometry.cxx:224
 TGeometry.cxx:225
 TGeometry.cxx:226
 TGeometry.cxx:227
 TGeometry.cxx:228
 TGeometry.cxx:229
 TGeometry.cxx:230
 TGeometry.cxx:231
 TGeometry.cxx:232
 TGeometry.cxx:233
 TGeometry.cxx:234
 TGeometry.cxx:235
 TGeometry.cxx:236
 TGeometry.cxx:237
 TGeometry.cxx:238
 TGeometry.cxx:239
 TGeometry.cxx:240
 TGeometry.cxx:241
 TGeometry.cxx:242
 TGeometry.cxx:243
 TGeometry.cxx:244
 TGeometry.cxx:245
 TGeometry.cxx:246
 TGeometry.cxx:247
 TGeometry.cxx:248
 TGeometry.cxx:249
 TGeometry.cxx:250
 TGeometry.cxx:251
 TGeometry.cxx:252
 TGeometry.cxx:253
 TGeometry.cxx:254
 TGeometry.cxx:255
 TGeometry.cxx:256
 TGeometry.cxx:257
 TGeometry.cxx:258
 TGeometry.cxx:259
 TGeometry.cxx:260
 TGeometry.cxx:261
 TGeometry.cxx:262
 TGeometry.cxx:263
 TGeometry.cxx:264
 TGeometry.cxx:265
 TGeometry.cxx:266
 TGeometry.cxx:267
 TGeometry.cxx:268
 TGeometry.cxx:269
 TGeometry.cxx:270
 TGeometry.cxx:271
 TGeometry.cxx:272
 TGeometry.cxx:273
 TGeometry.cxx:274
 TGeometry.cxx:275
 TGeometry.cxx:276
 TGeometry.cxx:277
 TGeometry.cxx:278
 TGeometry.cxx:279
 TGeometry.cxx:280
 TGeometry.cxx:281
 TGeometry.cxx:282
 TGeometry.cxx:283
 TGeometry.cxx:284
 TGeometry.cxx:285
 TGeometry.cxx:286
 TGeometry.cxx:287
 TGeometry.cxx:288
 TGeometry.cxx:289
 TGeometry.cxx:290
 TGeometry.cxx:291
 TGeometry.cxx:292
 TGeometry.cxx:293
 TGeometry.cxx:294
 TGeometry.cxx:295
 TGeometry.cxx:296
 TGeometry.cxx:297
 TGeometry.cxx:298
 TGeometry.cxx:299
 TGeometry.cxx:300
 TGeometry.cxx:301
 TGeometry.cxx:302
 TGeometry.cxx:303
 TGeometry.cxx:304
 TGeometry.cxx:305
 TGeometry.cxx:306
 TGeometry.cxx:307
 TGeometry.cxx:308
 TGeometry.cxx:309
 TGeometry.cxx:310
 TGeometry.cxx:311
 TGeometry.cxx:312
 TGeometry.cxx:313
 TGeometry.cxx:314
 TGeometry.cxx:315
 TGeometry.cxx:316
 TGeometry.cxx:317
 TGeometry.cxx:318
 TGeometry.cxx:319
 TGeometry.cxx:320
 TGeometry.cxx:321
 TGeometry.cxx:322
 TGeometry.cxx:323
 TGeometry.cxx:324
 TGeometry.cxx:325
 TGeometry.cxx:326
 TGeometry.cxx:327
 TGeometry.cxx:328
 TGeometry.cxx:329
 TGeometry.cxx:330
 TGeometry.cxx:331
 TGeometry.cxx:332
 TGeometry.cxx:333
 TGeometry.cxx:334
 TGeometry.cxx:335
 TGeometry.cxx:336
 TGeometry.cxx:337
 TGeometry.cxx:338
 TGeometry.cxx:339
 TGeometry.cxx:340
 TGeometry.cxx:341
 TGeometry.cxx:342
 TGeometry.cxx:343
 TGeometry.cxx:344
 TGeometry.cxx:345
 TGeometry.cxx:346
 TGeometry.cxx:347
 TGeometry.cxx:348
 TGeometry.cxx:349
 TGeometry.cxx:350
 TGeometry.cxx:351
 TGeometry.cxx:352
 TGeometry.cxx:353
 TGeometry.cxx:354
 TGeometry.cxx:355
 TGeometry.cxx:356
 TGeometry.cxx:357
 TGeometry.cxx:358
 TGeometry.cxx:359
 TGeometry.cxx:360
 TGeometry.cxx:361
 TGeometry.cxx:362
 TGeometry.cxx:363
 TGeometry.cxx:364
 TGeometry.cxx:365
 TGeometry.cxx:366
 TGeometry.cxx:367
 TGeometry.cxx:368
 TGeometry.cxx:369
 TGeometry.cxx:370
 TGeometry.cxx:371
 TGeometry.cxx:372
 TGeometry.cxx:373
 TGeometry.cxx:374
 TGeometry.cxx:375
 TGeometry.cxx:376
 TGeometry.cxx:377
 TGeometry.cxx:378
 TGeometry.cxx:379
 TGeometry.cxx:380
 TGeometry.cxx:381
 TGeometry.cxx:382
 TGeometry.cxx:383
 TGeometry.cxx:384
 TGeometry.cxx:385
 TGeometry.cxx:386
 TGeometry.cxx:387
 TGeometry.cxx:388
 TGeometry.cxx:389
 TGeometry.cxx:390
 TGeometry.cxx:391
 TGeometry.cxx:392
 TGeometry.cxx:393
 TGeometry.cxx:394
 TGeometry.cxx:395
 TGeometry.cxx:396
 TGeometry.cxx:397
 TGeometry.cxx:398
 TGeometry.cxx:399
 TGeometry.cxx:400
 TGeometry.cxx:401
 TGeometry.cxx:402
 TGeometry.cxx:403
 TGeometry.cxx:404
 TGeometry.cxx:405
 TGeometry.cxx:406
 TGeometry.cxx:407
 TGeometry.cxx:408
 TGeometry.cxx:409
 TGeometry.cxx:410
 TGeometry.cxx:411
 TGeometry.cxx:412
 TGeometry.cxx:413
 TGeometry.cxx:414
 TGeometry.cxx:415
 TGeometry.cxx:416
 TGeometry.cxx:417
 TGeometry.cxx:418
 TGeometry.cxx:419
 TGeometry.cxx:420
 TGeometry.cxx:421
 TGeometry.cxx:422
 TGeometry.cxx:423
 TGeometry.cxx:424
 TGeometry.cxx:425
 TGeometry.cxx:426
 TGeometry.cxx:427
 TGeometry.cxx:428
 TGeometry.cxx:429
 TGeometry.cxx:430
 TGeometry.cxx:431
 TGeometry.cxx:432
 TGeometry.cxx:433
 TGeometry.cxx:434
 TGeometry.cxx:435
 TGeometry.cxx:436
 TGeometry.cxx:437
 TGeometry.cxx:438
 TGeometry.cxx:439
 TGeometry.cxx:440
 TGeometry.cxx:441
 TGeometry.cxx:442
 TGeometry.cxx:443
 TGeometry.cxx:444
 TGeometry.cxx:445
 TGeometry.cxx:446
 TGeometry.cxx:447
 TGeometry.cxx:448
 TGeometry.cxx:449
 TGeometry.cxx:450
 TGeometry.cxx:451
 TGeometry.cxx:452
 TGeometry.cxx:453
 TGeometry.cxx:454
 TGeometry.cxx:455
 TGeometry.cxx:456
 TGeometry.cxx:457
 TGeometry.cxx:458
 TGeometry.cxx:459
 TGeometry.cxx:460
 TGeometry.cxx:461
 TGeometry.cxx:462
 TGeometry.cxx:463
 TGeometry.cxx:464
 TGeometry.cxx:465
 TGeometry.cxx:466
 TGeometry.cxx:467
 TGeometry.cxx:468
 TGeometry.cxx:469
 TGeometry.cxx:470
 TGeometry.cxx:471
 TGeometry.cxx:472
 TGeometry.cxx:473
 TGeometry.cxx:474
 TGeometry.cxx:475
 TGeometry.cxx:476
 TGeometry.cxx:477
 TGeometry.cxx:478
 TGeometry.cxx:479
 TGeometry.cxx:480
 TGeometry.cxx:481
 TGeometry.cxx:482
 TGeometry.cxx:483
 TGeometry.cxx:484
 TGeometry.cxx:485
 TGeometry.cxx:486
 TGeometry.cxx:487
 TGeometry.cxx:488
 TGeometry.cxx:489
 TGeometry.cxx:490
 TGeometry.cxx:491
 TGeometry.cxx:492
 TGeometry.cxx:493
 TGeometry.cxx:494
 TGeometry.cxx:495
 TGeometry.cxx:496
 TGeometry.cxx:497
 TGeometry.cxx:498
 TGeometry.cxx:499
 TGeometry.cxx:500
 TGeometry.cxx:501
 TGeometry.cxx:502
 TGeometry.cxx:503
 TGeometry.cxx:504
 TGeometry.cxx:505
 TGeometry.cxx:506
 TGeometry.cxx:507
 TGeometry.cxx:508
 TGeometry.cxx:509
 TGeometry.cxx:510
 TGeometry.cxx:511
 TGeometry.cxx:512
 TGeometry.cxx:513
 TGeometry.cxx:514
 TGeometry.cxx:515
 TGeometry.cxx:516
 TGeometry.cxx:517
 TGeometry.cxx:518
 TGeometry.cxx:519
 TGeometry.cxx:520
 TGeometry.cxx:521
 TGeometry.cxx:522
 TGeometry.cxx:523
 TGeometry.cxx:524
 TGeometry.cxx:525
 TGeometry.cxx:526
 TGeometry.cxx:527
 TGeometry.cxx:528
 TGeometry.cxx:529
 TGeometry.cxx:530
 TGeometry.cxx:531
 TGeometry.cxx:532
 TGeometry.cxx:533
 TGeometry.cxx:534
 TGeometry.cxx:535
 TGeometry.cxx:536
 TGeometry.cxx:537
 TGeometry.cxx:538
 TGeometry.cxx:539
 TGeometry.cxx:540
 TGeometry.cxx:541
 TGeometry.cxx:542
 TGeometry.cxx:543
 TGeometry.cxx:544
 TGeometry.cxx:545
 TGeometry.cxx:546
 TGeometry.cxx:547
 TGeometry.cxx:548
 TGeometry.cxx:549
 TGeometry.cxx:550
 TGeometry.cxx:551
 TGeometry.cxx:552
 TGeometry.cxx:553
 TGeometry.cxx:554
 TGeometry.cxx:555
 TGeometry.cxx:556
 TGeometry.cxx:557
 TGeometry.cxx:558
 TGeometry.cxx:559
 TGeometry.cxx:560
 TGeometry.cxx:561
 TGeometry.cxx:562
 TGeometry.cxx:563
 TGeometry.cxx:564
 TGeometry.cxx:565
 TGeometry.cxx:566
 TGeometry.cxx:567
 TGeometry.cxx:568
 TGeometry.cxx:569
 TGeometry.cxx:570
 TGeometry.cxx:571
 TGeometry.cxx:572
 TGeometry.cxx:573
 TGeometry.cxx:574
 TGeometry.cxx:575
 TGeometry.cxx:576
 TGeometry.cxx:577
 TGeometry.cxx:578
 TGeometry.cxx:579
 TGeometry.cxx:580
 TGeometry.cxx:581
 TGeometry.cxx:582
 TGeometry.cxx:583
 TGeometry.cxx:584
 TGeometry.cxx:585
 TGeometry.cxx:586
 TGeometry.cxx:587
 TGeometry.cxx:588
 TGeometry.cxx:589
 TGeometry.cxx:590
 TGeometry.cxx:591
 TGeometry.cxx:592
 TGeometry.cxx:593
 TGeometry.cxx:594
 TGeometry.cxx:595
 TGeometry.cxx:596
 TGeometry.cxx:597
 TGeometry.cxx:598
 TGeometry.cxx:599
 TGeometry.cxx:600
 TGeometry.cxx:601
 TGeometry.cxx:602
 TGeometry.cxx:603
 TGeometry.cxx:604
 TGeometry.cxx:605
 TGeometry.cxx:606
 TGeometry.cxx:607
 TGeometry.cxx:608
 TGeometry.cxx:609
 TGeometry.cxx:610
 TGeometry.cxx:611
 TGeometry.cxx:612
 TGeometry.cxx:613
 TGeometry.cxx:614
 TGeometry.cxx:615
 TGeometry.cxx:616
 TGeometry.cxx:617
 TGeometry.cxx:618
 TGeometry.cxx:619
 TGeometry.cxx:620
 TGeometry.cxx:621
 TGeometry.cxx:622
 TGeometry.cxx:623
 TGeometry.cxx:624
 TGeometry.cxx:625
 TGeometry.cxx:626
 TGeometry.cxx:627
 TGeometry.cxx:628
 TGeometry.cxx:629
 TGeometry.cxx:630
 TGeometry.cxx:631
 TGeometry.cxx:632
 TGeometry.cxx:633
 TGeometry.cxx:634
 TGeometry.cxx:635
 TGeometry.cxx:636
 TGeometry.cxx:637
 TGeometry.cxx:638
 TGeometry.cxx:639
 TGeometry.cxx:640
 TGeometry.cxx:641
 TGeometry.cxx:642
 TGeometry.cxx:643
 TGeometry.cxx:644
 TGeometry.cxx:645
 TGeometry.cxx:646
 TGeometry.cxx:647
 TGeometry.cxx:648
 TGeometry.cxx:649
 TGeometry.cxx:650
 TGeometry.cxx:651
 TGeometry.cxx:652
 TGeometry.cxx:653
 TGeometry.cxx:654
 TGeometry.cxx:655
 TGeometry.cxx:656
 TGeometry.cxx:657
 TGeometry.cxx:658
 TGeometry.cxx:659
 TGeometry.cxx:660
 TGeometry.cxx:661
 TGeometry.cxx:662
 TGeometry.cxx:663
 TGeometry.cxx:664
 TGeometry.cxx:665
 TGeometry.cxx:666
 TGeometry.cxx:667
 TGeometry.cxx:668
 TGeometry.cxx:669
 TGeometry.cxx:670
 TGeometry.cxx:671
 TGeometry.cxx:672
 TGeometry.cxx:673
 TGeometry.cxx:674
 TGeometry.cxx:675
 TGeometry.cxx:676
 TGeometry.cxx:677
 TGeometry.cxx:678
 TGeometry.cxx:679
 TGeometry.cxx:680
 TGeometry.cxx:681
 TGeometry.cxx:682
 TGeometry.cxx:683
 TGeometry.cxx:684
 TGeometry.cxx:685
 TGeometry.cxx:686
 TGeometry.cxx:687
 TGeometry.cxx:688
 TGeometry.cxx:689
 TGeometry.cxx:690
 TGeometry.cxx:691
 TGeometry.cxx:692
 TGeometry.cxx:693
 TGeometry.cxx:694
 TGeometry.cxx:695
 TGeometry.cxx:696
 TGeometry.cxx:697
 TGeometry.cxx:698
 TGeometry.cxx:699
 TGeometry.cxx:700
 TGeometry.cxx:701
 TGeometry.cxx:702
 TGeometry.cxx:703
 TGeometry.cxx:704
 TGeometry.cxx:705
 TGeometry.cxx:706
 TGeometry.cxx:707
 TGeometry.cxx:708
 TGeometry.cxx:709
 TGeometry.cxx:710
 TGeometry.cxx:711
 TGeometry.cxx:712
 TGeometry.cxx:713
 TGeometry.cxx:714
 TGeometry.cxx:715
 TGeometry.cxx:716
 TGeometry.cxx:717
 TGeometry.cxx:718
 TGeometry.cxx:719
 TGeometry.cxx:720
 TGeometry.cxx:721
 TGeometry.cxx:722
 TGeometry.cxx:723
 TGeometry.cxx:724
 TGeometry.cxx:725
 TGeometry.cxx:726
 TGeometry.cxx:727
 TGeometry.cxx:728
 TGeometry.cxx:729
 TGeometry.cxx:730
 TGeometry.cxx:731
 TGeometry.cxx:732
 TGeometry.cxx:733
 TGeometry.cxx:734
 TGeometry.cxx:735
 TGeometry.cxx:736
 TGeometry.cxx:737
 TGeometry.cxx:738
 TGeometry.cxx:739
 TGeometry.cxx:740
 TGeometry.cxx:741