]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometryModuleTransformer.h
Correcting preprocessor variable (ALI_MUON_GEOMETRY_MODULE_TRANSFORMS_H)
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryModuleTransformer.h
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
9 /// \brief Geometry transformationer for detector module
10 ///
11 /// Class for definition of the detector module parameters
12 /// (the transformations of detection elements, mapping between
13 ///  sensitive volumes and detection elements).
14 ///
15 /// Author: Ivana Hrivnacova, IPN Orsay
16
17 #ifndef ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H
18 #define ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H
19
20 #include <TObject.h>
21 #include <TString.h>
22
23 class AliMUONGeometryDetElement;
24 class AliMUONGeometryStore;
25
26 class TGeoTranslation;
27 class TGeoRotation;
28 class TGeoHMatrix;
29 class TObjArray;
30 class TArrayI;
31
32 class AliMUONGeometryModuleTransformer : public TObject
33 {
34   public:
35     AliMUONGeometryModuleTransformer(Int_t moduleId);
36     AliMUONGeometryModuleTransformer();
37     virtual ~AliMUONGeometryModuleTransformer();
38
39     // methods
40     void Global2Local(Int_t detElemId,
41                  Float_t xg, Float_t yg, Float_t zg, 
42                  Float_t& xl, Float_t& yl, Float_t& zl) const;
43     void Global2Local(Int_t detElemId,
44                  Double_t xg, Double_t yg, Double_t zg, 
45                  Double_t& xl, Double_t& yl, Double_t& zl) const;
46
47     void Local2Global(Int_t detElemId,
48                  Float_t xl, Float_t yl, Float_t zl, 
49                  Float_t& xg, Float_t& yg, Float_t& zg) const;
50     void Local2Global(Int_t detElemId,
51                  Double_t xl, Double_t yl, Double_t zl, 
52                  Double_t& xg, Double_t& yg, Double_t& zg) const;
53
54     // set methods
55     void  SetTransformation(const TGeoHMatrix& transform);
56     void  SetVolumePath(const TString& volumePath);
57  
58     // get methods
59     Int_t    GetModuleId() const;
60     TString  GetVolumePath() const;
61     TString  GetVolumeName() const;
62     TString  GetMotherVolumeName() const;
63
64     const TGeoHMatrix*  GetTransformation() const;    
65
66     AliMUONGeometryStore*       GetDetElementStore() const;
67     AliMUONGeometryDetElement*  GetDetElement(
68                                    Int_t detElemId, Bool_t warn = true) const;    
69
70   protected:
71     AliMUONGeometryModuleTransformer(const AliMUONGeometryModuleTransformer& rhs);
72     // operators  
73     AliMUONGeometryModuleTransformer& 
74       operator = (const AliMUONGeometryModuleTransformer& rhs);
75
76   private:
77     // data members
78     Int_t                 fModuleId;   // the module Id
79     TString               fVolumePath; // the full path of aligned module volume
80                                        // or envelope in geometry
81     TGeoHMatrix*          fTransformation;// the module transformation wrt to top
82                                           // volume
83     AliMUONGeometryStore* fDetElements;   // detection elements
84  
85   ClassDef(AliMUONGeometryModuleTransformer,3) // MUON geometry module class
86 };
87
88 // inline functions
89
90 inline void 
91 AliMUONGeometryModuleTransformer::SetVolumePath(const TString& volumePath)
92 { fVolumePath = volumePath; }
93
94 inline Int_t  
95 AliMUONGeometryModuleTransformer::GetModuleId() const
96 { return fModuleId; }
97
98 inline TString 
99 AliMUONGeometryModuleTransformer::GetVolumePath() const
100 { return fVolumePath; }
101
102 inline const TGeoHMatrix* 
103 AliMUONGeometryModuleTransformer::GetTransformation() const 
104 { return fTransformation; }
105
106 inline  AliMUONGeometryStore* 
107 AliMUONGeometryModuleTransformer::GetDetElementStore() const
108 { return fDetElements; }
109
110 #endif //ALI_MUON_GEOMETRY_MODULE_TRANSFORMER_H