AliRoot Core  da88d91 (da88d91)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONGeometryDetElement.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 // $Id$
5 
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 
18 class TGeoHMatrix;
19 
20 class AliMUONGeometryDetElement : public TObject
21 {
22  public:
23  AliMUONGeometryDetElement(Int_t detElemId);
24  AliMUONGeometryDetElement(Int_t detElemId, const TString& volumePath);
25  AliMUONGeometryDetElement(TRootIOCtor* /*ioCtor*/);
27 
28  // static methods
29  static const TString& GetDENamePrefix();
30  static TString GetDEName(Int_t detElemId);
31 
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
50  void SetLocalTransformation(const TGeoHMatrix& transform, Bool_t warn = true);
51  void SetGlobalTransformation(const TGeoHMatrix& transform, Bool_t warn = true);
52  void SetVolumePath(const TString& volumePath);
53 
54  // get methods
55  Int_t GetId() const;
56  TString GetDEName() const;
57  TString GetVolumePath() const;
58  TString GetVolumeName() const;
59  Int_t GetVolumeCopyNo() const;
60  const TGeoHMatrix* GetLocalTransformation() const;
61  const TGeoHMatrix* GetGlobalTransformation() const;
62 
63  protected:
70 
71  private:
72  // methods
73  void PrintTransform(const TGeoHMatrix* transform) const;
74 
75  // data members
76  TString fDEName;
77  TString fVolumePath;
78  TGeoHMatrix* fLocalTransformation;
80  TGeoHMatrix* fGlobalTransformation;
81 
82  ClassDef(AliMUONGeometryDetElement,2) // MUON det element transformations
83 };
84 
85 // inline functions
86 
88 inline void AliMUONGeometryDetElement::SetVolumePath(const TString& volumePath)
89 { fVolumePath = volumePath; }
90 
93 { return GetUniqueID(); }
94 
97 { return fDEName; }
98 
101 { return fVolumePath; }
102 
104 inline const TGeoHMatrix*
106 { return fLocalTransformation; }
107 
109 inline const TGeoHMatrix*
111 { return fGlobalTransformation; }
112 
113 #endif //ALI_MUON_GEOMETRY_DET_ELEMENT_H
AliMUONGeometryDetElement()
Not implemented.
void Local2Global(Float_t xl, Float_t yl, Float_t zl, Float_t &xg, Float_t &yg, Float_t &zg) const
TString fDEName
detection element name
AliMUONGeometryDetElement & operator=(const AliMUONGeometryDetElement &rhs)
Not implemented.
Int_t GetId() const
Return detection element ID.
TString GetVolumePath() const
Return the full path of the aligned volume or envelope in geometry.
void SetVolumePath(const TString &volumePath)
Set the full path of the aligned volume or envelope in geometry.
void Global2Local(Float_t xg, Float_t yg, Float_t zg, Float_t &xl, Float_t &yl, Float_t &zl) const
void SetGlobalTransformation(const TGeoHMatrix &transform, Bool_t warn=true)
TString GetDEName() const
Return detection element ID.
const TGeoHMatrix * GetGlobalTransformation() const
Return the detection element transformation wrt world.
static const TString & GetDENamePrefix()
void SetLocalTransformation(const TGeoHMatrix &transform, Bool_t warn=true)
TGeoHMatrix * fLocalTransformation
the transformation wrt module
void PrintTransform(const TGeoHMatrix *transform) const
TString fVolumePath
the full path of aligned volume or envelope in geometry
Class for storing detection element transformations.
TGeoHMatrix * fGlobalTransformation
the transformation wrt world
const TGeoHMatrix * GetLocalTransformation() const
Return the detection element transformation wrt module.