]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryModuleTransformer.h
Adding HLTbase to the list of libraries
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryModuleTransformer.h
CommitLineData
4f8b0abb 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
4/* $Id$ */
5// Revision of includes 07/05/2004
6
7/// \ingroup geometry
8/// \class AliMUONGeometryModuleTransformer
a9aad96e 9/// \brief Geometry transformer for a detector module
4f8b0abb 10///
c4ee792d 11/// Class for definition of the transformation for a detector module
a9aad96e 12/// and its detection elements
4f8b0abb 13///
a9aad96e 14/// \author Ivana Hrivnacova, IPN Orsay
4f8b0abb 15
f32e74e9 16#ifndef ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H
17#define ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H
4f8b0abb 18
19#include <TObject.h>
20#include <TString.h>
21
ab488200 22class AliMUONGeometryDetElement;
fa66b479 23
24class AliMpExMap;
ab488200 25
4f8b0abb 26class TGeoTranslation;
27class TGeoRotation;
ab488200 28class TGeoHMatrix;
4f8b0abb 29class TObjArray;
30class TArrayI;
31
4f8b0abb 32class AliMUONGeometryModuleTransformer : public TObject
33{
34 public:
35 AliMUONGeometryModuleTransformer(Int_t moduleId);
36 AliMUONGeometryModuleTransformer();
37 virtual ~AliMUONGeometryModuleTransformer();
38
fa66b479 39 // static methods
40 static TString GetModuleNamePrefix();
41
4f8b0abb 42 // methods
43 void Global2Local(Int_t detElemId,
44 Float_t xg, Float_t yg, Float_t zg,
45 Float_t& xl, Float_t& yl, Float_t& zl) const;
46 void Global2Local(Int_t detElemId,
47 Double_t xg, Double_t yg, Double_t zg,
48 Double_t& xl, Double_t& yl, Double_t& zl) const;
49
50 void Local2Global(Int_t detElemId,
51 Float_t xl, Float_t yl, Float_t zl,
52 Float_t& xg, Float_t& yg, Float_t& zg) const;
53 void Local2Global(Int_t detElemId,
54 Double_t xl, Double_t yl, Double_t zl,
55 Double_t& xg, Double_t& yg, Double_t& zg) const;
56
57 // set methods
ab488200 58 void SetTransformation(const TGeoHMatrix& transform);
59 void SetVolumePath(const TString& volumePath);
4f8b0abb 60
61 // get methods
ab488200 62 Int_t GetModuleId() const;
eb288296 63 TString GetModuleName() const;
ab488200 64 TString GetVolumePath() const;
65 TString GetVolumeName() const;
66 TString GetMotherVolumeName() const;
67
68 const TGeoHMatrix* GetTransformation() const;
fa66b479 69 AliMpExMap* GetDetElementStore() const;
70 AliMUONGeometryDetElement*
71 GetDetElement(Int_t detElemId, Bool_t warn = true) const;
4f8b0abb 72
73 protected:
71a2d3aa 74 /// Not implemented
4f8b0abb 75 AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs);
71a2d3aa 76 /// Not implemented
ab488200 77 AliMUONGeometryModuleTransformer&
78 operator = (const AliMUONGeometryModuleTransformer& rhs);
4f8b0abb 79
80 private:
eb288296 81 // static data members
71a2d3aa 82 static const TString fgkModuleNamePrefix; ///< Geometry module name prefix
eb288296 83
4f8b0abb 84 // data members
829425a5 85 Int_t fModuleId; ///< the module Id
eb288296 86 TString fModuleName; ///< the module name
829425a5 87 TString fVolumePath; ///< \brief the full path of aligned module volume
88 /// or envelope in geometry
89 TGeoHMatrix* fTransformation;///< \brief the module transformation wrt to top
a9aad96e 90 /// volume (world)
fa66b479 91 AliMpExMap* fDetElements; ///< detection elements
4f8b0abb 92
ab488200 93 ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class
4f8b0abb 94};
95
96// inline functions
97
fa66b479 98/// Return module name prefix
99inline TString
100AliMUONGeometryModuleTransformer::GetModuleNamePrefix()
101{ return fgkModuleNamePrefix; }
102
a9aad96e 103/// Set the full path of aligned module volume or envelope in geometry
ab488200 104inline void
105AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath)
106{ fVolumePath = volumePath; }
107
a9aad96e 108/// Return module ID
ab488200 109inline Int_t
110AliMUONGeometryModuleTransformer::GetModuleId() const
4f8b0abb 111{ return fModuleId; }
112
eb288296 113/// Return module name
114inline TString
115AliMUONGeometryModuleTransformer::GetModuleName() const
116{ return fModuleName; }
117
a9aad96e 118/// Return the full path of aligned module volume or envelope in geometry
ab488200 119inline TString
120AliMUONGeometryModuleTransformer::GetVolumePath() const
121{ return fVolumePath; }
122
a9aad96e 123/// Return the module transformation wrt to the top volume (world)
ab488200 124inline const TGeoHMatrix*
125AliMUONGeometryModuleTransformer::GetTransformation() const
4f8b0abb 126{ return fTransformation; }
127
a9aad96e 128/// Return detection elements associated with this module
fa66b479 129inline AliMpExMap*
ab488200 130AliMUONGeometryModuleTransformer::GetDetElementStore() const
4f8b0abb 131{ return fDetElements; }
132
f32e74e9 133#endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H