]>
Commit | Line | Data |
---|---|---|
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 AliMUONGeometryModule | |
9 | /// \brief Geometry parameters 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_H | |
18 | #define ALI_MUON_GEOMETRY_MODULE_H | |
19 | ||
20 | #include "AliMUONGeometryModuleTransformer.h" | |
21 | ||
22 | #include <TObject.h> | |
23 | #include <TString.h> | |
24 | ||
25 | class AliMUONGeometryEnvelope; | |
26 | class AliMUONGeometryEnvelopeStore; | |
27 | class AliMUONGeometryDetElement; | |
28 | class AliMUONStringIntMap; | |
29 | ||
30 | class TGeoTranslation; | |
31 | class TGeoRotation; | |
32 | class TGeoCombiTrans; | |
33 | class TObjArray; | |
34 | class TArrayI; | |
35 | ||
36 | class AliMUONGeometryModule : public TObject | |
37 | { | |
38 | public: | |
39 | AliMUONGeometryModule(Int_t moduleId); | |
40 | AliMUONGeometryModule(); | |
41 | virtual ~AliMUONGeometryModule(); | |
42 | ||
43 | // set methods | |
44 | // | |
45 | void SetTransformation(const TGeoCombiTrans& transform); | |
46 | void SetVolumePath(const TString& volumePath); | |
47 | void SetIsVirtual(Bool_t isVirtual); | |
48 | ||
49 | void SetSensitiveVolume(Int_t volId); | |
50 | void SetSensitiveVolume(const TString& name); | |
51 | void SetAlign(Bool_t align); | |
52 | ||
53 | // get methods | |
54 | // | |
55 | Bool_t IsVirtual() const; | |
56 | Int_t GetModuleId() const; | |
57 | TString GetVolumePath() const; | |
58 | ||
59 | AliMUONGeometryDetElement* FindBySensitiveVolume( | |
60 | const TString& volumePath) const; | |
61 | Bool_t IsSensitiveVolume(Int_t volId) const; | |
62 | Bool_t IsSensitiveVolume(const TString& volName) const; | |
63 | ||
64 | AliMUONGeometryEnvelopeStore* GetEnvelopeStore() const; | |
65 | AliMUONStringIntMap* GetSVMap() const; | |
66 | AliMUONGeometryModuleTransformer* GetTransformer() const; | |
67 | ||
68 | protected: | |
69 | /// Not implemented | |
70 | AliMUONGeometryModule(const AliMUONGeometryModule& rhs); | |
71 | /// Not implemented | |
72 | AliMUONGeometryModule& operator = (const AliMUONGeometryModule& rhs); | |
73 | ||
74 | private: | |
75 | // methods | |
76 | Int_t GetSVIndex(Int_t svVolId) const; | |
77 | ||
78 | // data members | |
79 | Bool_t fIsVirtual; ///< \brief true if module is not represented | |
80 | /// by a real volume | |
81 | Int_t fNofSVs; ///< number of sensitive volumes | |
82 | TArrayI* fSVVolumeIds; ///< sensitive volumes IDs | |
83 | ||
84 | AliMUONGeometryEnvelopeStore* fEnvelopes; ///< envelopes | |
85 | AliMUONStringIntMap* fSVMap; ///< sensitive volumes map | |
86 | AliMUONGeometryModuleTransformer* fTransformer;///< geometry transformations | |
87 | ||
88 | ClassDef(AliMUONGeometryModule,4) // MUON geometry module class | |
89 | }; | |
90 | ||
91 | // inline functions | |
92 | ||
93 | /// Set virtuality (true if module is not represented by a real volume) | |
94 | inline void AliMUONGeometryModule::SetIsVirtual(Bool_t isVirtual) | |
95 | { fIsVirtual = isVirtual; } | |
96 | ||
97 | /// Return true if module is not represented by a real volume | |
98 | inline Bool_t AliMUONGeometryModule::IsVirtual() const | |
99 | { return fIsVirtual; } | |
100 | ||
101 | /// Return module ID | |
102 | inline Int_t AliMUONGeometryModule::GetModuleId() const | |
103 | { return fTransformer->GetModuleId(); } | |
104 | ||
105 | /// Return the full path of aligned module volume or envelope in geometry | |
106 | inline TString AliMUONGeometryModule::GetVolumePath() const | |
107 | { return fTransformer->GetVolumePath(); } | |
108 | ||
109 | /// Return envelopes associated with this module | |
110 | inline | |
111 | AliMUONGeometryEnvelopeStore* AliMUONGeometryModule::GetEnvelopeStore() const | |
112 | { return fEnvelopes; } | |
113 | ||
114 | /// Return sensitive volume map | |
115 | inline | |
116 | AliMUONStringIntMap* AliMUONGeometryModule::GetSVMap() const | |
117 | { return fSVMap; } | |
118 | ||
119 | /// Return transformer | |
120 | inline | |
121 | AliMUONGeometryModuleTransformer* AliMUONGeometryModule::GetTransformer() const | |
122 | { return fTransformer; } | |
123 | ||
124 | #endif //ALI_MUON_GEOMETRY_MODULE_H |