]>
Commit | Line | Data |
---|---|---|
e118b27e | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
4 | // $Id$ | |
692de412 | 5 | |
6 | /// \ingroup geometry | |
7 | /// \class AliMUONGeometryDetElement | |
8c0e3489 | 8 | /// \brief Class for storing detection element transformations |
692de412 | 9 | /// |
a9aad96e | 10 | /// \author Ivana Hrivnacova, IPN Orsay |
e118b27e | 11 | |
12 | #ifndef ALI_MUON_GEOMETRY_DET_ELEMENT_H | |
13 | #define ALI_MUON_GEOMETRY_DET_ELEMENT_H | |
14 | ||
15 | #include <TObject.h> | |
8c0e3489 | 16 | #include <TString.h> |
e118b27e | 17 | |
8c0e3489 | 18 | class TGeoHMatrix; |
e118b27e | 19 | |
20 | class AliMUONGeometryDetElement : public TObject | |
21 | { | |
22 | public: | |
23 | AliMUONGeometryDetElement(Int_t detElemId, | |
8c0e3489 | 24 | const TString& volumePath); |
e118b27e | 25 | AliMUONGeometryDetElement(); |
26 | virtual ~AliMUONGeometryDetElement(); | |
27 | ||
28 | // methods | |
29 | void Global2Local( | |
30 | Float_t xg, Float_t yg, Float_t zg, | |
31 | Float_t& xl, Float_t& yl, Float_t& zl) const; | |
32 | void Global2Local( | |
33 | Double_t xg, Double_t yg, Double_t zg, | |
34 | Double_t& xl, Double_t& yl, Double_t& zl) const; | |
35 | ||
36 | void Local2Global( | |
37 | Float_t xl, Float_t yl, Float_t zl, | |
38 | Float_t& xg, Float_t& yg, Float_t& zg) const; | |
39 | void Local2Global( | |
40 | Double_t xl, Double_t yl, Double_t zl, | |
41 | Double_t& xg, Double_t& yg, Double_t& zg) const; | |
42 | void PrintLocalTransform() const; | |
43 | void PrintGlobalTransform() const; | |
44 | ||
45 | // set methods | |
8c0e3489 | 46 | void SetLocalTransformation(const TGeoHMatrix& transform); |
47 | void SetGlobalTransformation(const TGeoHMatrix& transform); | |
48 | void SetVolumePath(const TString& volumePath); | |
e118b27e | 49 | |
50 | // get methods | |
8c0e3489 | 51 | Int_t GetId() const; |
e9a283f7 | 52 | TString GetDEName() const; |
8c0e3489 | 53 | TString GetVolumePath() const; |
54 | TString GetVolumeName() const; | |
55 | Int_t GetVolumeCopyNo() const; | |
56 | const TGeoHMatrix* GetLocalTransformation() const; | |
57 | const TGeoHMatrix* GetGlobalTransformation() const; | |
e118b27e | 58 | |
59 | protected: | |
60 | AliMUONGeometryDetElement(const AliMUONGeometryDetElement& rhs); | |
e118b27e | 61 | AliMUONGeometryDetElement& operator = (const AliMUONGeometryDetElement& rhs); |
62 | ||
63 | private: | |
64 | // methods | |
8c0e3489 | 65 | void PrintTransform(const TGeoHMatrix* transform) const; |
e9a283f7 | 66 | |
67 | // static data members | |
68 | static const TString fgkDENamePrefix; /// < Geometry module name prefix | |
69 | ||
e118b27e | 70 | // data members |
e9a283f7 | 71 | TString fDEName; ///< detection element name |
829425a5 | 72 | TString fVolumePath; ///< \brief the full path of aligned volume |
73 | /// or envelope in geometry | |
74 | TGeoHMatrix* fLocalTransformation; ///< the transformation wrt module | |
75 | TGeoHMatrix* fGlobalTransformation; ///< the transformation wrt world | |
e118b27e | 76 | |
8c0e3489 | 77 | ClassDef(AliMUONGeometryDetElement,2) // MUON det element transformations |
e118b27e | 78 | }; |
79 | ||
80 | // inline functions | |
81 | ||
a9aad96e | 82 | /// Set the full path of the aligned volume or envelope in geometry |
8c0e3489 | 83 | inline void AliMUONGeometryDetElement::SetVolumePath(const TString& volumePath) |
84 | { fVolumePath = volumePath; } | |
85 | ||
a9aad96e | 86 | /// Return detection element ID |
e118b27e | 87 | inline Int_t AliMUONGeometryDetElement::GetId() const |
88 | { return GetUniqueID(); } | |
89 | ||
e9a283f7 | 90 | /// Return detection element ID |
91 | inline TString AliMUONGeometryDetElement::GetDEName() const | |
92 | { return fDEName; } | |
93 | ||
a9aad96e | 94 | /// Return the full path of the aligned volume or envelope in geometry |
8c0e3489 | 95 | inline TString AliMUONGeometryDetElement::GetVolumePath() const |
96 | { return fVolumePath; } | |
e118b27e | 97 | |
a9aad96e | 98 | /// Return the detection element transformation wrt module |
8c0e3489 | 99 | inline const TGeoHMatrix* |
e118b27e | 100 | AliMUONGeometryDetElement::GetLocalTransformation() const |
101 | { return fLocalTransformation; } | |
102 | ||
a9aad96e | 103 | /// Return the detection element transformation wrt world |
8c0e3489 | 104 | inline const TGeoHMatrix* |
e118b27e | 105 | AliMUONGeometryDetElement::GetGlobalTransformation() const |
106 | { return fGlobalTransformation; } | |
107 | ||
108 | #endif //ALI_MUON_GEOMETRY_DET_ELEMENT_H |