]> git.uio.no Git - u/mrichter/AliRoot.git/blob - GEODB/AliGeometry.h
Some function moved to AliZDC
[u/mrichter/AliRoot.git] / GEODB / AliGeometry.h
1 #ifndef ALIGEOMETRY_H
2 #define ALIGEOMETRY_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id$ */
7
8 // -*- C++ -*-
9 // 
10 // 1999/01/05
11 // ---------------------------------------------------------------------------
12 //
13 // AliGeometry Class
14 //
15 // This file is part of the ALICE Geometry Database .
16 //
17 // Author:  Joana E. Santo
18 //
19 // ---------------------------------------------------------------------------
20 // The Geometry class holds the detector,s geometry. Essentially it has a pointer
21 // to the Top Level AliGNode and an array of pointers to rules that specify the
22 // complete desgn below that node.
23
24 #include <TFile.h>
25 #include <TNamed.h>
26 #include <TObjString.h>
27 #include <TList.h>
28 #include "AliGNode.h"
29
30 const Int_t kMAXLEVELS  = 20;
31 const Int_t kMatrixSize = 16;
32 const Int_t kVectorSize =  4;
33
34 class AliGeometry: public TNamed {
35
36     protected:
37         Float_t  fBomb;     //Bomb factor for exploded geometry
38         Int_t    fGeomLevel;
39         Int_t    fMaxDepth;
40         TList*   fRules;
41         TString  fTopNode;
42         TList*   fTransformation;
43
44     public:
45         AliGeometry( Text_t* name, Text_t* title, AliGNode* topNode, int maxDepth=0 ); // Constructor
46         AliGeometry( AliGeometry* Geom=NULL ); // Copy or Default Constructor
47         virtual ~AliGeometry(); // Destructor
48         AliGeometry* operator=( const AliGeometry* Geom );
49
50                 TList*       GetfTransf() const {return fTransformation;}
51                 Float_t      GetBomb() const {return fBomb;}
52                 TString      GetTop() const {return fTopNode;}
53                 TList*       GetRules() const {return fRules;}
54                 AliGNode*    FileToMemTree( TFile* file );
55                 //AliGNode*   FileToMemTree( Text_t* root_file, Text_t* geom_file );
56                 void         Local2Master( Float_t *local, Float_t *master);
57         virtual Int_t        PopLevel(){return fGeomLevel>0?fGeomLevel--:0;}
58         virtual Int_t        PushLevel(){return fGeomLevel++;}
59                 TVector*     PopMatrix();
60                 void         PushMatrix(TVector* matrix);
61                 AliGNode*    RecurToMem( const char* node_name, TFile* file, AliGNode* father, char* subtransf );
62                 void         RulesList( TList *fRules, AliGNode* node, int position );
63         virtual void         SetBomb(Float_t bomb=1.4) {fBomb = bomb;}
64                 void         UpdateMatrix(AliGTransform* trans);
65
66
67     ClassDef(AliGeometry,1) //Generic Geometry class
68 };
69
70 R__EXTERN AliGeometry *gAliGeometry;
71 R__EXTERN TVector* gMatrix;
72
73 #endif