]>
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); | |
cfbf2f7d | 59 | void SetVolume(const TString& volumeName); |
e118b27e | 60 | void SetTranslation(const TGeoTranslation& translation); |
61 | void SetRotation(const TGeoRotation& rotation); | |
62 | ||
63 | void SetSensitiveVolume(Int_t volId); | |
64 | void SetSensitiveVolume(const TString& name); | |
65 | void SetAlign(Bool_t align); | |
66 | ||
67 | // get methods | |
cfbf2f7d | 68 | Bool_t IsVirtual() const; |
e118b27e | 69 | Int_t GetModuleId() const; |
70 | TString GetMotherVolume() const; | |
cfbf2f7d | 71 | TString GetVolume() const; |
e118b27e | 72 | const TGeoCombiTrans* GetTransformation() const; |
73 | AliMUONGeometryDetElement* FindBySensitiveVolume( | |
74 | const TString& volumePath) const; | |
75 | AliMUONVGeometryDEIndexing* GetDEIndexing() const; | |
76 | AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const; | |
77 | AliMUONGeometryStore* GetDetElementStore() const; | |
78 | AliMUONGeometryDetElement* GetDetElement(Int_t detElemId) const; | |
79 | AliMUONGeometrySVMap* GetSVMap() const; | |
80 | Bool_t IsSensitiveVolume(Int_t volId) const; | |
81 | Bool_t IsSensitiveVolume(const TString& volName) const; | |
82 | ||
83 | protected: | |
84 | AliMUONGeometryModule(const AliMUONGeometryModule& rhs); | |
85 | // operators | |
86 | AliMUONGeometryModule& operator = (const AliMUONGeometryModule& rhs); | |
87 | ||
88 | private: | |
89 | // methods | |
90 | Int_t GetSVIndex(Int_t svVolId) const; | |
91 | ||
92 | // data members | |
cfbf2f7d | 93 | Bool_t fIsVirtual; // true if module is not represented |
94 | // by a real volume | |
e118b27e | 95 | Int_t fModuleId; // the module Id |
96 | TString fMotherVolume; // mother volume name | |
cfbf2f7d | 97 | TString fVolume; // the volume name if not virtual |
e118b27e | 98 | Int_t fNofSVs; // number of sensitive volumes |
99 | TArrayI* fSVVolumeIds; // densitive volumes IDs | |
100 | TGeoCombiTrans* fTransformation;// the module transformation wrt to mother | |
101 | // volume | |
102 | AliMUONGeometryEnvelopeStore* fEnvelopes; // envelopes | |
103 | AliMUONVGeometryDEIndexing* fDEIndexing; // DE indexing | |
104 | AliMUONGeometryStore* fDetElements;// detection elements | |
105 | AliMUONGeometrySVMap* fSVMap; // sensitive volumes map | |
106 | ||
107 | ClassDef(AliMUONGeometryModule,2) // MUON geometry module class | |
108 | }; | |
109 | ||
110 | // inline functions | |
111 | ||
112 | inline void | |
113 | AliMUONGeometryModule::SetMotherVolume(const TString& motherVolumeName) | |
114 | { fMotherVolume = motherVolumeName; } | |
115 | ||
cfbf2f7d | 116 | inline Bool_t AliMUONGeometryModule::IsVirtual() const |
117 | { return fIsVirtual; } | |
118 | ||
e118b27e | 119 | inline Int_t AliMUONGeometryModule::GetModuleId() const |
120 | { return fModuleId; } | |
121 | ||
122 | inline TString AliMUONGeometryModule::GetMotherVolume() const | |
123 | { return fMotherVolume; } | |
124 | ||
cfbf2f7d | 125 | inline TString AliMUONGeometryModule::GetVolume() const |
126 | { return fVolume; } | |
127 | ||
e118b27e | 128 | inline const TGeoCombiTrans* AliMUONGeometryModule::GetTransformation() const |
129 | { return fTransformation; } | |
130 | ||
131 | inline AliMUONGeometryEnvelopeStore* | |
132 | AliMUONGeometryModule::GetEnvelopeStore() const | |
133 | { return fEnvelopes; } | |
134 | ||
135 | inline AliMUONVGeometryDEIndexing* | |
136 | AliMUONGeometryModule::GetDEIndexing() const | |
137 | { return fDEIndexing; } | |
138 | ||
139 | inline AliMUONGeometryStore* AliMUONGeometryModule::GetDetElementStore() const | |
140 | { return fDetElements; } | |
141 | ||
142 | inline AliMUONGeometrySVMap* AliMUONGeometryModule::GetSVMap() const | |
143 | { return fSVMap; } | |
144 | ||
145 | #endif //ALI_MUON_MODULE_GEOMETRY_H |