]>
Commit | Line | Data |
---|---|---|
1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | /* $Id$ */ | |
5 | // Revision of includes 07/05/2004 | |
6 | ||
7 | /// \ingroup geometry | |
8 | /// \class AliMUONGeometryModuleTransformer | |
9 | /// \brief Geometry transformer for a detector module | |
10 | /// | |
11 | /// Class for definition of the trasformation for adetector module | |
12 | /// and its detection elements | |
13 | /// | |
14 | /// \author Ivana Hrivnacova, IPN Orsay | |
15 | ||
16 | #ifndef ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H | |
17 | #define ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H | |
18 | ||
19 | #include <TObject.h> | |
20 | #include <TString.h> | |
21 | ||
22 | class AliMUONGeometryDetElement; | |
23 | class AliMUONGeometryStore; | |
24 | ||
25 | class TGeoTranslation; | |
26 | class TGeoRotation; | |
27 | class TGeoHMatrix; | |
28 | class TObjArray; | |
29 | class TArrayI; | |
30 | ||
31 | class AliMUONGeometryModuleTransformer : public TObject | |
32 | { | |
33 | public: | |
34 | AliMUONGeometryModuleTransformer(Int_t moduleId); | |
35 | AliMUONGeometryModuleTransformer(); | |
36 | virtual ~AliMUONGeometryModuleTransformer(); | |
37 | ||
38 | // methods | |
39 | void Global2Local(Int_t detElemId, | |
40 | Float_t xg, Float_t yg, Float_t zg, | |
41 | Float_t& xl, Float_t& yl, Float_t& zl) const; | |
42 | void Global2Local(Int_t detElemId, | |
43 | Double_t xg, Double_t yg, Double_t zg, | |
44 | Double_t& xl, Double_t& yl, Double_t& zl) const; | |
45 | ||
46 | void Local2Global(Int_t detElemId, | |
47 | Float_t xl, Float_t yl, Float_t zl, | |
48 | Float_t& xg, Float_t& yg, Float_t& zg) const; | |
49 | void Local2Global(Int_t detElemId, | |
50 | Double_t xl, Double_t yl, Double_t zl, | |
51 | Double_t& xg, Double_t& yg, Double_t& zg) const; | |
52 | ||
53 | // set methods | |
54 | void SetTransformation(const TGeoHMatrix& transform); | |
55 | void SetVolumePath(const TString& volumePath); | |
56 | ||
57 | // get methods | |
58 | Int_t GetModuleId() const; | |
59 | TString GetVolumePath() const; | |
60 | TString GetVolumeName() const; | |
61 | TString GetMotherVolumeName() const; | |
62 | ||
63 | const TGeoHMatrix* GetTransformation() const; | |
64 | ||
65 | AliMUONGeometryStore* GetDetElementStore() const; | |
66 | AliMUONGeometryDetElement* GetDetElement( | |
67 | Int_t detElemId, Bool_t warn = true) const; | |
68 | ||
69 | protected: | |
70 | AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs); | |
71 | AliMUONGeometryModuleTransformer& | |
72 | operator = (const AliMUONGeometryModuleTransformer& rhs); | |
73 | ||
74 | private: | |
75 | // data members | |
76 | Int_t fModuleId; ///< the module Id | |
77 | TString fVolumePath; ///< \brief the full path of aligned module volume | |
78 | /// or envelope in geometry | |
79 | TGeoHMatrix* fTransformation;///< \brief the module transformation wrt to top | |
80 | /// volume (world) | |
81 | AliMUONGeometryStore* fDetElements; ///< detection elements | |
82 | ||
83 | ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class | |
84 | }; | |
85 | ||
86 | // inline functions | |
87 | ||
88 | /// Set the full path of aligned module volume or envelope in geometry | |
89 | inline void | |
90 | AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath) | |
91 | { fVolumePath = volumePath; } | |
92 | ||
93 | /// Return module ID | |
94 | inline Int_t | |
95 | AliMUONGeometryModuleTransformer::GetModuleId() const | |
96 | { return fModuleId; } | |
97 | ||
98 | /// Return the full path of aligned module volume or envelope in geometry | |
99 | inline TString | |
100 | AliMUONGeometryModuleTransformer::GetVolumePath() const | |
101 | { return fVolumePath; } | |
102 | ||
103 | /// Return the module transformation wrt to the top volume (world) | |
104 | inline const TGeoHMatrix* | |
105 | AliMUONGeometryModuleTransformer::GetTransformation() const | |
106 | { return fTransformation; } | |
107 | ||
108 | /// Return detection elements associated with this module | |
109 | inline AliMUONGeometryStore* | |
110 | AliMUONGeometryModuleTransformer::GetDetElementStore() const | |
111 | { return fDetElements; } | |
112 | ||
113 | #endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H |