]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometryBuilder.h
Removing FillGlobalTransformations() private method
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryBuilder.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5
6 /// \ingroup geometry
7 /// \class AliMUONGeometryBuilder
8 /// \brief Manager class for geometry construction via geometry builders.
9 ///
10 /// Author: Ivana Hrivnacova, IPN Orsay
11
12 #ifndef ALI_MUON_GEOMETRY_BUILDER_H
13 #define ALI_MUON_GEOMETRY_BUILDER_H
14
15 #include <TObject.h>
16 #include <TGeoMatrix.h>
17
18 #include "AliMUONGeometry.h"
19
20 class TObjArray;
21
22 class AliModule;
23 class AliMUONVGeometryBuilder;
24
25 class AliMUONGeometryBuilder : public TObject 
26 {
27   public:
28     AliMUONGeometryBuilder(AliModule* detector);
29     AliMUONGeometryBuilder();
30     virtual  ~AliMUONGeometryBuilder();
31     
32     // static methods
33     static TGeoHMatrix Multiply(const TGeoMatrix& m1, const TGeoMatrix& m2); 
34     static TGeoHMatrix Multiply(const TGeoMatrix& m1, const TGeoMatrix& m2,
35                                 const TGeoMatrix& m3); 
36     static TGeoHMatrix Multiply(const TGeoMatrix& m1, const TGeoMatrix& m2,
37                                 const TGeoMatrix& m3, const TGeoMatrix& m4); 
38
39     // methods
40     void  AddBuilder(AliMUONVGeometryBuilder* geomBuilder);
41     void  CreateGeometry();
42     void  CreateMaterials();
43     void  InitGeometry(const TString& svmapFileName = "svmap.dat");
44     void  ReadTransformations(const TString& fileName = "transform.dat");
45     void  WriteTransformations(const TString& fileName = "transform.dat.out");
46     void  WriteSVMaps(Bool_t rebuild = true, 
47                       const TString& fileName = "svmap.dat.out");
48     
49     // Geometry parametrisation
50     const AliMUONGeometry*            GetGeometry() const;
51     const AliMUONGeometryTransformer* GetTransformer() const;
52
53     // Alignement
54     virtual Bool_t  GetAlign() const;
55     virtual void    SetAlign(Bool_t align);
56  
57   protected:
58     AliMUONGeometryBuilder(const AliMUONGeometryBuilder& right);
59     AliMUONGeometryBuilder&  operator = (const AliMUONGeometryBuilder& right);
60  
61   private:
62     // method
63     void PlaceVolume(const TString& name, const TString& mName, Int_t copyNo, 
64              const TGeoHMatrix& matrix, Int_t npar, Double_t* param,
65              const char* only) const;
66     void SetAlign(AliMUONVGeometryBuilder* builder);         
67
68     // data members
69     AliModule*       fModule;              // the AliRoot module
70     Bool_t           fAlign;               // option to read transformations 
71                                            // from a file
72     TGeoCombiTrans   fGlobalTransformation;// global transformation 
73                                            // applied to the whole geometry 
74     TObjArray*       fGeometryBuilders;    // list of Geometry Builders
75     AliMUONGeometry* fGeometry;            // geometry parametrisation
76
77   ClassDef(AliMUONGeometryBuilder,4)  // Geometry builder
78 };
79
80 // inline functions
81
82 inline 
83 const AliMUONGeometry* AliMUONGeometryBuilder::GetGeometry() const
84 { return fGeometry; }
85
86 inline 
87 const AliMUONGeometryTransformer* AliMUONGeometryBuilder::GetTransformer() const
88 { return fGeometry->GetTransformer(); }
89
90 inline Bool_t  AliMUONGeometryBuilder::GetAlign() const
91 { return fAlign; }
92
93 #endif //ALI_MUON_GEOMETRY_BUILDER_H
94
95
96
97
98
99
100