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 transformation for a detector 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(TRootIOCtor* /*ioCtor*/);
37 virtual ~AliMUONGeometryModuleTransformer();
40 static TString GetModuleNamePrefix();
41 static TString GetModuleName(Int_t moduleId);
44 void Global2Local(Int_t detElemId,
45 Float_t xg, Float_t yg, Float_t zg,
46 Float_t& xl, Float_t& yl, Float_t& zl) const;
47 void Global2Local(Int_t detElemId,
48 Double_t xg, Double_t yg, Double_t zg,
49 Double_t& xl, Double_t& yl, Double_t& zl) const;
51 void Local2Global(Int_t detElemId,
52 Float_t xl, Float_t yl, Float_t zl,
53 Float_t& xg, Float_t& yg, Float_t& zg) const;
54 void Local2Global(Int_t detElemId,
55 Double_t xl, Double_t yl, Double_t zl,
56 Double_t& xg, Double_t& yg, Double_t& zg) const;
59 void SetTransformation(const TGeoHMatrix& transform);
60 void SetVolumePath(const TString& volumePath);
63 Int_t GetModuleId() const;
64 TString GetModuleName() const;
65 TString GetVolumePath() const;
66 TString GetVolumeName() const;
67 TString GetMotherVolumeName() const;
69 const TGeoHMatrix* GetTransformation() const;
70 AliMpExMap* GetDetElementStore() const;
71 AliMUONGeometryDetElement*
72 GetDetElement(Int_t detElemId, Bool_t warn = true) const;
76 AliMUONGeometryModuleTransformer();
78 AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs);
80 AliMUONGeometryModuleTransformer&
81 operator = (const AliMUONGeometryModuleTransformer& rhs);
84 // static data members
85 static const TString fgkModuleNamePrefix; ///< Geometry module name prefix
88 Int_t fModuleId; ///< the module Id
89 TString fModuleName; ///< the module name
90 TString fVolumePath; ///< \brief the full path of aligned module volume
91 /// or envelope in geometry
92 TGeoHMatrix* fTransformation;///< \brief the module transformation wrt to top
94 AliMpExMap* fDetElements; ///< detection elements
96 ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class
101 /// Return module name prefix
103 AliMUONGeometryModuleTransformer::GetModuleNamePrefix()
104 { return fgkModuleNamePrefix; }
106 /// Set the full path of aligned module volume or envelope in geometry
108 AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath)
109 { fVolumePath = volumePath; }
113 AliMUONGeometryModuleTransformer::GetModuleId() const
114 { return fModuleId; }
116 /// Return module name
118 AliMUONGeometryModuleTransformer::GetModuleName() const
119 { return fModuleName; }
121 /// Return the full path of aligned module volume or envelope in geometry
123 AliMUONGeometryModuleTransformer::GetVolumePath() const
124 { return fVolumePath; }
126 /// Return the module transformation wrt to the top volume (world)
127 inline const TGeoHMatrix*
128 AliMUONGeometryModuleTransformer::GetTransformation() const
129 { return fTransformation; }
131 /// Return detection elements associated with this module
133 AliMUONGeometryModuleTransformer::GetDetElementStore() const
134 { return fDetElements; }
136 #endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H