42 #include <Riostream.h>
51 Int_t padOffsetX, Int_t padOffsetY,
53 Int_t motifPositionId, Int_t motifPositionDId)
55 fNofMotifs(nofMotifs),
56 fLPadOffset(AliMp::
Pair(padOffsetX,padOffsetY)),
61 fMotifPositionId(motifPositionId),
62 fMotifPositionDId(motifPositionDId)
67 SetLowIndicesLimit(fLPadOffset);
121 AliErrorStream() <<
"Outside row segment region" << endl;
139 AliErrorStream() <<
"Outside row segment region" << endl;
155 y < minY || y > maxY ) {
158 AliWarningStream() <<
"Outside row segment region" << endl;
212 if ( !
IsInside(x, y,
false) )
return 0;
233 if (motifPositionId >= minId && motifPositionId <= maxId) {
242 Double_t& x, Double_t& y)
const
294 Int_t ix = iter.CurrentItem().GetIx();
295 Int_t iy = iter.CurrentItem().GetIy();
326 Fatal(
"SetGlobalIndices",
327 "Indices of motif positions have to be set first.");
void SetLowIndicesLimit(MpPair_t limit, Bool_t valid=true)
virtual Double_t GetDimensionX() const
Return the x dimension of the row segment centre.
Int_t fMotifPositionId
the first motif position id
Int_t GetLowLimitIx() const
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 Double_t DimensionY() const =0
Return y dimensions.
virtual void SetOffset(Double_t x, Double_t y)
Calculate offset.
An iterator over the pads of a given motif type.
Double_t GetPositionY() const
virtual Bool_t HasMotifPosition(Int_t motifPositionId) const
Has the motif position with the given Id ?
MpPair_t Pair(Int_t first, Int_t second)
Encode the pair of integers to another integer.
Int_t GetLowLimitIy() const
Int_t GetHighLimitIy() const
virtual void First()
Set iterator to the first pad.
virtual Double_t LeftBorderX() const
Return the x coordinate of the left border in the global coordinate system.
AliMpMotifType * GetMotifType() const
Return the motif type.
AliMpVMotif * fMotif
the motif
Double_t GetDimensionY() const
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.
void SetHighIndicesLimit(MpPair_t limit, Bool_t valid=true)
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.
Int_t GetNofPadsX() const
Return number of pads in x direction.
Double_t fOffsetX
the x position of the centre of the first motif wrt to left border
Int_t GetNofPadsY() const
Return number of pads in y direction.
A row segment composed of the the identic motifs.
MpPair_t GetLowIndicesLimit() const
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.
AliMpVMotif * GetMotif() const
Return motif.
virtual Double_t HalfSizeY() const
Return the half size in y of this row segment.
A row composed of the row segments.
virtual AliMpVMotif * FindMotif(Double_t x, Double_t y) const
Find the motif in the given positions.
virtual Double_t DimensionX() const =0
Return x dimensions.
Double_t FirstMotifCenterX() const
static Int_t StartPadIndex()
Return global pad indices start value.
MpPair_t fLPadOffset
the offset in nof pads
Abstract base class for a motif with its unique ID and the motif type.
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.
Int_t PairFirst(MpPair_t pair)
Decode the first integer from encoded pair.
AliMpMotifPosition * FindMotifPosition(Int_t motifPositionID) const
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.
Int_t PairSecond(MpPair_t pair)
Decode the second integer from encoded pair.
Int_t GetHighLimitIx() const
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.
AliMpMotifMap * GetMotifMap() const
Return the motif map associated with its sector.
Bool_t HasValidIndices() const
Class that defines the motif properties.
Bool_t IsInside(Double_t x, Double_t y, Bool_t warn=true) const
virtual void GetPadDimensionsByIndices(MpPair_t localIndices, Double_t &dx, Double_t &dy) const =0
Return the dimensions of the pad specified by localIndices.