]>
Commit | Line | Data |
---|---|---|
5f91c9e8 | 1 | // $Id$ |
2 | // Category: sector | |
3 | // | |
4 | // Class AliMpSector | |
5 | // ----------------- | |
6 | // Class describing the sector of the MUON chamber of station 1. | |
7 | // | |
8 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
9 | ||
10 | #ifndef ALI_MP_SECTOR_H | |
11 | #define ALI_MP_SECTOR_H | |
12 | ||
13 | #include <vector> | |
14 | ||
15 | #include <TObject.h> | |
16 | #include <TString.h> | |
17 | #include <TVector2.h> | |
18 | ||
19 | #include "AliMpSectorTypes.h" | |
20 | #include "AliMpDirection.h" | |
21 | ||
22 | class AliMpZone; | |
23 | class AliMpRow; | |
24 | class AliMpVRowSegment; | |
25 | class AliMpVMotif; | |
26 | class AliMpVPadIterator; | |
27 | class AliMpMotifMap; | |
28 | ||
29 | class AliMpSector : public TObject | |
30 | { | |
31 | public: | |
32 | AliMpSector(TString id, Int_t nofZones, Int_t nofRows, | |
33 | AliMpDirection direction); | |
34 | AliMpSector(); | |
35 | virtual ~AliMpSector(); | |
36 | ||
37 | // methods | |
38 | virtual AliMpVPadIterator* CreateIterator() const; | |
39 | void SetRowSegmentOffsets(); | |
40 | void Initialize(); | |
41 | void PrintGeometry() const; | |
42 | ||
43 | // find methods | |
44 | AliMpRow* FindRow(const TVector2& position) const; | |
45 | AliMpVMotif* FindMotif(const TVector2& position) const; | |
46 | Int_t FindMotifPositionId(const TVector2& position) const; | |
47 | ||
48 | AliMpRow* FindRow(Int_t motifPositionId) const; | |
49 | AliMpVRowSegment* FindRowSegment(Int_t motifPositionId) const; | |
50 | TVector2 FindPosition(Int_t motifPositionId) const; | |
51 | ||
52 | AliMpZone* FindZone(const TVector2& padDimensions) const; | |
53 | ||
54 | // geometry | |
55 | TVector2 Position() const; | |
56 | TVector2 Dimensions() const; | |
57 | ||
58 | // get methods | |
59 | Int_t GetNofZones() const; | |
60 | AliMpZone* GetZone(Int_t i) const; | |
61 | Int_t GetNofRows() const; | |
62 | AliMpRow* GetRow(Int_t i) const; | |
63 | AliMpDirection GetDirection() const; | |
64 | TVector2 GetMinPadDimensions() const; | |
65 | AliMpMotifMap* GetMotifMap() const; | |
66 | ||
67 | private: | |
68 | // methods | |
69 | AliMpVRowSegment* FindRowSegment(const TVector2& position) const; | |
70 | void SetRowOffsets(); | |
71 | void SetMotifPositions(); | |
72 | void SetGlobalIndices(); | |
73 | void SetMinPadDimensions(); | |
74 | ||
75 | // data members | |
76 | TString fID; // sector ID | |
77 | TVector2 fOffset; // sector position | |
78 | ZoneVector fZones; // zones | |
79 | RowVector fRows; // rows | |
80 | AliMpMotifMap* fMotifMap; // motif map | |
81 | AliMpDirection fDirection;// the direction of constant pad size | |
82 | TVector2 fMinPadDimensions; // minimal pad dimensions | |
83 | ||
84 | ClassDef(AliMpSector,1) //Sector | |
85 | }; | |
86 | ||
87 | // inline functions | |
88 | ||
89 | inline AliMpDirection AliMpSector::GetDirection() const | |
90 | { return fDirection; } | |
91 | ||
92 | inline TVector2 AliMpSector::GetMinPadDimensions() const | |
93 | { return fMinPadDimensions; } | |
94 | ||
95 | inline AliMpMotifMap* AliMpSector::GetMotifMap() const | |
96 | { return fMotifMap; } | |
97 | ||
98 | #endif //ALI_MP_SECTOR_H | |
99 |