1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // Revision of includes 07/05/2004
8 /// \class AliMUONGeometryModuleTransformer
9 /// \brief Geometry transformer for a detector module
11 /// Class for definition of the trasformation for adetector module
12 /// and its detection elements
14 /// \author Ivana Hrivnacova, IPN Orsay
16 #ifndef ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H
17 #define ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H
22 class AliMUONGeometryDetElement;
26 class TGeoTranslation;
32 class AliMUONGeometryModuleTransformer : public TObject
35 AliMUONGeometryModuleTransformer(Int_t moduleId);
36 AliMUONGeometryModuleTransformer();
37 virtual ~AliMUONGeometryModuleTransformer();
40 static TString GetModuleNamePrefix();
43 void Global2Local(Int_t detElemId,
44 Float_t xg, Float_t yg, Float_t zg,
45 Float_t& xl, Float_t& yl, Float_t& zl) const;
46 void Global2Local(Int_t detElemId,
47 Double_t xg, Double_t yg, Double_t zg,
48 Double_t& xl, Double_t& yl, Double_t& zl) const;
50 void Local2Global(Int_t detElemId,
51 Float_t xl, Float_t yl, Float_t zl,
52 Float_t& xg, Float_t& yg, Float_t& zg) const;
53 void Local2Global(Int_t detElemId,
54 Double_t xl, Double_t yl, Double_t zl,
55 Double_t& xg, Double_t& yg, Double_t& zg) const;
58 void SetTransformation(const TGeoHMatrix& transform);
59 void SetVolumePath(const TString& volumePath);
62 Int_t GetModuleId() const;
63 TString GetModuleName() const;
64 TString GetVolumePath() const;
65 TString GetVolumeName() const;
66 TString GetMotherVolumeName() const;
68 const TGeoHMatrix* GetTransformation() const;
69 AliMpExMap* GetDetElementStore() const;
70 AliMUONGeometryDetElement*
71 GetDetElement(Int_t detElemId, Bool_t warn = true) const;
74 AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs);
75 AliMUONGeometryModuleTransformer&
76 operator = (const AliMUONGeometryModuleTransformer& rhs);
79 // static data members
80 static const TString fgkModuleNamePrefix; /// < Geometry module name prefix
83 Int_t fModuleId; ///< the module Id
84 TString fModuleName; ///< the module name
85 TString fVolumePath; ///< \brief the full path of aligned module volume
86 /// or envelope in geometry
87 TGeoHMatrix* fTransformation;///< \brief the module transformation wrt to top
89 AliMpExMap* fDetElements; ///< detection elements
91 ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class
96 /// Return module name prefix
98 AliMUONGeometryModuleTransformer::GetModuleNamePrefix()
99 { return fgkModuleNamePrefix; }
101 /// Set the full path of aligned module volume or envelope in geometry
103 AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath)
104 { fVolumePath = volumePath; }
108 AliMUONGeometryModuleTransformer::GetModuleId() const
109 { return fModuleId; }
111 /// Return module name
113 AliMUONGeometryModuleTransformer::GetModuleName() const
114 { return fModuleName; }
116 /// Return the full path of aligned module volume or envelope in geometry
118 AliMUONGeometryModuleTransformer::GetVolumePath() const
119 { return fVolumePath; }
121 /// Return the module transformation wrt to the top volume (world)
122 inline const TGeoHMatrix*
123 AliMUONGeometryModuleTransformer::GetTransformation() const
124 { return fTransformation; }
126 /// Return detection elements associated with this module
128 AliMUONGeometryModuleTransformer::GetDetElementStore() const
129 { return fDetElements; }
131 #endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H