]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONGeometryDetElement.h
New RAW I/O. I rolled my own, because I wasn't happy with the old
[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///
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
28 // methods
29 void Global2Local(
30 Float_t xg, Float_t yg, Float_t zg,
31 Float_t& xl, Float_t& yl, Float_t& zl) const;
32 void Global2Local(
33 Double_t xg, Double_t yg, Double_t zg,
34 Double_t& xl, Double_t& yl, Double_t& zl) const;
35
36 void Local2Global(
37 Float_t xl, Float_t yl, Float_t zl,
38 Float_t& xg, Float_t& yg, Float_t& zg) const;
39 void Local2Global(
40 Double_t xl, Double_t yl, Double_t zl,
41 Double_t& xg, Double_t& yg, Double_t& zg) const;
42 void PrintLocalTransform() const;
43 void PrintGlobalTransform() const;
44
45 // set methods
8c0e3489 46 void SetLocalTransformation(const TGeoHMatrix& transform);
47 void SetGlobalTransformation(const TGeoHMatrix& transform);
48 void SetVolumePath(const TString& volumePath);
e118b27e 49
50 // get methods
8c0e3489 51 Int_t GetId() const;
52 TString GetVolumePath() const;
53 TString GetVolumeName() const;
54 Int_t GetVolumeCopyNo() const;
55 const TGeoHMatrix* GetLocalTransformation() const;
56 const TGeoHMatrix* GetGlobalTransformation() const;
e118b27e 57
58 protected:
59 AliMUONGeometryDetElement(const AliMUONGeometryDetElement& rhs);
60
61 // operators
62 AliMUONGeometryDetElement& operator = (const AliMUONGeometryDetElement& rhs);
63
64 private:
65 // methods
8c0e3489 66 void PrintTransform(const TGeoHMatrix* transform) const;
e118b27e 67
68 // data members
8c0e3489 69 TString fVolumePath; // the full path of aligned volume or envelope
70 // in geometry
71 TGeoHMatrix* fLocalTransformation; // the transformation wrt module
72 TGeoHMatrix* fGlobalTransformation; // the transformation wrt world
e118b27e 73
8c0e3489 74 ClassDef(AliMUONGeometryDetElement,2) // MUON det element transformations
e118b27e 75};
76
77// inline functions
78
8c0e3489 79inline void AliMUONGeometryDetElement::SetVolumePath(const TString& volumePath)
80{ fVolumePath = volumePath; }
81
e118b27e 82inline Int_t AliMUONGeometryDetElement::GetId() const
83{ return GetUniqueID(); }
84
8c0e3489 85inline TString AliMUONGeometryDetElement::GetVolumePath() const
86{ return fVolumePath; }
e118b27e 87
8c0e3489 88inline const TGeoHMatrix*
e118b27e 89AliMUONGeometryDetElement::GetLocalTransformation() const
90{ return fLocalTransformation; }
91
8c0e3489 92inline const TGeoHMatrix*
e118b27e 93AliMUONGeometryDetElement::GetGlobalTransformation() const
94{ return fGlobalTransformation; }
95
96#endif //ALI_MUON_GEOMETRY_DET_ELEMENT_H