1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
7 /// \class AliMUONGeometryDetElement
8 /// \brief Class for storing detection element transformations
10 /// \author Ivana Hrivnacova, IPN Orsay
12 #ifndef ALI_MUON_GEOMETRY_DET_ELEMENT_H
13 #define ALI_MUON_GEOMETRY_DET_ELEMENT_H
20 class AliMUONGeometryDetElement : public TObject
23 AliMUONGeometryDetElement(Int_t detElemId);
24 AliMUONGeometryDetElement(Int_t detElemId, const TString& volumePath);
25 AliMUONGeometryDetElement(TRootIOCtor* /*ioCtor*/);
26 virtual ~AliMUONGeometryDetElement();
29 static TString GetDENamePrefix();
30 static TString GetDEName(Int_t detElemId);
34 Float_t xg, Float_t yg, Float_t zg,
35 Float_t& xl, Float_t& yl, Float_t& zl) const;
37 Double_t xg, Double_t yg, Double_t zg,
38 Double_t& xl, Double_t& yl, Double_t& zl) const;
41 Float_t xl, Float_t yl, Float_t zl,
42 Float_t& xg, Float_t& yg, Float_t& zg) const;
44 Double_t xl, Double_t yl, Double_t zl,
45 Double_t& xg, Double_t& yg, Double_t& zg) const;
46 void PrintLocalTransform() const;
47 void PrintGlobalTransform() const;
50 void SetLocalTransformation(const TGeoHMatrix& transform);
51 void SetGlobalTransformation(const TGeoHMatrix& transform);
52 void SetVolumePath(const TString& volumePath);
56 TString GetDEName() const;
57 TString GetVolumePath() const;
58 TString GetVolumeName() const;
59 Int_t GetVolumeCopyNo() const;
60 const TGeoHMatrix* GetLocalTransformation() const;
61 const TGeoHMatrix* GetGlobalTransformation() const;
65 AliMUONGeometryDetElement();
67 AliMUONGeometryDetElement(const AliMUONGeometryDetElement& rhs);
69 AliMUONGeometryDetElement& operator = (const AliMUONGeometryDetElement& rhs);
73 void PrintTransform(const TGeoHMatrix* transform) const;
75 // static data members
76 static const TString fgkDENamePrefix;///< Geometry module name prefix
79 TString fDEName; ///< detection element name
80 TString fVolumePath; ///< \brief the full path of aligned volume
81 /// or envelope in geometry
82 TGeoHMatrix* fLocalTransformation; ///< the transformation wrt module
83 TGeoHMatrix* fGlobalTransformation; ///< the transformation wrt world
85 ClassDef(AliMUONGeometryDetElement,2) // MUON det element transformations
90 /// Return module name prefix
91 inline TString AliMUONGeometryDetElement::GetDENamePrefix()
92 { return fgkDENamePrefix; }
94 /// Set the full path of the aligned volume or envelope in geometry
95 inline void AliMUONGeometryDetElement::SetVolumePath(const TString& volumePath)
96 { fVolumePath = volumePath; }
98 /// Return detection element ID
99 inline Int_t AliMUONGeometryDetElement::GetId() const
100 { return GetUniqueID(); }
102 /// Return detection element ID
103 inline TString AliMUONGeometryDetElement::GetDEName() const
106 /// Return the full path of the aligned volume or envelope in geometry
107 inline TString AliMUONGeometryDetElement::GetVolumePath() const
108 { return fVolumePath; }
110 /// Return the detection element transformation wrt module
111 inline const TGeoHMatrix*
112 AliMUONGeometryDetElement::GetLocalTransformation() const
113 { return fLocalTransformation; }
115 /// Return the detection element transformation wrt world
116 inline const TGeoHMatrix*
117 AliMUONGeometryDetElement::GetGlobalTransformation() const
118 { return fGlobalTransformation; }
120 #endif //ALI_MUON_GEOMETRY_DET_ELEMENT_H