]>
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 | ||
5006ec94 | 18 | #include "AliMpContainers.h" |
19 | ||
2a7ea2e6 | 20 | #include "AliMpDirection.h" |
21 | #include "AliMpPlaneType.h" | |
22 | #include "AliMpIntPair.h" | |
5006ec94 | 23 | |
2a7ea2e6 | 24 | #include <TString.h> |
25 | #include <TVector2.h> | |
5006ec94 | 26 | #ifdef WITH_ROOT |
27 | #include <TObjArray.h> | |
28 | #endif | |
29 | ||
2a7ea2e6 | 30 | #ifdef WITH_STL |
31 | #include <vector> | |
32 | #endif | |
5f91c9e8 | 33 | |
34 | class AliMpZone; | |
35 | class AliMpRow; | |
36 | class AliMpVRowSegment; | |
37 | class AliMpVMotif; | |
38 | class AliMpVPadIterator; | |
39 | class AliMpMotifMap; | |
40 | ||
2a7ea2e6 | 41 | class TArrayI; |
42 | ||
5006ec94 | 43 | class AliMpSector : public TNamed |
5f91c9e8 | 44 | { |
5006ec94 | 45 | public: |
46 | #ifdef WITH_STL | |
47 | typedef std::vector<AliMpRow*> RowVector; | |
48 | typedef std::vector<AliMpZone*> ZoneVector; | |
49 | #endif | |
50 | #ifdef WITH_ROOT | |
51 | typedef TObjArray RowVector; | |
52 | typedef TObjArray ZoneVector; | |
53 | #endif | |
54 | ||
5f91c9e8 | 55 | public: |
ffb47139 | 56 | AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows, |
14b7b896 | 57 | AliMpDirection direction, const TVector2& offset); |
5f91c9e8 | 58 | AliMpSector(); |
59 | virtual ~AliMpSector(); | |
60 | ||
61 | // methods | |
62 | virtual AliMpVPadIterator* CreateIterator() const; | |
63 | void SetRowSegmentOffsets(); | |
64 | void Initialize(); | |
65 | void PrintGeometry() const; | |
66 | ||
67 | // find methods | |
68 | AliMpRow* FindRow(const TVector2& position) const; | |
69 | AliMpVMotif* FindMotif(const TVector2& position) const; | |
70 | Int_t FindMotifPositionId(const TVector2& position) const; | |
71 | ||
72 | AliMpRow* FindRow(Int_t motifPositionId) const; | |
73 | AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const; | |
74 | TVector2 FindPosition(Int_t motifPositionId) const; | |
75 | ||
76 | AliMpZone* FindZone(const TVector2& padDimensions) const; | |
77 | ||
78 | // geometry | |
79 | TVector2 Position() const; | |
80 | TVector2 Dimensions() const; | |
81 | ||
f9a3ff6a | 82 | // |
5f91c9e8 | 83 | // get methods |
f9a3ff6a | 84 | |
5f91c9e8 | 85 | Int_t GetNofZones() const; |
86 | AliMpZone* GetZone(Int_t i) const; | |
f9a3ff6a | 87 | |
5f91c9e8 | 88 | Int_t GetNofRows() const; |
89 | AliMpRow* GetRow(Int_t i) const; | |
f9a3ff6a | 90 | |
5f91c9e8 | 91 | AliMpDirection GetDirection() const; |
f9a3ff6a | 92 | AliMpPlaneType GetPlaneType() const; |
93 | ||
5f91c9e8 | 94 | TVector2 GetMinPadDimensions() const; |
f9a3ff6a | 95 | AliMpIntPair GetMaxPadIndices() const; |
96 | Int_t GetNofPads() const; | |
97 | ||
5f91c9e8 | 98 | AliMpMotifMap* GetMotifMap() const; |
f9a3ff6a | 99 | void GetAllMotifPositionsIDs(TArrayI& ecn) const; |
5f91c9e8 | 100 | |
c9da0af9 | 101 | virtual void Print(Option_t* opt="") const; |
102 | ||
c9da0af9 | 103 | |
13e7956b | 104 | private: |
fb1bf5c0 | 105 | AliMpSector(const AliMpSector& right); |
106 | AliMpSector& operator = (const AliMpSector& right); | |
107 | ||
5f91c9e8 | 108 | // methods |
109 | AliMpVRowSegment* FindRowSegment(const TVector2& position) const; | |
110 | void SetRowOffsets(); | |
111 | void SetMotifPositions(); | |
112 | void SetGlobalIndices(); | |
113 | void SetMinPadDimensions(); | |
f9a3ff6a | 114 | void SetMaxPadIndices(); |
115 | void SetNofPads(); | |
5f91c9e8 | 116 | |
117 | // data members | |
829425a5 | 118 | TString fID; ///< sector ID |
119 | TVector2 fOffset; ///< sector position | |
120 | ZoneVector fZones; ///< zones | |
121 | RowVector fRows; ///< rows | |
122 | AliMpMotifMap* fMotifMap; ///< motif map | |
123 | AliMpDirection fDirection;///< the direction of constant pad size | |
124 | TVector2 fMinPadDimensions; ///< minimal pad dimensions | |
125 | AliMpIntPair fMaxPadIndices; ///< maximum pad indices | |
126 | Int_t fNofPads; ///< total number of pads | |
127 | ||
128 | ||
129 | ClassDef(AliMpSector,1) // Sector | |
5f91c9e8 | 130 | }; |
131 | ||
132 | // inline functions | |
133 | ||
134 | inline AliMpDirection AliMpSector::GetDirection() const | |
135 | { return fDirection; } | |
136 | ||
137 | inline TVector2 AliMpSector::GetMinPadDimensions() const | |
138 | { return fMinPadDimensions; } | |
139 | ||
f9a3ff6a | 140 | inline AliMpIntPair AliMpSector::GetMaxPadIndices() const |
141 | { return fMaxPadIndices; } | |
142 | ||
143 | inline Int_t AliMpSector::GetNofPads() const | |
144 | { return fNofPads; } | |
145 | ||
5f91c9e8 | 146 | inline AliMpMotifMap* AliMpSector::GetMotifMap() const |
147 | { return fMotifMap; } | |
148 | ||
149 | #endif //ALI_MP_SECTOR_H | |
150 |