]>
Commit | Line | Data |
---|---|---|
d4bb94a1 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | // $Id$ | |
692de412 | 5 | |
6 | /// \ingroup geometry | |
7 | /// \class AliMUONGeometryBuilder | |
8 | /// \brief Manager class for geometry construction via geometry builders. | |
9 | /// | |
10 | /// Author: Ivana Hrivnacova, IPN Orsay | |
d4bb94a1 | 11 | |
e118b27e | 12 | #ifndef ALI_MUON_GEOMETRY_BUILDER_H |
13 | #define ALI_MUON_GEOMETRY_BUILDER_H | |
14 | ||
d4bb94a1 | 15 | #include <TObject.h> |
e118b27e | 16 | #include <TGeoMatrix.h> |
d4bb94a1 | 17 | |
9a6c488e | 18 | #include "AliMUONGeometry.h" |
19 | ||
d4bb94a1 | 20 | class TObjArray; |
21 | ||
e118b27e | 22 | class AliModule; |
d4bb94a1 | 23 | class AliMUONVGeometryBuilder; |
24 | ||
25 | class AliMUONGeometryBuilder : public TObject | |
26 | { | |
27 | public: | |
e118b27e | 28 | AliMUONGeometryBuilder(AliModule* detector); |
d4bb94a1 | 29 | AliMUONGeometryBuilder(); |
d4bb94a1 | 30 | virtual ~AliMUONGeometryBuilder(); |
067866a3 | 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); | |
d4bb94a1 | 38 | |
e118b27e | 39 | // methods |
40 | void AddBuilder(AliMUONVGeometryBuilder* geomBuilder); | |
d4bb94a1 | 41 | void CreateGeometry(); |
42 | void CreateMaterials(); | |
9a6c488e | 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; | |
76497dec | 52 | |
53 | // Alignement | |
54 | virtual Bool_t GetAlign() const; | |
55 | virtual void SetAlign(Bool_t align); | |
d4bb94a1 | 56 | |
d4bb94a1 | 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; | |
8618c022 | 66 | void SetAlign(AliMUONVGeometryBuilder* builder); |
d4bb94a1 | 67 | |
68 | // data members | |
9a6c488e | 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 | |
d4bb94a1 | 76 | |
e118b27e | 77 | ClassDef(AliMUONGeometryBuilder,4) // Geometry builder |
d4bb94a1 | 78 | }; |
79 | ||
76497dec | 80 | // inline functions |
81 | ||
9a6c488e | 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 | ||
76497dec | 90 | inline Bool_t AliMUONGeometryBuilder::GetAlign() const |
91 | { return fAlign; } | |
92 | ||
d4bb94a1 | 93 | #endif //ALI_MUON_GEOMETRY_BUILDER_H |
94 | ||
95 | ||
96 | ||
97 | ||
98 | ||
99 | ||
100 |