- Revised comments and adapted them for Doxygen
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryDetElement.h
... / ...
CommitLineData
1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4// $Id$
5
6/// \ingroup geometry
7/// \class AliMUONGeometryDetElement
8/// \brief Class for storing detection element transformations
9///
10/// \author Ivana Hrivnacova, IPN Orsay
11
12#ifndef ALI_MUON_GEOMETRY_DET_ELEMENT_H
13#define ALI_MUON_GEOMETRY_DET_ELEMENT_H
14
15#include <TObject.h>
16#include <TString.h>
17
18class TGeoHMatrix;
19
20class AliMUONGeometryDetElement : public TObject
21{
22 public:
23 AliMUONGeometryDetElement(Int_t detElemId,
24 const TString& volumePath);
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
46 void SetLocalTransformation(const TGeoHMatrix& transform);
47 void SetGlobalTransformation(const TGeoHMatrix& transform);
48 void SetVolumePath(const TString& volumePath);
49
50 // get methods
51 Int_t GetId() const;
52 TString GetVolumePath() const;
53 TString GetVolumeName() const;
54 Int_t GetVolumeCopyNo() const;
55 const TGeoHMatrix* GetLocalTransformation() const;
56 const TGeoHMatrix* GetGlobalTransformation() const;
57
58 protected:
59 AliMUONGeometryDetElement(const AliMUONGeometryDetElement& rhs);
60 AliMUONGeometryDetElement& operator = (const AliMUONGeometryDetElement& rhs);
61
62 private:
63 // methods
64 void PrintTransform(const TGeoHMatrix* transform) const;
65
66 // data members
67 TString fVolumePath; ///< \brief the full path of aligned volume
68 /// or envelope in geometry
69 TGeoHMatrix* fLocalTransformation; ///< the transformation wrt module
70 TGeoHMatrix* fGlobalTransformation; ///< the transformation wrt world
71
72 ClassDef(AliMUONGeometryDetElement,2) // MUON det element transformations
73};
74
75// inline functions
76
77/// Set the full path of the aligned volume or envelope in geometry
78inline void AliMUONGeometryDetElement::SetVolumePath(const TString& volumePath)
79{ fVolumePath = volumePath; }
80
81/// Return detection element ID
82inline Int_t AliMUONGeometryDetElement::GetId() const
83{ return GetUniqueID(); }
84
85/// Return the full path of the aligned volume or envelope in geometry
86inline TString AliMUONGeometryDetElement::GetVolumePath() const
87{ return fVolumePath; }
88
89/// Return the detection element transformation wrt module
90inline const TGeoHMatrix*
91AliMUONGeometryDetElement::GetLocalTransformation() const
92{ return fLocalTransformation; }
93
94/// Return the detection element transformation wrt world
95inline const TGeoHMatrix*
96AliMUONGeometryDetElement::GetGlobalTransformation() const
97{ return fGlobalTransformation; }
98
99#endif //ALI_MUON_GEOMETRY_DET_ELEMENT_H