]>
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 | /// |
a9aad96e | 11 | /// Class for definition of the trasformation for adetector module |
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; |
23 | class AliMUONGeometryStore; | |
24 | ||
4f8b0abb | 25 | class TGeoTranslation; |
26 | class TGeoRotation; | |
ab488200 | 27 | class TGeoHMatrix; |
4f8b0abb | 28 | class TObjArray; |
29 | class TArrayI; | |
30 | ||
4f8b0abb | 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 | |
ab488200 | 54 | void SetTransformation(const TGeoHMatrix& transform); |
55 | void SetVolumePath(const TString& volumePath); | |
4f8b0abb | 56 | |
57 | // get methods | |
ab488200 | 58 | Int_t GetModuleId() const; |
59 | TString GetVolumePath() const; | |
60 | TString GetVolumeName() const; | |
61 | TString GetMotherVolumeName() const; | |
62 | ||
63 | const TGeoHMatrix* GetTransformation() const; | |
4f8b0abb | 64 | |
65 | AliMUONGeometryStore* GetDetElementStore() const; | |
b75f649b | 66 | AliMUONGeometryDetElement* GetDetElement( |
67 | Int_t detElemId, Bool_t warn = true) const; | |
4f8b0abb | 68 | |
69 | protected: | |
70 | AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs); | |
ab488200 | 71 | AliMUONGeometryModuleTransformer& |
72 | operator = (const AliMUONGeometryModuleTransformer& rhs); | |
4f8b0abb | 73 | |
74 | private: | |
75 | // data members | |
829425a5 | 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 | |
a9aad96e | 80 | /// volume (world) |
829425a5 | 81 | AliMUONGeometryStore* fDetElements; ///< detection elements |
4f8b0abb | 82 | |
ab488200 | 83 | ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class |
4f8b0abb | 84 | }; |
85 | ||
86 | // inline functions | |
87 | ||
a9aad96e | 88 | /// Set the full path of aligned module volume or envelope in geometry |
ab488200 | 89 | inline void |
90 | AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath) | |
91 | { fVolumePath = volumePath; } | |
92 | ||
a9aad96e | 93 | /// Return module ID |
ab488200 | 94 | inline Int_t |
95 | AliMUONGeometryModuleTransformer::GetModuleId() const | |
4f8b0abb | 96 | { return fModuleId; } |
97 | ||
a9aad96e | 98 | /// Return the full path of aligned module volume or envelope in geometry |
ab488200 | 99 | inline TString |
100 | AliMUONGeometryModuleTransformer::GetVolumePath() const | |
101 | { return fVolumePath; } | |
102 | ||
a9aad96e | 103 | /// Return the module transformation wrt to the top volume (world) |
ab488200 | 104 | inline const TGeoHMatrix* |
105 | AliMUONGeometryModuleTransformer::GetTransformation() const | |
4f8b0abb | 106 | { return fTransformation; } |
107 | ||
a9aad96e | 108 | /// Return detection elements associated with this module |
ab488200 | 109 | inline AliMUONGeometryStore* |
110 | AliMUONGeometryModuleTransformer::GetDetElementStore() const | |
4f8b0abb | 111 | { return fDetElements; } |
112 | ||
f32e74e9 | 113 | #endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H |