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"
21 class AliMpRowSegment : public AliMpVRowSegment
24 AliMpRowSegment(AliMpRow* row, AliMpVMotif* motif, AliMpIntPair padOffset,
25 Int_t nofMotifs, Int_t motifPositionId, Int_t motifPositionDId);
27 virtual ~AliMpRowSegment();
30 virtual Double_t LeftBorderX() const;
31 virtual Double_t RightBorderX() const;
32 virtual Double_t HalfSizeY() const;
35 virtual AliMpVMotif* FindMotif(const TVector2& position) const;
36 virtual Int_t FindMotifPositionId(const TVector2& position) const;
37 virtual Bool_t HasMotifPosition(Int_t motifPositionId) const;
38 virtual TVector2 MotifCenter(Int_t motifPositionId) const;
41 virtual TVector2 Position() const;
42 virtual TVector2 Dimensions() const;
45 virtual void SetOffset(const TVector2& offset);
46 virtual void SetGlobalIndices();
47 virtual Int_t SetIndicesToMotifPosition(Int_t i, AliMpIntPair indices);
50 virtual AliMpRow* GetRow() const;
51 virtual Int_t GetNofMotifs() const;
52 virtual AliMpVMotif* GetMotif(Int_t i) const;
53 virtual Int_t GetMotifPositionId(Int_t i) const;
57 Double_t FirstMotifCenterX() const;
58 Double_t LastMotifCenterX() const;
59 Double_t MotifCenterX(Int_t motifPositionId) const;
60 Double_t MotifCenterY(Int_t motifPositionId) const;
61 Bool_t IsInside(const TVector2& position, Bool_t warn = true) const;
64 Int_t fNofMotifs; //number of motifs
65 AliMpIntPair fPadOffset; //the offset in nof pads
66 TVector2 fOffset; //the position of the centre of the first motif
67 //(x wtr to left border, y wtr to row center)
68 AliMpRow* fRow; //the row containing this segment
69 AliMpVMotif* fMotif; //the motif
70 Int_t fMotifPositionId; // the first motif position id
71 Int_t fMotifPositionDId; // +1 if ids are increasing, -1 if decreasing
73 ClassDef(AliMpRowSegment,1) //Row segment
76 #endif //ALI_MP_ROW_SEGMENT_H