]>
Commit | Line | Data |
---|---|---|
dee1d5f1 | 1 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
2 | * See cxx source for full Copyright notice */ | |
3 | ||
5f91c9e8 | 4 | // $Id$ |
13985652 | 5 | // $MpId: AliMpSector.h,v 1.14 2006/05/24 13:58:21 ivana Exp $ |
dee1d5f1 | 6 | |
7 | /// \ingroup sector | |
8 | /// \class AliMpSector | |
9 | /// \brief A sector (quadrant) of the MUON chamber of stations 1 and 2. | |
10 | /// | |
13985652 | 11 | /// \author David Guez, Ivana Hrivnacova; IPN Orsay |
5f91c9e8 | 12 | |
13 | #ifndef ALI_MP_SECTOR_H | |
14 | #define ALI_MP_SECTOR_H | |
15 | ||
2a7ea2e6 | 16 | #include <TNamed.h> |
17 | ||
2a7ea2e6 | 18 | #include "AliMpDirection.h" |
19 | #include "AliMpPlaneType.h" | |
168e9c4d | 20 | #include "AliMpEncodePair.h" |
5006ec94 | 21 | |
2a7ea2e6 | 22 | #include <TString.h> |
5006ec94 | 23 | #include <TObjArray.h> |
5f91c9e8 | 24 | |
25 | class AliMpZone; | |
26 | class AliMpRow; | |
27 | class AliMpVRowSegment; | |
28 | class AliMpVMotif; | |
29 | class AliMpVPadIterator; | |
30 | class AliMpMotifMap; | |
31 | ||
2a7ea2e6 | 32 | class TArrayI; |
33 | ||
5006ec94 | 34 | class AliMpSector : public TNamed |
5f91c9e8 | 35 | { |
36 | public: | |
ffb47139 | 37 | AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows, |
6e97fbb8 | 38 | AliMp::Direction direction, |
39 | Double_t offsetx, Double_t offsety); | |
5f91c9e8 | 40 | AliMpSector(); |
41 | virtual ~AliMpSector(); | |
42 | ||
43 | // methods | |
44 | virtual AliMpVPadIterator* CreateIterator() const; | |
6e97fbb8 | 45 | |
5f91c9e8 | 46 | void SetRowSegmentOffsets(); |
47 | void Initialize(); | |
48 | void PrintGeometry() const; | |
49 | ||
50 | // find methods | |
6e97fbb8 | 51 | Int_t FindMotifPositionId(Double_t x, Double_t y) const; |
5f91c9e8 | 52 | |
53 | AliMpRow* FindRow(Int_t motifPositionId) const; | |
54 | AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const; | |
5f91c9e8 | 55 | |
5f91c9e8 | 56 | |
57 | // geometry | |
6e97fbb8 | 58 | Double_t GetPositionX() const; |
59 | Double_t GetPositionY() const; | |
60 | Double_t GetDimensionX() const; | |
61 | Double_t GetDimensionY() const; | |
5f91c9e8 | 62 | |
f9a3ff6a | 63 | // |
5f91c9e8 | 64 | // get methods |
f9a3ff6a | 65 | |
5f91c9e8 | 66 | Int_t GetNofZones() const; |
67 | AliMpZone* GetZone(Int_t i) const; | |
f9a3ff6a | 68 | |
5f91c9e8 | 69 | Int_t GetNofRows() const; |
70 | AliMpRow* GetRow(Int_t i) const; | |
f9a3ff6a | 71 | |
cddd101e | 72 | AliMp::Direction GetDirection() const; |
73 | AliMp::PlaneType GetPlaneType() const; | |
f9a3ff6a | 74 | |
6e97fbb8 | 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; | |
f9a3ff6a | 81 | |
5f91c9e8 | 82 | AliMpMotifMap* GetMotifMap() const; |
6e97fbb8 | 83 | |
84 | Int_t GetNofMotifPositions() const; | |
85 | void GetAllMotifPositionsIDs(TArrayI& ecn) const; | |
5f91c9e8 | 86 | |
c9da0af9 | 87 | virtual void Print(Option_t* opt="") const; |
88 | ||
c9da0af9 | 89 | |
13e7956b | 90 | private: |
f5671fc3 | 91 | /// Not implemented |
fb1bf5c0 | 92 | AliMpSector(const AliMpSector& right); |
f5671fc3 | 93 | /// Not implemented |
fb1bf5c0 | 94 | AliMpSector& operator = (const AliMpSector& right); |
95 | ||
5f91c9e8 | 96 | // methods |
6e97fbb8 | 97 | AliMpRow* FindRow(Double_t y) const; |
98 | AliMpVRowSegment* FindRowSegment(Double_t x, Double_t y) const; | |
99 | ||
5f91c9e8 | 100 | void SetRowOffsets(); |
101 | void SetMotifPositions(); | |
102 | void SetGlobalIndices(); | |
b0d9eae3 | 103 | void SetMinMaxPadDimensions(); |
f9a3ff6a | 104 | void SetMaxPadIndices(); |
105 | void SetNofPads(); | |
6e97fbb8 | 106 | void SetDimensions(); |
5f91c9e8 | 107 | |
108 | // data members | |
829425a5 | 109 | TString fID; ///< sector ID |
6e97fbb8 | 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 | |
2294822d | 114 | TObjArray fZones; ///< zones |
115 | TObjArray fRows; ///< rows | |
f5671fc3 | 116 | AliMpMotifMap* fMotifMap; ///< motif map |
117 | AliMp::Direction fDirection; ///< the direction of constant pad size | |
6e97fbb8 | 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 | |
168e9c4d | 122 | MpPair_t fLMaxPadIndices; ///< maximum pad indices |
cddd101e | 123 | Int_t fNofPads; ///< total number of pads |
829425a5 | 124 | |
6e97fbb8 | 125 | ClassDef(AliMpSector,3) // Sector |
5f91c9e8 | 126 | }; |
127 | ||
128 | // inline functions | |
129 | ||
f5671fc3 | 130 | /// Return the direction of constant pad size |
cddd101e | 131 | inline AliMp::Direction AliMpSector::GetDirection() const |
5f91c9e8 | 132 | { return fDirection; } |
133 | ||
6e97fbb8 | 134 | /// Return minimum x pad dimensions |
135 | inline Double_t AliMpSector::GetMinPadDimensionX() const | |
136 | { return fMinPadDimensionX; } | |
137 | ||
138 | /// Return maximum y pad dimensions | |
139 | inline Double_t AliMpSector::GetMinPadDimensionY() const | |
140 | { return fMinPadDimensionY; } | |
141 | ||
142 | /// Return maximum x pad dimensions | |
143 | inline Double_t AliMpSector::GetMaxPadDimensionX() const | |
144 | { return fMaxPadDimensionX; } | |
5f91c9e8 | 145 | |
6e97fbb8 | 146 | /// Return minimum y pad dimensions |
147 | inline Double_t AliMpSector::GetMaxPadDimensionY() const | |
148 | { return fMaxPadDimensionY; } | |
b0d9eae3 | 149 | |
f5671fc3 | 150 | /// Return maximum pad indices |
168e9c4d | 151 | inline MpPair_t AliMpSector::GetMaxPadIndices() const |
152 | { return fLMaxPadIndices; } | |
f9a3ff6a | 153 | |
f5671fc3 | 154 | /// Return total number of pads |
f9a3ff6a | 155 | inline Int_t AliMpSector::GetNofPads() const |
156 | { return fNofPads; } | |
157 | ||
f5671fc3 | 158 | /// Return the motif map |
5f91c9e8 | 159 | inline AliMpMotifMap* AliMpSector::GetMotifMap() const |
160 | { return fMotifMap; } | |
161 | ||
162 | #endif //ALI_MP_SECTOR_H | |
163 |