4 // Class AliMpRowSegment
5 // ---------------------
6 // Class describing a row segment composed of the
9 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
11 #ifndef ALI_MP_ROW_SEGMENT_H
12 #define ALI_MP_ROW_SEGMENT_H
16 #include "AliMpVRowSegment.h"
22 class AliMpRowSegment : public AliMpVRowSegment
25 AliMpRowSegment(AliMpRow* row, AliMpVMotif* motif, AliMpIntPair padOffset,
26 Int_t nofMotifs, Int_t motifPositionId, Int_t motifPositionDId);
28 virtual ~AliMpRowSegment();
31 virtual Double_t LeftBorderX() const;
32 virtual Double_t RightBorderX() const;
33 virtual Double_t HalfSizeY() const;
36 virtual AliMpVMotif* FindMotif(const TVector2& position) const;
37 virtual Int_t FindMotifPositionId(const TVector2& position) const;
38 virtual Bool_t HasMotifPosition(Int_t motifPositionId) const;
39 virtual TVector2 MotifCenter(Int_t motifPositionId) const;
42 virtual TVector2 Position() const;
43 virtual TVector2 Dimensions() const;
46 virtual void SetOffset(const TVector2& offset);
47 virtual void SetGlobalIndices();
48 virtual Int_t SetIndicesToMotifPosition(Int_t i,
49 const AliMpIntPair& indices);
52 virtual AliMpRow* GetRow() const;
53 virtual Int_t GetNofMotifs() const;
54 virtual AliMpVMotif* GetMotif(Int_t /*i*/) const;
55 virtual Int_t GetMotifPositionId(Int_t i) const;
58 AliMpRowSegment(const AliMpRowSegment& right);
59 AliMpRowSegment& operator = (const AliMpRowSegment& right);
63 Double_t FirstMotifCenterX() const;
64 Double_t LastMotifCenterX() const;
65 Double_t MotifCenterX(Int_t motifPositionId) const;
66 Double_t MotifCenterY(Int_t motifPositionId) const;
67 Bool_t IsInside(const TVector2& position, Bool_t warn = true) const;
70 Int_t fNofMotifs; //number of motifs
71 AliMpIntPair fPadOffset; //the offset in nof pads
72 TVector2 fOffset; //the position of the centre of the first motif
73 //(x wtr to left border, y wtr to row center)
74 AliMpRow* fRow; //the row containing this segment
75 AliMpVMotif* fMotif; //the motif
76 Int_t fMotifPositionId; // the first motif position id
77 Int_t fMotifPositionDId; // +1 if ids are increasing, -1 if decreasing
79 ClassDef(AliMpRowSegment,1) //Row segment
82 #endif //ALI_MP_ROW_SEGMENT_H