]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONGeometryModule.h
Generic containers indexed by a triplet
[u/mrichter/AliRoot.git] / MUON / AliMUONGeometryModule.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 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 <TObject.h>
21 #include <TString.h>
22
23 #include "AliMUONGeometryModuleTransformer.h"
24
25 class TGeoTranslation;
26 class TGeoRotation;
27 class TGeoCombiTrans;
28 class TObjArray;
29 class TArrayI;
30
31 class AliMUONGeometryEnvelope;
32 class AliMUONGeometryEnvelopeStore;
33 class AliMUONGeometryDetElement;
34 class AliMUONGeometryStore;
35 class AliMUONGeometrySVMap;
36
37 class AliMUONGeometryModule : public TObject
38 {
39   public:
40     AliMUONGeometryModule(Int_t moduleId);
41     AliMUONGeometryModule();
42     virtual ~AliMUONGeometryModule();
43
44     // set methods
45     //
46     void  SetMotherVolume(const TString& motherVolumeName);
47     void  SetVolume(const TString& volumeName);
48     void  SetTransformation(const TGeoCombiTrans& transform);
49     
50     void  SetSensitiveVolume(Int_t volId);
51     void  SetSensitiveVolume(const TString& name);
52     void  SetAlign(Bool_t align);
53  
54     // get methods
55     //
56     Bool_t   IsVirtual() const;  
57     Int_t    GetModuleId() const;
58     TString  GetMotherVolume() const;
59     TString  GetVolume() const;
60     
61     AliMUONGeometryDetElement* FindBySensitiveVolume(
62                                          const TString& volumePath) const;
63     Bool_t IsSensitiveVolume(Int_t volId) const; 
64     Bool_t IsSensitiveVolume(const TString& volName) const; 
65
66     AliMUONGeometryEnvelopeStore*     GetEnvelopeStore() const;
67     AliMUONGeometrySVMap*             GetSVMap() const;
68     AliMUONGeometryModuleTransformer* GetTransformer() const;
69
70   protected:
71     AliMUONGeometryModule(const AliMUONGeometryModule& rhs);
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;     // true if module is not represented
80                                      // by a real volume
81     TString          fMotherVolume;  // mother volume name
82     TString          fVolume;        // the volume name if not virtual
83     Int_t            fNofSVs;        // number of sensitive volumes   
84     TArrayI*         fSVVolumeIds;   // densitive volumes IDs  
85
86     AliMUONGeometryEnvelopeStore*     fEnvelopes;  // envelopes                                 
87     AliMUONGeometrySVMap*             fSVMap;      // sensitive volumes map
88     AliMUONGeometryModuleTransformer* fTransformer;// geometry transformations
89  
90   ClassDef(AliMUONGeometryModule,3) // MUON geometry module class
91 };
92
93 // inline functions
94
95 inline 
96 void  AliMUONGeometryModule::SetMotherVolume(const TString& motherVolumeName)
97 { fMotherVolume = motherVolumeName; }
98
99 inline Bool_t AliMUONGeometryModule::IsVirtual() const
100 { return fIsVirtual; }  
101
102 inline Int_t  AliMUONGeometryModule::GetModuleId() const
103 { return fTransformer->GetModuleId(); }
104
105 inline TString  AliMUONGeometryModule::GetMotherVolume() const
106 { return fMotherVolume; }
107
108 inline TString  AliMUONGeometryModule::GetVolume() const
109 { return fVolume; }
110
111 inline  
112 AliMUONGeometryEnvelopeStore* AliMUONGeometryModule::GetEnvelopeStore() const
113 { return fEnvelopes; }
114
115 inline 
116 AliMUONGeometrySVMap* AliMUONGeometryModule::GetSVMap() const
117 { return fSVMap; }
118
119 inline 
120 AliMUONGeometryModuleTransformer* AliMUONGeometryModule::GetTransformer() const
121 { return fTransformer; }
122
123 #endif //ALI_MUON_GEOMETRY_MODULE_H