]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryModuleTransformer.h
Added class for Global Crate object (Christian)
[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);
1f687625 36 AliMUONGeometryModuleTransformer(TRootIOCtor* /*ioCtor*/);
4f8b0abb 37 virtual ~AliMUONGeometryModuleTransformer();
38
fa66b479 39 // static methods
40 static TString GetModuleNamePrefix();
1f687625 41 static TString GetModuleName(Int_t moduleId);
fa66b479 42
4f8b0abb 43 // methods
44 void Global2Local(Int_t detElemId,
45 Float_t xg, Float_t yg, Float_t zg,
46 Float_t& xl, Float_t& yl, Float_t& zl) const;
47 void Global2Local(Int_t detElemId,
48 Double_t xg, Double_t yg, Double_t zg,
49 Double_t& xl, Double_t& yl, Double_t& zl) const;
50
51 void Local2Global(Int_t detElemId,
52 Float_t xl, Float_t yl, Float_t zl,
53 Float_t& xg, Float_t& yg, Float_t& zg) const;
54 void Local2Global(Int_t detElemId,
55 Double_t xl, Double_t yl, Double_t zl,
56 Double_t& xg, Double_t& yg, Double_t& zg) const;
57
58 // set methods
ab488200 59 void SetTransformation(const TGeoHMatrix& transform);
60 void SetVolumePath(const TString& volumePath);
4f8b0abb 61
62 // get methods
ab488200 63 Int_t GetModuleId() const;
eb288296 64 TString GetModuleName() const;
ab488200 65 TString GetVolumePath() const;
66 TString GetVolumeName() const;
67 TString GetMotherVolumeName() const;
68
69 const TGeoHMatrix* GetTransformation() const;
fa66b479 70 AliMpExMap* GetDetElementStore() const;
71 AliMUONGeometryDetElement*
72 GetDetElement(Int_t detElemId, Bool_t warn = true) const;
4f8b0abb 73
74 protected:
1f687625 75 /// Not implemented
76 AliMUONGeometryModuleTransformer();
71a2d3aa 77 /// Not implemented
4f8b0abb 78 AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs);
71a2d3aa 79 /// Not implemented
ab488200 80 AliMUONGeometryModuleTransformer&
81 operator = (const AliMUONGeometryModuleTransformer& rhs);
4f8b0abb 82
83 private:
eb288296 84 // static data members
71a2d3aa 85 static const TString fgkModuleNamePrefix; ///< Geometry module name prefix
eb288296 86
4f8b0abb 87 // data members
829425a5 88 Int_t fModuleId; ///< the module Id
eb288296 89 TString fModuleName; ///< the module name
829425a5 90 TString fVolumePath; ///< \brief the full path of aligned module volume
91 /// or envelope in geometry
92 TGeoHMatrix* fTransformation;///< \brief the module transformation wrt to top
a9aad96e 93 /// volume (world)
fa66b479 94 AliMpExMap* fDetElements; ///< detection elements
4f8b0abb 95
ab488200 96 ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class
4f8b0abb 97};
98
99// inline functions
100
fa66b479 101/// Return module name prefix
102inline TString
103AliMUONGeometryModuleTransformer::GetModuleNamePrefix()
104{ return fgkModuleNamePrefix; }
105
a9aad96e 106/// Set the full path of aligned module volume or envelope in geometry
ab488200 107inline void
108AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath)
109{ fVolumePath = volumePath; }
110
a9aad96e 111/// Return module ID
ab488200 112inline Int_t
113AliMUONGeometryModuleTransformer::GetModuleId() const
4f8b0abb 114{ return fModuleId; }
115
eb288296 116/// Return module name
117inline TString
118AliMUONGeometryModuleTransformer::GetModuleName() const
119{ return fModuleName; }
120
a9aad96e 121/// Return the full path of aligned module volume or envelope in geometry
ab488200 122inline TString
123AliMUONGeometryModuleTransformer::GetVolumePath() const
124{ return fVolumePath; }
125
a9aad96e 126/// Return the module transformation wrt to the top volume (world)
ab488200 127inline const TGeoHMatrix*
128AliMUONGeometryModuleTransformer::GetTransformation() const
4f8b0abb 129{ return fTransformation; }
130
a9aad96e 131/// Return detection elements associated with this module
fa66b479 132inline AliMpExMap*
ab488200 133AliMUONGeometryModuleTransformer::GetDetElementStore() const
4f8b0abb 134{ return fDetElements; }
135
f32e74e9 136#endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H