]>
Commit | Line | Data |
---|---|---|
4f8b0abb | 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 | |
a9aad96e | 9 | /// \brief Geometry transformer for a detector module |
4f8b0abb | 10 | /// |
c4ee792d | 11 | /// Class for definition of the transformation for a detector module |
a9aad96e | 12 | /// and its detection elements |
4f8b0abb | 13 | /// |
a9aad96e | 14 | /// \author Ivana Hrivnacova, IPN Orsay |
4f8b0abb | 15 | |
f32e74e9 | 16 | #ifndef ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H |
17 | #define ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H | |
4f8b0abb | 18 | |
19 | #include <TObject.h> | |
20 | #include <TString.h> | |
21 | ||
ab488200 | 22 | class AliMUONGeometryDetElement; |
fa66b479 | 23 | |
24 | class AliMpExMap; | |
ab488200 | 25 | |
4f8b0abb | 26 | class TGeoTranslation; |
27 | class TGeoRotation; | |
ab488200 | 28 | class TGeoHMatrix; |
4f8b0abb | 29 | class TObjArray; |
30 | class TArrayI; | |
31 | ||
4f8b0abb | 32 | class AliMUONGeometryModuleTransformer : public TObject |
33 | { | |
34 | public: | |
35 | AliMUONGeometryModuleTransformer(Int_t moduleId); | |
1f687625 | 36 | AliMUONGeometryModuleTransformer(TRootIOCtor* /*ioCtor*/); |
4f8b0abb | 37 | virtual ~AliMUONGeometryModuleTransformer(); |
38 | ||
fa66b479 | 39 | // static methods |
31edb2d7 | 40 | static const TString& GetModuleNamePrefix(); |
41 | static TString GetModuleName(Int_t moduleId); | |
fa66b479 | 42 | |
4f8b0abb | 43 | // methods |
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; | |
50 | ||
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; | |
57 | ||
58 | // set methods | |
ab488200 | 59 | void SetTransformation(const TGeoHMatrix& transform); |
60 | void SetVolumePath(const TString& volumePath); | |
4f8b0abb | 61 | |
62 | // get methods | |
ab488200 | 63 | Int_t GetModuleId() const; |
eb288296 | 64 | TString GetModuleName() const; |
ab488200 | 65 | TString GetVolumePath() const; |
66 | TString GetVolumeName() const; | |
67 | TString GetMotherVolumeName() const; | |
68 | ||
69 | const TGeoHMatrix* GetTransformation() const; | |
fa66b479 | 70 | AliMpExMap* GetDetElementStore() const; |
71 | AliMUONGeometryDetElement* | |
72 | GetDetElement(Int_t detElemId, Bool_t warn = true) const; | |
4f8b0abb | 73 | |
74 | protected: | |
1f687625 | 75 | /// Not implemented |
76 | AliMUONGeometryModuleTransformer(); | |
71a2d3aa | 77 | /// Not implemented |
4f8b0abb | 78 | AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs); |
71a2d3aa | 79 | /// Not implemented |
ab488200 | 80 | AliMUONGeometryModuleTransformer& |
81 | operator = (const AliMUONGeometryModuleTransformer& rhs); | |
4f8b0abb | 82 | |
83 | private: | |
84 | // data members | |
829425a5 | 85 | Int_t fModuleId; ///< the module Id |
eb288296 | 86 | TString fModuleName; ///< the module name |
829425a5 | 87 | TString fVolumePath; ///< \brief the full path of aligned module volume |
88 | /// or envelope in geometry | |
89 | TGeoHMatrix* fTransformation;///< \brief the module transformation wrt to top | |
a9aad96e | 90 | /// volume (world) |
fa66b479 | 91 | AliMpExMap* fDetElements; ///< detection elements |
4f8b0abb | 92 | |
ab488200 | 93 | ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class |
4f8b0abb | 94 | }; |
95 | ||
96 | // inline functions | |
97 | ||
a9aad96e | 98 | /// Set the full path of aligned module volume or envelope in geometry |
ab488200 | 99 | inline void |
100 | AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath) | |
101 | { fVolumePath = volumePath; } | |
102 | ||
a9aad96e | 103 | /// Return module ID |
ab488200 | 104 | inline Int_t |
105 | AliMUONGeometryModuleTransformer::GetModuleId() const | |
4f8b0abb | 106 | { return fModuleId; } |
107 | ||
eb288296 | 108 | /// Return module name |
109 | inline TString | |
110 | AliMUONGeometryModuleTransformer::GetModuleName() const | |
111 | { return fModuleName; } | |
112 | ||
a9aad96e | 113 | /// Return the full path of aligned module volume or envelope in geometry |
ab488200 | 114 | inline TString |
115 | AliMUONGeometryModuleTransformer::GetVolumePath() const | |
116 | { return fVolumePath; } | |
117 | ||
a9aad96e | 118 | /// Return the module transformation wrt to the top volume (world) |
ab488200 | 119 | inline const TGeoHMatrix* |
120 | AliMUONGeometryModuleTransformer::GetTransformation() const | |
4f8b0abb | 121 | { return fTransformation; } |
122 | ||
a9aad96e | 123 | /// Return detection elements associated with this module |
fa66b479 | 124 | inline AliMpExMap* |
ab488200 | 125 | AliMUONGeometryModuleTransformer::GetDetElementStore() const |
4f8b0abb | 126 | { return fDetElements; } |
127 | ||
f32e74e9 | 128 | #endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H |