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 "AliMpDirection.h"
19 #include "AliMpPlaneType.h"
20 #include "AliMpEncodePair.h"
23 #include <TObjArray.h>
27 class AliMpVRowSegment;
29 class AliMpVPadIterator;
34 class AliMpSector : public TNamed
37 AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
38 AliMp::Direction direction,
39 Double_t offsetx, Double_t offsety);
41 virtual ~AliMpSector();
44 virtual AliMpVPadIterator* CreateIterator() const;
46 void SetRowSegmentOffsets();
48 void PrintGeometry() const;
51 Int_t FindMotifPositionId(Double_t x, Double_t y) const;
53 AliMpRow* FindRow(Int_t motifPositionId) const;
54 AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const;
58 Double_t GetPositionX() const;
59 Double_t GetPositionY() const;
60 Double_t GetDimensionX() const;
61 Double_t GetDimensionY() const;
66 Int_t GetNofZones() const;
67 AliMpZone* GetZone(Int_t i) const;
69 Int_t GetNofRows() const;
70 AliMpRow* GetRow(Int_t i) const;
72 AliMp::Direction GetDirection() const;
73 AliMp::PlaneType GetPlaneType() const;
75 Double_t GetMinPadDimensionX() const;
76 Double_t GetMinPadDimensionY() const;
77 Double_t GetMaxPadDimensionX() const;
78 Double_t GetMaxPadDimensionY() const;
79 MpPair_t GetMaxPadIndices() const;
80 Int_t GetNofPads() const;
82 AliMpMotifMap* GetMotifMap() const;
84 Int_t GetNofMotifPositions() const;
85 void GetAllMotifPositionsIDs(TArrayI& ecn) const;
87 virtual void Print(Option_t* opt="") const;
92 AliMpSector(const AliMpSector& right);
94 AliMpSector& operator = (const AliMpSector& right);
97 AliMpRow* FindRow(Double_t y) const;
98 AliMpVRowSegment* FindRowSegment(Double_t x, Double_t y) const;
100 void SetRowOffsets();
101 void SetMotifPositions();
102 void SetGlobalIndices();
103 void SetMinMaxPadDimensions();
104 void SetMaxPadIndices();
106 void SetDimensions();
109 TString fID; ///< sector ID
110 Double_t fOffsetX; ///< sector x position
111 Double_t fOffsetY; ///< sector y position
112 Double_t fDimensionX; ///< sector x dimension
113 Double_t fDimensionY; ///< sector y dimension
114 TObjArray fZones; ///< zones
115 TObjArray fRows; ///< rows
116 AliMpMotifMap* fMotifMap; ///< motif map
117 AliMp::Direction fDirection; ///< the direction of constant pad size
118 Double_t fMinPadDimensionX; ///< minimum pad x dimensions
119 Double_t fMinPadDimensionY; ///< minimum pad y dimensions
120 Double_t fMaxPadDimensionX; ///< miximum pad x dimensions
121 Double_t fMaxPadDimensionY; ///< miximum pad y dimensions
122 MpPair_t fLMaxPadIndices; ///< maximum pad indices
123 Int_t fNofPads; ///< total number of pads
125 ClassDef(AliMpSector,3) // Sector
130 /// Return the direction of constant pad size
131 inline AliMp::Direction AliMpSector::GetDirection() const
132 { return fDirection; }
134 /// Return minimum x pad dimensions
135 inline Double_t AliMpSector::GetMinPadDimensionX() const
136 { return fMinPadDimensionX; }
138 /// Return maximum y pad dimensions
139 inline Double_t AliMpSector::GetMinPadDimensionY() const
140 { return fMinPadDimensionY; }
142 /// Return maximum x pad dimensions
143 inline Double_t AliMpSector::GetMaxPadDimensionX() const
144 { return fMaxPadDimensionX; }
146 /// Return minimum y pad dimensions
147 inline Double_t AliMpSector::GetMaxPadDimensionY() const
148 { return fMaxPadDimensionY; }
150 /// Return maximum pad indices
151 inline MpPair_t AliMpSector::GetMaxPadIndices() const
152 { return fLMaxPadIndices; }
154 /// Return total number of pads
155 inline Int_t AliMpSector::GetNofPads() const
158 /// Return the motif map
159 inline AliMpMotifMap* AliMpSector::GetMotifMap() const
160 { return fMotifMap; }
162 #endif //ALI_MP_SECTOR_H