]>
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$ |
5006ec94 | 5 | // $MpId: AliMpSector.h,v 1.9 2005/09/26 16:12:11 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 | /// | |
11 | /// Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
5f91c9e8 | 12 | |
13 | #ifndef ALI_MP_SECTOR_H | |
14 | #define ALI_MP_SECTOR_H | |
15 | ||
5006ec94 | 16 | #include "AliMpContainers.h" |
17 | ||
18 | #ifdef WITH_STL | |
19 | #include <vector> | |
20 | #endif | |
21 | ||
22 | #ifdef WITH_ROOT | |
23 | #include <TObjArray.h> | |
24 | #endif | |
25 | ||
26 | #include <TNamed.h> | |
5f91c9e8 | 27 | #include <TString.h> |
28 | #include <TVector2.h> | |
29 | ||
5f91c9e8 | 30 | #include "AliMpDirection.h" |
31 | ||
32 | class AliMpZone; | |
33 | class AliMpRow; | |
34 | class AliMpVRowSegment; | |
35 | class AliMpVMotif; | |
36 | class AliMpVPadIterator; | |
37 | class AliMpMotifMap; | |
38 | ||
5006ec94 | 39 | class AliMpSector : public TNamed |
5f91c9e8 | 40 | { |
5006ec94 | 41 | public: |
42 | #ifdef WITH_STL | |
43 | typedef std::vector<AliMpRow*> RowVector; | |
44 | typedef std::vector<AliMpZone*> ZoneVector; | |
45 | #endif | |
46 | #ifdef WITH_ROOT | |
47 | typedef TObjArray RowVector; | |
48 | typedef TObjArray ZoneVector; | |
49 | #endif | |
50 | ||
5f91c9e8 | 51 | public: |
ffb47139 | 52 | AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows, |
14b7b896 | 53 | AliMpDirection direction, const TVector2& offset); |
5f91c9e8 | 54 | AliMpSector(); |
55 | virtual ~AliMpSector(); | |
56 | ||
57 | // methods | |
58 | virtual AliMpVPadIterator* CreateIterator() const; | |
59 | void SetRowSegmentOffsets(); | |
60 | void Initialize(); | |
61 | void PrintGeometry() const; | |
62 | ||
63 | // find methods | |
64 | AliMpRow* FindRow(const TVector2& position) const; | |
65 | AliMpVMotif* FindMotif(const TVector2& position) const; | |
66 | Int_t FindMotifPositionId(const TVector2& position) const; | |
67 | ||
68 | AliMpRow* FindRow(Int_t motifPositionId) const; | |
69 | AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const; | |
70 | TVector2 FindPosition(Int_t motifPositionId) const; | |
71 | ||
72 | AliMpZone* FindZone(const TVector2& padDimensions) const; | |
73 | ||
74 | // geometry | |
75 | TVector2 Position() const; | |
76 | TVector2 Dimensions() const; | |
77 | ||
78 | // get methods | |
79 | Int_t GetNofZones() const; | |
80 | AliMpZone* GetZone(Int_t i) const; | |
81 | Int_t GetNofRows() const; | |
82 | AliMpRow* GetRow(Int_t i) const; | |
83 | AliMpDirection GetDirection() const; | |
84 | TVector2 GetMinPadDimensions() const; | |
85 | AliMpMotifMap* GetMotifMap() const; | |
86 | ||
fb1bf5c0 | 87 | protected: |
88 | AliMpSector(const AliMpSector& right); | |
89 | AliMpSector& operator = (const AliMpSector& right); | |
90 | ||
5f91c9e8 | 91 | private: |
92 | // methods | |
93 | AliMpVRowSegment* FindRowSegment(const TVector2& position) const; | |
94 | void SetRowOffsets(); | |
95 | void SetMotifPositions(); | |
96 | void SetGlobalIndices(); | |
97 | void SetMinPadDimensions(); | |
98 | ||
99 | // data members | |
100 | TString fID; // sector ID | |
101 | TVector2 fOffset; // sector position | |
102 | ZoneVector fZones; // zones | |
103 | RowVector fRows; // rows | |
104 | AliMpMotifMap* fMotifMap; // motif map | |
105 | AliMpDirection fDirection;// the direction of constant pad size | |
106 | TVector2 fMinPadDimensions; // minimal pad dimensions | |
107 | ||
108 | ClassDef(AliMpSector,1) //Sector | |
109 | }; | |
110 | ||
111 | // inline functions | |
112 | ||
113 | inline AliMpDirection AliMpSector::GetDirection() const | |
114 | { return fDirection; } | |
115 | ||
116 | inline TVector2 AliMpSector::GetMinPadDimensions() const | |
117 | { return fMinPadDimensions; } | |
118 | ||
119 | inline AliMpMotifMap* AliMpSector::GetMotifMap() const | |
120 | { return fMotifMap; } | |
121 | ||
122 | #endif //ALI_MP_SECTOR_H | |
123 |