4 // Class AliMpPadRowLSegment
5 // -------------------------
6 // Class describing a pad row segment composed of the
8 // the pads are placed from the offset (defined in the base class)
11 // Included in AliRoot: 2003/05/02
12 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
16 #include "AliMpPadRowLSegment.h"
17 #include "AliMpPadRow.h"
18 #include "AliMpMotif.h"
19 #include "AliMpMotifType.h"
21 ClassImp(AliMpPadRowLSegment)
23 //_____________________________________________________________________________
24 AliMpPadRowLSegment::AliMpPadRowLSegment(
25 AliMpPadRow* padRow, AliMpMotif* motif,
26 Int_t motifPositionId, Int_t nofPads)
27 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
32 //_____________________________________________________________________________
33 AliMpPadRowLSegment::AliMpPadRowLSegment()
34 : AliMpVPadRowSegment()
39 //_____________________________________________________________________________
40 AliMpPadRowLSegment::~AliMpPadRowLSegment() {
48 //_____________________________________________________________________________
49 Double_t AliMpPadRowLSegment::FirstPadCenterX() const
51 // Returns the x coordinate of the first (the most right) pad center
52 // in global coordinate system.
55 return GetOffsetX() - GetMotif()->GetPadDimensions().X();
58 //_____________________________________________________________________________
59 Double_t AliMpPadRowLSegment::LastPadCenterX() const
61 // Returns the x coordinate of the last (the most left) pad center
62 // in global coordinate system.
63 // !! numbering of pads is in (-x) direction
66 return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X();
69 //_____________________________________________________________________________
70 Double_t AliMpPadRowLSegment::FirstPadBorderX() const
72 // Returns the x coordinate of the right border of the first (the most right)
73 // pad in global coordinate system.
78 // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X();
81 //_____________________________________________________________________________
82 Double_t AliMpPadRowLSegment::LastPadBorderX() const
84 // Returns the x coordinate of the left border of the last (the most left)
85 // pad in global coordinate system.
88 return LastPadCenterX() - GetMotif()->GetPadDimensions().X();
95 //_____________________________________________________________________________
96 Double_t AliMpPadRowLSegment::LeftBorderX() const
98 // Returns the x coordinate of the left row segment border
99 // in global coordinate system.
102 return LastPadBorderX();
105 //_____________________________________________________________________________
106 Double_t AliMpPadRowLSegment::RightBorderX() const
108 // Returns the x coordinate of the right row segment border
109 // in global coordinate system.
112 return FirstPadBorderX();