AliRoot Core  3dc7879 (3dc7879)
AliMpVRowSegmentSpecial.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: AliMpVRowSegmentSpecial.h,v 1.10 2006/05/24 13:58:21 ivana Exp $
6 
13 
14 #ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
15 #define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
16 
17 #include "AliMpVRowSegment.h"
18 #include "AliMpVMotif.h"
19 
20 #include <TVector2.h>
21 #include <TArrayI.h>
22 #include <TObjArray.h>
23 
24 class AliMpRow;
25 class AliMpPadRow;
27 
29 {
30  public:
31  AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
33  virtual ~AliMpVRowSegmentSpecial();
34 
35  //
36  // methods
37  //
38  void AddPadRow(AliMpPadRow* padRow);
39  void UpdateMotifVector();
41  virtual void UpdatePadsOffset() = 0;
43  virtual Double_t LeftBorderX() const = 0;
45  virtual Double_t RightBorderX() const= 0;
47  virtual Double_t HalfSizeY() const;
48 
49  //
50  // find methods
51  //
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;
55 
56  virtual void MotifCenter(Int_t motifPositionId,
57  Double_t& x, Double_t& y) const;
58 
59  //
60  // geometry
61  //
63  virtual Double_t GetPositionX() const = 0;
65  virtual Double_t GetPositionY() const = 0;
66 
67 
69  virtual Double_t GetDimensionX() const;
71  virtual Double_t GetDimensionY() const;
72 
73  //
74  // set methods
75  //
77  virtual void SetOffset(Double_t /*x*/, Double_t /*y*/) {}
79  virtual void SetGlobalIndices(AliMpRow* rowBefore) = 0;
81  virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices) = 0;
82 
83  //
84  // get methods
85  //
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;
90 
91  protected:
92  // methods
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;
101 
102  // get methods
103  Int_t GetNofPadRows() const;
104  AliMpPadRow* GetPadRow(Int_t i) const;
105  Double_t GetOffsetX() const;
106 
107  private:
112 
113  // static data members
114  static const Int_t fgkMaxNofMotifPositionIds;
115 
116  // data members
118  Double_t fOffsetX;
124 
125  ClassDef(AliMpVRowSegmentSpecial,1) //Row segment
126 };
127 
128 // inline functions
129 
131 inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const
132 { return fOffsetX; }
133 
134 #endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H
AliMpPadRow * FindPadRow(Double_t y) const
A pad row composed of the pad row segments.
Definition: AliMpPadRow.h:25
static const Int_t fgkMaxNofMotifPositionIds
dimension of fMotifPositionIds
virtual AliMpRow * GetRow() const
Return the row.which this row segment belongs to.
Bool_t HasMotif(const AliMpVMotif *motif) const
void AddPadRow(AliMpPadRow *padRow)
#define TObjArray
virtual Double_t GetDimensionY() const
Return the y dimension of the row segment centre.
virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices)=0
Set global indices to i-th motif position and returns next index in x.
AliMpRow * fRow
the row containing this segment
TObjArray fMotifs
motifs vector
virtual Int_t GetMotifPositionId(Int_t i) const
Return the i-th motif position Id of this row segment.
AliMpPadRow * GetPadRow(Int_t i) const
virtual void UpdatePadsOffset()=0
Update pads offset.
virtual Bool_t HasMotifPosition(Int_t motifPositionId) const
Has the motif position with the given Id ?
An interface for a row segment.
TObjArray fPadRows
pad rows vector
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.
TArrayI fMotifPositionIds
motifs position Ids vector
virtual void SetGlobalIndices(AliMpRow *rowBefore)=0
Set global indices limits.
virtual Double_t GetDimensionX() const
Return the x dimension of the row segment centre.
Double_t fOffsetX
the x position of the border that touches a standard row segment
virtual Double_t GetPositionY() const =0
Return the y position of the row segment centre.
virtual AliMpVMotif * FindMotif(Double_t x, Double_t y) const
Find the motif in the given positions.
AliMpVPadRowSegment * FindPadRowSegment(Int_t motifPositionId) const
A row composed of the row segments.
Definition: AliMpRow.h:26
virtual AliMpVMotif * GetMotif(Int_t i) const
Return the i-th motif of this row segment.
Abstract base class for a special row segment composed of the pad rows.
Abstract base class for a motif with its unique ID and the motif type.
Definition: AliMpVMotif.h:24
virtual Double_t RightBorderX() const =0
Return the x coordinate of the right border in the global coordinate system.
Int_t MpPair_t
virtual void MotifCenterSlow(Int_t motifPositionId, Double_t &x, Double_t &y) const =0
Return the coordinates of the motif specified with the given motif position Id . ...
virtual Double_t HalfSizeY() const
Return the half size in y of this row segment.
virtual Double_t GetPositionX() const =0
Return the x position of the row segment centre.
virtual Int_t GetNofMotifs() const
Return the number of motifs in this this row segment.
virtual Double_t LeftBorderX() const =0
Return the x coordinate of the left border in the global coordinate system.
virtual void SetOffset(Double_t, Double_t)
Calculate offset.
Int_t fNofMotifPositionIds
number of motif positions Ids
AliMpVRowSegmentSpecial & operator=(const AliMpVRowSegmentSpecial &right)
Not implemented.
MpPair_t FindRelativeLowIndicesOf(Int_t motifPositionId) const
Double_t GetOffsetX() const
Return the x position of the border that touches a standard row segment.
The abstract base class for a pad row segment composed of the the identic pads.
virtual Int_t FindMotifPositionId(Double_t x, Double_t y) const
Find the motif position Id in the given positions.