]>
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: | |
63 | // methods | |
64 | virtual TVector2 MotifCenterSlow(Int_t motifPositionId) const = 0; | |
65 | AliMpPadRow* FindPadRow(Double_t y) const; | |
66 | AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const; | |
67 | AliMpIntPair FindRelativeLowIndicesOf(Int_t motifPositionId) const; | |
68 | Int_t MaxNofPadsInRow() const; | |
69 | Bool_t HasMotif(const AliMpVMotif* motif) const; | |
70 | ||
71 | // get methods | |
72 | Int_t GetNofPadRows() const; | |
73 | AliMpPadRow* GetPadRow(Int_t i) const; | |
74 | Double_t GetOffsetX() const; | |
75 | ||
76 | private: | |
77 | // data members | |
78 | AliMpRow* fRow; //the row containing this segment | |
79 | Double_t fOffsetX; //the x position of the border that touches a standard | |
80 | //row segment | |
81 | PadRowVector fPadRows; //pad rows vector | |
82 | MotifVector fMotifs; //motifs vector | |
83 | MotifPositionIdVector fMotifPositionIds; //motifs position Ids vector | |
84 | ||
85 | ClassDef(AliMpVRowSegmentSpecial,1) //Row segment | |
86 | }; | |
87 | ||
88 | // inline functions | |
89 | ||
90 | inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const | |
91 | { return fOffsetX; } | |
92 | ||
93 | #endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H |