4 // Class AliMpPadRowSegment
5 // --------------------
6 // Class describing a pad row segment composed of the
9 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
13 #include "AliMpPadRowSegment.h"
14 #include "AliMpPadRow.h"
15 #include "AliMpMotif.h"
16 #include "AliMpMotifType.h"
18 ClassImp(AliMpPadRowSegment)
20 //_____________________________________________________________________________
21 AliMpPadRowSegment::AliMpPadRowSegment(AliMpPadRow* padRow, AliMpMotif* motif,
22 Int_t motifPositionId, Int_t nofPads)
28 fMotifPositionId(motifPositionId)
33 //_____________________________________________________________________________
34 AliMpPadRowSegment::AliMpPadRowSegment()
45 //_____________________________________________________________________________
46 AliMpPadRowSegment::~AliMpPadRowSegment() {
54 //_____________________________________________________________________________
55 Double_t AliMpPadRowSegment::FirstPadCenterX() const
57 // Returns the x coordinate of the first (the most right) pad center
58 // in global coordinate system.
61 return fOffsetX - fMotif->GetPadDimensions().X();
64 //_____________________________________________________________________________
65 Double_t AliMpPadRowSegment::LastPadCenterX() const
67 // Returns the x coordinate of the last (the most left) pad center
68 // in global coordinate system.
69 // !! numbering of pads is in (-x) direction
72 return fOffsetX - (2.*fNofPads - 1)*fMotif->GetPadDimensions().X();
75 //_____________________________________________________________________________
76 Double_t AliMpPadRowSegment::FirstPadBorderX() const
78 // Returns the x coordinate of the right border of the first (the most right)
79 // pad in global coordinate system.
84 // return FirstPadCenterX() + fMotif->GetPadDimensions().X();
87 //_____________________________________________________________________________
88 Double_t AliMpPadRowSegment::LastPadBorderX() const
90 // Returns the x coordinate of the left border of the last (the most left)
91 // pad in global coordinate system.
94 return LastPadCenterX() - fMotif->GetPadDimensions().X();
101 //_____________________________________________________________________________
102 Double_t AliMpPadRowSegment::LeftBorderX() const
104 // Returns the x coordinate of the left row segment border
105 // in global coordinate system.
108 return LastPadBorderX();
111 //_____________________________________________________________________________
112 Double_t AliMpPadRowSegment::RightBorderX() const
114 // Returns the x coordinate of the right row segment border
115 // in global coordinate system.
118 return FirstPadBorderX();
121 //_____________________________________________________________________________
122 Double_t AliMpPadRowSegment::HalfSizeY() const
124 // Returns the size in y of this row segment.
127 return fMotif->GetPadDimensions().Y();
130 //_____________________________________________________________________________
131 AliMpPadRow* AliMpPadRowSegment::GetPadRow() const
133 // Returns the pad row.which this pad row segment belongs to.
139 //_____________________________________________________________________________
140 AliMpMotif* AliMpPadRowSegment::GetMotif() const
142 // Returns the motif of this pad row segment.
148 //_____________________________________________________________________________
149 Int_t AliMpPadRowSegment::GetMotifPositionId() const
151 // Returns the motif of this pad row segment.
154 return fMotifPositionId;
157 //_____________________________________________________________________________
158 void AliMpPadRowSegment::SetOffsetX(Double_t offsetX)
160 // Sets the x offset.