AliRoot Core  3dc7879 (3dc7879)
AliMpRowSegment.h
Go to the documentation of this file.
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3 
4 // $Id$
5 // $MpId: AliMpRowSegment.h,v 1.10 2006/05/24 13:58:21 ivana Exp $
6 
12 
13 #ifndef ALI_MP_ROW_SEGMENT_H
14 #define ALI_MP_ROW_SEGMENT_H
15 
16 #include "AliMpVRowSegment.h"
17 
18 class AliMpRow;
19 class AliMpVMotif;
20 
22 {
23  public:
24  AliMpRowSegment(AliMpRow* row, AliMpVMotif* motif,
25  Int_t padOffsetX, Int_t padOffsetY,
26  Int_t nofMotifs, Int_t motifPositionId, Int_t motifPositionDId);
28  virtual ~AliMpRowSegment();
29 
30  // methods
31  virtual Double_t LeftBorderX() const;
32  virtual Double_t RightBorderX() const;
33  virtual Double_t HalfSizeY() const;
34 
35  // find methods
36  virtual AliMpVMotif* FindMotif(Double_t x, Double_t y) const;
37  virtual Int_t FindMotifPositionId(Double_t x, Double_t y) const;
38  virtual Bool_t HasMotifPosition(Int_t motifPositionId) const;
39  virtual void MotifCenter(Int_t motifPositionId,
40  Double_t& x, Double_t& y) const;
41 
42  // geometry
43  virtual Double_t GetPositionX() const;
44  virtual Double_t GetPositionY() const;
45  virtual Double_t GetDimensionX() const;
46  virtual Double_t GetDimensionY() const;
47 
48  // set methods
49  virtual void SetOffset(Double_t x, Double_t y);
50  virtual void SetGlobalIndices(AliMpRow* rowBefore);
51  virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices);
52 
53  // get methods
54  virtual AliMpRow* GetRow() const;
55  virtual Int_t GetNofMotifs() const;
56  virtual AliMpVMotif* GetMotif(Int_t /*i*/) const;
57  virtual Int_t GetMotifPositionId(Int_t i) const;
58 
59  private:
61  AliMpRowSegment(const AliMpRowSegment& right);
64 
65  // methods
66  Double_t FirstMotifCenterX() const;
67  Double_t LastMotifCenterX() const;
68  Double_t MotifCenterX(Int_t motifPositionId) const;
69  Double_t MotifCenterY(Int_t motifPositionId) const;
70  Bool_t IsInside(Double_t x, Double_t y, Bool_t warn = true) const;
71 
72  // data members
73  Int_t fNofMotifs;
75  Double_t fOffsetX;
76  Double_t fOffsetY;
78  AliMpRow* fRow;
83 
84  ClassDef(AliMpRowSegment,2) // Row segment
85 };
86 
87 #endif //ALI_MP_ROW_SEGMENT_H
88 
AliMpRowSegment & operator=(const AliMpRowSegment &right)
Not implemented.
virtual Double_t GetDimensionX() const
Return the x dimension of the row segment centre.
Int_t fMotifPositionId
the first motif position id
Int_t fNofMotifs
number of motifs
virtual ~AliMpRowSegment()
Int_t fMotifPositionDId
+1 if ids are increasing, -1 if decreasing
AliMpRow * fRow
the row containing this segment
Double_t fOffsetY
the y position of the centre of the first motif wrt to row center
virtual void SetOffset(Double_t x, Double_t y)
Calculate offset.
virtual Bool_t HasMotifPosition(Int_t motifPositionId) const
Has the motif position with the given Id ?
virtual Double_t LeftBorderX() const
Return the x coordinate of the left border in the global coordinate system.
AliMpVMotif * fMotif
the motif
Double_t MotifCenterX(Int_t motifPositionId) const
An interface for a row segment.
virtual Double_t GetPositionX() const
Return the x position of the row segment centre.
virtual AliMpRow * GetRow() const
Return the row.which this row segment belongs to.
virtual Double_t GetPositionY() const
Return the y position of the row segment centre.
virtual void MotifCenter(Int_t motifPositionId, Double_t &x, Double_t &y) const
Fill the coordinates of the motif specified with the given motif position Id.
Double_t fOffsetX
the x position of the centre of the first motif wrt to left border
A row segment composed of the the identic motifs.
virtual AliMpVMotif * GetMotif(Int_t) const
Return the i-th motif of this row segment.
virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices)
Set global indices to i-th motif position and returns next index in x.
virtual Double_t HalfSizeY() const
Return the half size in y of this row segment.
A row composed of the row segments.
Definition: AliMpRow.h:26
virtual AliMpVMotif * FindMotif(Double_t x, Double_t y) const
Find the motif in the given positions.
Double_t FirstMotifCenterX() const
MpPair_t fLPadOffset
the offset in nof pads
Abstract base class for a motif with its unique ID and the motif type.
Definition: AliMpVMotif.h:24
Int_t MpPair_t
Double_t MotifCenterY(Int_t motifPositionId) const
virtual Int_t GetMotifPositionId(Int_t i) const
Return the i-th motif position Id of this row segment.
virtual Int_t GetNofMotifs() const
Return the number of motifs in this this row segment.
virtual Int_t FindMotifPositionId(Double_t x, Double_t y) const
Find the motif position Id in the given positions.
virtual Double_t GetDimensionY() const
Return the y dimension of the row segment centre.
virtual void SetGlobalIndices(AliMpRow *rowBefore)
Set global indices limits.
Double_t LastMotifCenterX() const
virtual Double_t RightBorderX() const
Return the x coordinate of the right border in the global coordinate system.
Bool_t IsInside(Double_t x, Double_t y, Bool_t warn=true) const