]>
Commit | Line | Data |
---|---|---|
ea4cae7a | 1 | // $Id$ |
2 | // Category: sector | |
3 | // | |
4 | // Class AliMpVRowSegmentSpecial | |
5 | // ----------------------------- | |
6 | // Abstract base class for a special row segment composed of the | |
7 | // pad rows. | |
8 | // | |
9 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
10 | ||
11 | #ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H | |
12 | #define ALI_MP_V_ROW_SEGMENT_SPECIAL_H | |
13 | ||
14 | #include <TVector2.h> | |
15 | ||
16 | #include "AliMpSectorTypes.h" | |
17 | #include "AliMpVRowSegment.h" | |
18 | #include "AliMpVMotif.h" | |
19 | ||
20 | class AliMpRow; | |
21 | class AliMpPadRow; | |
22 | class AliMpVPadRowSegment; | |
23 | class AliMpIntPair; | |
24 | ||
25 | class AliMpVRowSegmentSpecial : public AliMpVRowSegment | |
26 | { | |
27 | public: | |
28 | AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX); | |
29 | AliMpVRowSegmentSpecial(); | |
30 | virtual ~AliMpVRowSegmentSpecial(); | |
31 | ||
32 | // methods | |
33 | void AddPadRow(AliMpPadRow* padRow); | |
34 | void UpdateMotifVector(); | |
35 | virtual void UpdatePadsOffset() = 0; | |
36 | virtual Double_t LeftBorderX() const = 0; | |
37 | virtual Double_t RightBorderX() const= 0; | |
38 | virtual Double_t HalfSizeY() const; | |
39 | ||
40 | // find methods | |
41 | virtual AliMpVMotif* FindMotif(const TVector2& position) const; | |
42 | virtual Int_t FindMotifPositionId(const TVector2& position) const; | |
43 | virtual Bool_t HasMotifPosition(Int_t motifPositionId) const; | |
44 | virtual TVector2 MotifCenter(Int_t motifPositionId) const; | |
45 | ||
46 | // geometry | |
47 | virtual TVector2 Position() const = 0; | |
48 | virtual TVector2 Dimensions() const; | |
49 | ||
50 | // set methods | |
51 | virtual void SetOffset(const TVector2& /*offset*/) {} | |
52 | virtual void SetGlobalIndices(); | |
53 | virtual Int_t SetIndicesToMotifPosition(Int_t i, | |
54 | const AliMpIntPair& indices) = 0; | |
55 | ||
56 | // get methods | |
57 | virtual AliMpRow* GetRow() const; | |
58 | virtual Int_t GetNofMotifs() const; | |
59 | virtual AliMpVMotif* GetMotif(Int_t i) const; | |
60 | virtual Int_t GetMotifPositionId(Int_t i) const; | |
61 | ||
62 | protected: | |
fb1bf5c0 | 63 | AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right); |
64 | AliMpVRowSegmentSpecial& operator = (const AliMpVRowSegmentSpecial& right); | |
65 | ||
ea4cae7a | 66 | // methods |
67 | virtual TVector2 MotifCenterSlow(Int_t motifPositionId) const = 0; | |
68 | AliMpPadRow* FindPadRow(Double_t y) const; | |
69 | AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const; | |
70 | AliMpIntPair FindRelativeLowIndicesOf(Int_t motifPositionId) const; | |
71 | Int_t MaxNofPadsInRow() const; | |
72 | Bool_t HasMotif(const AliMpVMotif* motif) const; | |
73 | ||
74 | // get methods | |
75 | Int_t GetNofPadRows() const; | |
76 | AliMpPadRow* GetPadRow(Int_t i) const; | |
77 | Double_t GetOffsetX() const; | |
78 | ||
79 | private: | |
f79c58a5 | 80 | #ifdef WITH_ROOT |
81 | // static data members | |
82 | static const Int_t fgkMaxNofMotifPositionIds; // dimension of fMotifPositionIds | |
83 | #endif | |
84 | ||
ea4cae7a | 85 | // data members |
86 | AliMpRow* fRow; //the row containing this segment | |
87 | Double_t fOffsetX; //the x position of the border that touches a standard | |
88 | //row segment | |
89 | PadRowVector fPadRows; //pad rows vector | |
90 | MotifVector fMotifs; //motifs vector | |
91 | MotifPositionIdVector fMotifPositionIds; //motifs position Ids vector | |
f79c58a5 | 92 | #ifdef WITH_ROOT |
93 | Int_t fNofMotifPositionIds; // number of motif positions Ids | |
94 | #endif | |
ea4cae7a | 95 | |
96 | ClassDef(AliMpVRowSegmentSpecial,1) //Row segment | |
97 | }; | |
98 | ||
99 | // inline functions | |
100 | ||
101 | inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const | |
102 | { return fOffsetX; } | |
103 | ||
104 | #endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H |