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