1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpVRowSegmentSpecial.h,v 1.10 2006/05/24 13:58:21 ivana Exp $
8 /// \class AliMpVRowSegmentSpecial
9 /// \brief Abstract base class for a special row segment composed of the
12 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
14 #ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
15 #define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
17 #include "AliMpVRowSegment.h"
18 #include "AliMpVMotif.h"
22 #include <TObjArray.h>
26 class AliMpVPadRowSegment;
28 class AliMpVRowSegmentSpecial : public AliMpVRowSegment
31 AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
32 AliMpVRowSegmentSpecial();
33 virtual ~AliMpVRowSegmentSpecial();
38 void AddPadRow(AliMpPadRow* padRow);
39 void UpdateMotifVector();
40 /// Update pads offset
41 virtual void UpdatePadsOffset() = 0;
42 /// Return the x coordinate of the left border in the global coordinate system.
43 virtual Double_t LeftBorderX() const = 0;
44 /// Return the x coordinate of the right border in the global coordinate system.
45 virtual Double_t RightBorderX() const= 0;
46 /// Return the half size in y of this row segment.
47 virtual Double_t HalfSizeY() const;
52 virtual AliMpVMotif* FindMotif(Double_t x, Double_t y) const;
53 virtual Int_t FindMotifPositionId(Double_t x, Double_t y) const;
54 virtual Bool_t HasMotifPosition(Int_t motifPositionId) const;
56 virtual void MotifCenter(Int_t motifPositionId,
57 Double_t& x, Double_t& y) const;
62 /// Return the x position of the row segment centre.
63 virtual Double_t GetPositionX() const = 0;
64 /// Return the y position of the row segment centre.
65 virtual Double_t GetPositionY() const = 0;
68 /// Return the x dimension of the row segment centre.
69 virtual Double_t GetDimensionX() const;
70 /// Return the y dimension of the row segment centre.
71 virtual Double_t GetDimensionY() const;
77 virtual void SetOffset(Double_t /*x*/, Double_t /*y*/) {}
78 /// Set global indices limits.
79 virtual void SetGlobalIndices(AliMpRow* rowBefore) = 0;
80 /// Set global indices to i-th motif position and returns next index in x.
81 virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices) = 0;
86 virtual AliMpRow* GetRow() const;
87 virtual Int_t GetNofMotifs() const;
88 virtual AliMpVMotif* GetMotif(Int_t i) const;
89 virtual Int_t GetMotifPositionId(Int_t i) const;
93 /// Return the coordinates of the motif specified with the given motif position Id \n
94 virtual void MotifCenterSlow(Int_t motifPositionId,
95 Double_t& x, Double_t& y) const = 0;
96 AliMpPadRow* FindPadRow(Double_t y) const;
97 AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const;
98 MpPair_t FindRelativeLowIndicesOf(Int_t motifPositionId) const;
99 Int_t MaxNofPadsInRow() const;
100 Bool_t HasMotif(const AliMpVMotif* motif) const;
103 Int_t GetNofPadRows() const;
104 AliMpPadRow* GetPadRow(Int_t i) const;
105 Double_t GetOffsetX() const;
109 AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right);
111 AliMpVRowSegmentSpecial& operator = (const AliMpVRowSegmentSpecial& right);
113 // static data members
114 static const Int_t fgkMaxNofMotifPositionIds; ///< dimension of fMotifPositionIds
117 AliMpRow* fRow; ///< the row containing this segment
118 Double_t fOffsetX; ///< \brief the x position of the border that touches a standard
120 TObjArray fPadRows; ///< pad rows vector
121 TObjArray fMotifs; ///< motifs vector
122 TArrayI fMotifPositionIds; ///< motifs position Ids vector
123 Int_t fNofMotifPositionIds; ///< number of motif positions Ids
125 ClassDef(AliMpVRowSegmentSpecial,1) //Row segment
130 /// Return the x position of the border that touches a standard row segment
131 inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const
134 #endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H