1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpSector.h,v 1.14 2006/05/24 13:58:21 ivana Exp $
9 /// \brief A sector (quadrant) of the MUON chamber of stations 1 and 2.
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
13 #ifndef ALI_MP_SECTOR_H
14 #define ALI_MP_SECTOR_H
18 #include "AliMpContainers.h"
20 #include "AliMpDirection.h"
21 #include "AliMpPlaneType.h"
22 #include "AliMpIntPair.h"
27 #include <TObjArray.h>
36 class AliMpVRowSegment;
38 class AliMpVPadIterator;
43 class AliMpSector : public TNamed
48 typedef std::vector<AliMpRow*> RowVector;
50 typedef std::vector<AliMpZone*> ZoneVector;
54 typedef TObjArray RowVector;
56 typedef TObjArray ZoneVector;
60 AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
61 AliMp::Direction direction, const TVector2& offset);
63 virtual ~AliMpSector();
66 virtual AliMpVPadIterator* CreateIterator() const;
67 void SetRowSegmentOffsets();
69 void PrintGeometry() const;
72 AliMpRow* FindRow(const TVector2& position) const;
73 AliMpVMotif* FindMotif(const TVector2& position) const;
74 Int_t FindMotifPositionId(const TVector2& position) const;
76 AliMpRow* FindRow(Int_t motifPositionId) const;
77 AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const;
78 TVector2 FindPosition(Int_t motifPositionId) const;
80 AliMpZone* FindZone(const TVector2& padDimensions) const;
83 TVector2 Position() const;
84 TVector2 Dimensions() const;
89 Int_t GetNofZones() const;
90 AliMpZone* GetZone(Int_t i) const;
92 Int_t GetNofRows() const;
93 AliMpRow* GetRow(Int_t i) const;
95 AliMp::Direction GetDirection() const;
96 AliMp::PlaneType GetPlaneType() const;
98 TVector2 GetMinPadDimensions() const;
99 TVector2 GetMaxPadDimensions() const;
100 AliMpIntPair GetMaxPadIndices() const;
101 Int_t GetNofPads() const;
103 AliMpMotifMap* GetMotifMap() const;
104 void GetAllMotifPositionsIDs(TArrayI& ecn) const;
106 virtual void Print(Option_t* opt="") const;
111 AliMpSector(const AliMpSector& right);
113 AliMpSector& operator = (const AliMpSector& right);
116 AliMpVRowSegment* FindRowSegment(const TVector2& position) const;
117 void SetRowOffsets();
118 void SetMotifPositions();
119 void SetGlobalIndices();
120 void SetMinMaxPadDimensions();
121 void SetMaxPadIndices();
125 TString fID; ///< sector ID
126 TVector2 fOffset; ///< sector position
127 ZoneVector fZones; ///< zones
128 RowVector fRows; ///< rows
129 AliMpMotifMap* fMotifMap; ///< motif map
130 AliMp::Direction fDirection; ///< the direction of constant pad size
131 TVector2 fMinPadDimensions; ///< minimum pad dimensions
132 TVector2 fMaxPadDimensions; ///< miximum pad dimensions
133 AliMpIntPair fMaxPadIndices; ///< maximum pad indices
134 Int_t fNofPads; ///< total number of pads
136 ClassDef(AliMpSector,1) // Sector
141 /// Return the direction of constant pad size
142 inline AliMp::Direction AliMpSector::GetDirection() const
143 { return fDirection; }
145 /// Return minimum pad dimensions
146 inline TVector2 AliMpSector::GetMinPadDimensions() const
147 { return fMinPadDimensions; }
149 /// Return maxmum pad dimensions
150 inline TVector2 AliMpSector::GetMaxPadDimensions() const
151 { return fMaxPadDimensions; }
153 /// Return maximum pad indices
154 inline AliMpIntPair AliMpSector::GetMaxPadIndices() const
155 { return fMaxPadIndices; }
157 /// Return total number of pads
158 inline Int_t AliMpSector::GetNofPads() const
161 /// Return the motif map
162 inline AliMpMotifMap* AliMpSector::GetMotifMap() const
163 { return fMotifMap; }
165 #endif //ALI_MP_SECTOR_H