]>
Commit | Line | Data |
---|---|---|
e118b27e | 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 | // | |
8 | // Class AliMUONGeometryModule | |
9 | // ----------------------------- | |
10 | // Class for definition of the detector module parameters | |
11 | // (the transformations of detection elements, mapping between | |
12 | // sensitive volumes and detection elements). | |
13 | // | |
14 | // Author: Ivana Hrivnacova, IPN Orsay | |
15 | ||
16 | #ifndef ALI_MUON_MODULE_GEOMETRY_H | |
17 | #define ALI_MUON_MODULE_GEOMETRY_H | |
18 | ||
19 | #include <TObject.h> | |
20 | #include <TString.h> | |
21 | ||
22 | class TGeoTranslation; | |
23 | class TGeoRotation; | |
24 | class TGeoCombiTrans; | |
25 | class TObjArray; | |
26 | class TArrayI; | |
27 | ||
28 | class AliMUONGeometryEnvelope; | |
29 | class AliMUONGeometryEnvelopeStore; | |
30 | class AliMUONGeometryDetElement; | |
31 | class AliMUONGeometryStore; | |
32 | class AliMUONGeometrySVMap; | |
33 | class AliMUONVGeometryDEIndexing; | |
34 | ||
35 | class AliMUONGeometryModule : public TObject | |
36 | { | |
37 | public: | |
38 | AliMUONGeometryModule(Int_t moduleId); | |
39 | AliMUONGeometryModule(); | |
40 | virtual ~AliMUONGeometryModule(); | |
41 | ||
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 | |
58 | void SetMotherVolume(const TString& motherVolumeName); | |
59 | void SetTranslation(const TGeoTranslation& translation); | |
60 | void SetRotation(const TGeoRotation& rotation); | |
61 | ||
62 | void SetSensitiveVolume(Int_t volId); | |
63 | void SetSensitiveVolume(const TString& name); | |
64 | void SetAlign(Bool_t align); | |
65 | ||
66 | // get methods | |
67 | Int_t GetModuleId() const; | |
68 | TString GetMotherVolume() const; | |
69 | const TGeoCombiTrans* GetTransformation() const; | |
70 | AliMUONGeometryDetElement* FindBySensitiveVolume( | |
71 | const TString& volumePath) const; | |
72 | AliMUONVGeometryDEIndexing* GetDEIndexing() const; | |
73 | AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const; | |
74 | AliMUONGeometryStore* GetDetElementStore() const; | |
75 | AliMUONGeometryDetElement* GetDetElement(Int_t detElemId) const; | |
76 | AliMUONGeometrySVMap* GetSVMap() const; | |
77 | Bool_t IsSensitiveVolume(Int_t volId) const; | |
78 | Bool_t IsSensitiveVolume(const TString& volName) const; | |
79 | ||
80 | protected: | |
81 | AliMUONGeometryModule(const AliMUONGeometryModule& rhs); | |
82 | // operators | |
83 | AliMUONGeometryModule& operator = (const AliMUONGeometryModule& rhs); | |
84 | ||
85 | private: | |
86 | // methods | |
87 | Int_t GetSVIndex(Int_t svVolId) const; | |
88 | ||
89 | // data members | |
90 | Int_t fModuleId; // the module Id | |
91 | TString fMotherVolume; // mother volume name | |
92 | Int_t fNofSVs; // number of sensitive volumes | |
93 | TArrayI* fSVVolumeIds; // densitive volumes IDs | |
94 | TGeoCombiTrans* fTransformation;// the module transformation wrt to mother | |
95 | // volume | |
96 | AliMUONGeometryEnvelopeStore* fEnvelopes; // envelopes | |
97 | AliMUONVGeometryDEIndexing* fDEIndexing; // DE indexing | |
98 | AliMUONGeometryStore* fDetElements;// detection elements | |
99 | AliMUONGeometrySVMap* fSVMap; // sensitive volumes map | |
100 | ||
101 | ClassDef(AliMUONGeometryModule,2) // MUON geometry module class | |
102 | }; | |
103 | ||
104 | // inline functions | |
105 | ||
106 | inline void | |
107 | AliMUONGeometryModule::SetMotherVolume(const TString& motherVolumeName) | |
108 | { fMotherVolume = motherVolumeName; } | |
109 | ||
110 | inline Int_t AliMUONGeometryModule::GetModuleId() const | |
111 | { return fModuleId; } | |
112 | ||
113 | inline TString AliMUONGeometryModule::GetMotherVolume() const | |
114 | { return fMotherVolume; } | |
115 | ||
116 | inline const TGeoCombiTrans* AliMUONGeometryModule::GetTransformation() const | |
117 | { return fTransformation; } | |
118 | ||
119 | inline AliMUONGeometryEnvelopeStore* | |
120 | AliMUONGeometryModule::GetEnvelopeStore() const | |
121 | { return fEnvelopes; } | |
122 | ||
123 | inline AliMUONVGeometryDEIndexing* | |
124 | AliMUONGeometryModule::GetDEIndexing() const | |
125 | { return fDEIndexing; } | |
126 | ||
127 | inline AliMUONGeometryStore* AliMUONGeometryModule::GetDetElementStore() const | |
128 | { return fDetElements; } | |
129 | ||
130 | inline AliMUONGeometrySVMap* AliMUONGeometryModule::GetSVMap() const | |
131 | { return fSVMap; } | |
132 | ||
133 | #endif //ALI_MUON_MODULE_GEOMETRY_H |