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 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
15 #include "AliMpPadRowLSegment.h"
16 #include "AliMpPadRow.h"
17 #include "AliMpMotif.h"
18 #include "AliMpMotifType.h"
20 ClassImp(AliMpPadRowLSegment)
22 //_____________________________________________________________________________
23 AliMpPadRowLSegment::AliMpPadRowLSegment(
24 AliMpPadRow* padRow, AliMpMotif* motif,
25 Int_t motifPositionId, Int_t nofPads)
26 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
31 //_____________________________________________________________________________
32 AliMpPadRowLSegment::AliMpPadRowLSegment()
33 : AliMpVPadRowSegment()
38 //_____________________________________________________________________________
39 AliMpPadRowLSegment::~AliMpPadRowLSegment() {
47 //_____________________________________________________________________________
48 Double_t AliMpPadRowLSegment::FirstPadCenterX() const
50 // Returns the x coordinate of the first (the most right) pad center
51 // in global coordinate system.
54 return GetOffsetX() - GetMotif()->GetPadDimensions().X();
57 //_____________________________________________________________________________
58 Double_t AliMpPadRowLSegment::LastPadCenterX() const
60 // Returns the x coordinate of the last (the most left) pad center
61 // in global coordinate system.
62 // !! numbering of pads is in (-x) direction
65 return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X();
68 //_____________________________________________________________________________
69 Double_t AliMpPadRowLSegment::FirstPadBorderX() const
71 // Returns the x coordinate of the right border of the first (the most right)
72 // pad in global coordinate system.
77 // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X();
80 //_____________________________________________________________________________
81 Double_t AliMpPadRowLSegment::LastPadBorderX() const
83 // Returns the x coordinate of the left border of the last (the most left)
84 // pad in global coordinate system.
87 return LastPadCenterX() - GetMotif()->GetPadDimensions().X();
94 //_____________________________________________________________________________
95 Double_t AliMpPadRowLSegment::LeftBorderX() const
97 // Returns the x coordinate of the left row segment border
98 // in global coordinate system.
101 return LastPadBorderX();
104 //_____________________________________________________________________________
105 Double_t AliMpPadRowLSegment::RightBorderX() const
107 // Returns the x coordinate of the right row segment border
108 // in global coordinate system.
111 return FirstPadBorderX();