]>
Commit | Line | Data |
---|---|---|
afc8e661 | 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 AliMUONGeometryTransformer | |
8 | /// \brief Top container class for geometry transformations | |
9 | /// | |
10 | /// Author: Ivana Hrivnacova, IPN Orsay | |
11 | ||
12 | #ifndef ALI_MUON_GEOMETRY_TRANSFORMER_H | |
13 | #define ALI_MUON_GEOMETRY_TRANSFORMER_H | |
14 | ||
15 | #include <TObject.h> | |
16 | #include <TGeoMatrix.h> | |
17 | ||
18 | class TObjArray; | |
19 | ||
20 | class AliMUONGeometryModuleTransformer; | |
21 | ||
22 | class AliMUONGeometryTransformer : public TObject | |
23 | { | |
24 | public: | |
25 | AliMUONGeometryTransformer(Bool_t isOwner); | |
26 | AliMUONGeometryTransformer(); | |
27 | virtual ~AliMUONGeometryTransformer(); | |
28 | ||
29 | // methods | |
30 | void AddModuleTransformer(AliMUONGeometryModuleTransformer* transformer); | |
31 | ||
32 | // IO | |
33 | Bool_t ReadTransformations(const TString& fileName); | |
34 | Bool_t WriteTransformations(const TString& fileName) const; | |
35 | ||
36 | // transformation methods | |
37 | void Global2Local(Int_t detElemId, | |
38 | Float_t xg, Float_t yg, Float_t zg, | |
39 | Float_t& xl, Float_t& yl, Float_t& zl) const; | |
40 | void Global2Local(Int_t detElemId, | |
41 | Double_t xg, Double_t yg, Double_t zg, | |
42 | Double_t& xl, Double_t& yl, Double_t& zl) const; | |
43 | ||
44 | void Local2Global(Int_t detElemId, | |
45 | Float_t xl, Float_t yl, Float_t zl, | |
46 | Float_t& xg, Float_t& yg, Float_t& zg) const; | |
47 | void Local2Global(Int_t detElemId, | |
48 | Double_t xl, Double_t yl, Double_t zl, | |
49 | Double_t& xg, Double_t& yg, Double_t& zg) const; | |
50 | ||
51 | // get methods | |
52 | const AliMUONGeometryModuleTransformer* GetModuleTransformer( | |
53 | Int_t index, Bool_t warn = true) const; | |
54 | ||
55 | const AliMUONGeometryModuleTransformer* GetModuleTransformerByDEId( | |
56 | Int_t detElemId, Bool_t warn = true) const; | |
57 | ||
317aa7dc | 58 | Bool_t HasDE(Int_t detElemId) const; |
59 | ||
afc8e661 | 60 | protected: |
61 | AliMUONGeometryTransformer(const AliMUONGeometryTransformer& right); | |
62 | AliMUONGeometryTransformer& operator = (const AliMUONGeometryTransformer& right); | |
63 | ||
64 | private: | |
65 | // methods | |
66 | AliMUONGeometryModuleTransformer* GetModuleTransformerNonConst( | |
67 | Int_t index, Bool_t warn = true) const; | |
68 | TString ComposePath(const TString& volName, Int_t copyNo) const; | |
69 | ||
70 | TGeoHMatrix GetTransform( | |
71 | Double_t x, Double_t y, Double_t z, | |
72 | Double_t a1, Double_t a2, Double_t a3, | |
73 | Double_t a4, Double_t a5, Double_t a6) const; | |
74 | void FillData(Int_t moduleId, | |
75 | Double_t x, Double_t y, Double_t z, | |
76 | Double_t a1, Double_t a2, Double_t a3, | |
77 | Double_t a4, Double_t a5, Double_t a6); | |
78 | void FillData(Int_t id, const TString& volName, Int_t copyNo, | |
79 | Double_t x, Double_t y, Double_t z, | |
80 | Double_t a1, Double_t a2, Double_t a3, | |
81 | Double_t a4, Double_t a5, Double_t a6); | |
82 | ||
83 | TString ReadData1(ifstream& in); | |
84 | TString ReadData2(ifstream& in); | |
85 | ||
86 | void WriteTransform(ofstream& out, const TGeoCombiTrans* transform) const; | |
87 | void WriteData1(ofstream& out) const; | |
88 | void WriteData2(ofstream& out) const; | |
89 | ||
90 | // data members | |
91 | TObjArray* fModuleTransformers; // list of module transformers | |
92 | ||
93 | ClassDef(AliMUONGeometryTransformer,1) // Geometry parametrisation | |
94 | }; | |
95 | ||
96 | #endif //ALI_MUON_GEOMETRY_TRANSFORMER_H | |
97 | ||
98 | ||
99 | ||
100 | ||
101 | ||
102 | ||
103 |