]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryDetElement.h
More code clean up.
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryDetElement.h
CommitLineData
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 18class TGeoHMatrix;
e118b27e 19
20class AliMUONGeometryDetElement : public TObject
21{
22 public:
ccc0dd0a 23 AliMUONGeometryDetElement(Int_t detElemId);
24 AliMUONGeometryDetElement(Int_t detElemId, const TString& volumePath);
25 AliMUONGeometryDetElement(TRootIOCtor* /*ioCtor*/);
e118b27e 26 virtual ~AliMUONGeometryDetElement();
27
4bbe3e21 28 // static methods
29 static TString GetDENamePrefix();
ccc0dd0a 30 static TString GetDEName(Int_t detElemId);
4bbe3e21 31
e118b27e 32 // methods
33 void Global2Local(
34 Float_t xg, Float_t yg, Float_t zg,
35 Float_t& xl, Float_t& yl, Float_t& zl) const;
36 void Global2Local(
37 Double_t xg, Double_t yg, Double_t zg,
38 Double_t& xl, Double_t& yl, Double_t& zl) const;
39
40 void Local2Global(
41 Float_t xl, Float_t yl, Float_t zl,
42 Float_t& xg, Float_t& yg, Float_t& zg) const;
43 void Local2Global(
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;
48
49 // set methods
450ca6fb 50 void SetLocalTransformation(const TGeoHMatrix& transform, Bool_t warn = true);
51 void SetGlobalTransformation(const TGeoHMatrix& transform, Bool_t warn = true);
8c0e3489 52 void SetVolumePath(const TString& volumePath);
e118b27e 53
54 // get methods
8c0e3489 55 Int_t GetId() const;
e9a283f7 56 TString GetDEName() const;
8c0e3489 57 TString GetVolumePath() const;
58 TString GetVolumeName() const;
59 Int_t GetVolumeCopyNo() const;
60 const TGeoHMatrix* GetLocalTransformation() const;
61 const TGeoHMatrix* GetGlobalTransformation() const;
e118b27e 62
63 protected:
ccc0dd0a 64 /// Not implemented
65 AliMUONGeometryDetElement();
71a2d3aa 66 /// Not implemented
e118b27e 67 AliMUONGeometryDetElement(const AliMUONGeometryDetElement& rhs);
71a2d3aa 68 /// Not implemented
e118b27e 69 AliMUONGeometryDetElement& operator = (const AliMUONGeometryDetElement& rhs);
70
71 private:
72 // methods
8c0e3489 73 void PrintTransform(const TGeoHMatrix* transform) const;
e9a283f7 74
75 // static data members
ccc0dd0a 76 static const TString fgkDENamePrefix;///< Geometry module name prefix
e9a283f7 77
e118b27e 78 // data members
e9a283f7 79 TString fDEName; ///< detection element name
829425a5 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
e118b27e 84
8c0e3489 85 ClassDef(AliMUONGeometryDetElement,2) // MUON det element transformations
e118b27e 86};
87
88// inline functions
89
4bbe3e21 90/// Return module name prefix
91inline TString AliMUONGeometryDetElement::GetDENamePrefix()
92{ return fgkDENamePrefix; }
93
a9aad96e 94/// Set the full path of the aligned volume or envelope in geometry
8c0e3489 95inline void AliMUONGeometryDetElement::SetVolumePath(const TString& volumePath)
96{ fVolumePath = volumePath; }
97
a9aad96e 98/// Return detection element ID
e118b27e 99inline Int_t AliMUONGeometryDetElement::GetId() const
100{ return GetUniqueID(); }
101
e9a283f7 102/// Return detection element ID
103inline TString AliMUONGeometryDetElement::GetDEName() const
104{ return fDEName; }
105
a9aad96e 106/// Return the full path of the aligned volume or envelope in geometry
8c0e3489 107inline TString AliMUONGeometryDetElement::GetVolumePath() const
108{ return fVolumePath; }
e118b27e 109
a9aad96e 110/// Return the detection element transformation wrt module
8c0e3489 111inline const TGeoHMatrix*
e118b27e 112AliMUONGeometryDetElement::GetLocalTransformation() const
113{ return fLocalTransformation; }
114
a9aad96e 115/// Return the detection element transformation wrt world
8c0e3489 116inline const TGeoHMatrix*
e118b27e 117AliMUONGeometryDetElement::GetGlobalTransformation() const
118{ return fGlobalTransformation; }
119
120#endif //ALI_MUON_GEOMETRY_DET_ELEMENT_H