4 // Class AliMpPadRowRSegment
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 "AliMpPadRowRSegment.h"
17 #include "AliMpPadRow.h"
18 #include "AliMpMotif.h"
19 #include "AliMpMotifType.h"
21 ClassImp(AliMpPadRowRSegment)
23 //______________________________________________________________________________
24 AliMpPadRowRSegment::AliMpPadRowRSegment(AliMpPadRow* padRow, AliMpMotif* motif,
25 Int_t motifPositionId, Int_t nofPads)
26 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
31 //______________________________________________________________________________
32 AliMpPadRowRSegment::AliMpPadRowRSegment()
33 : AliMpVPadRowSegment()
38 //______________________________________________________________________________
39 AliMpPadRowRSegment::~AliMpPadRowRSegment() {
47 //______________________________________________________________________________
48 Double_t AliMpPadRowRSegment::FirstPadCenterX() const
50 // Returns the x coordinate of the first (the most left) pad center
51 // in global coordinate system.
54 return GetOffsetX() + GetMotif()->GetPadDimensions().X();
57 //______________________________________________________________________________
58 Double_t AliMpPadRowRSegment::LastPadCenterX() const
60 // Returns the x coordinate of the last (the most right) 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 AliMpPadRowRSegment::FirstPadBorderX() const
71 // Returns the x coordinate of the left border of the first (the most left)
72 // pad in global coordinate system.
77 // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X();
80 //______________________________________________________________________________
81 Double_t AliMpPadRowRSegment::LastPadBorderX() const
83 // Returns the x coordinate of the right border of the last (the most right)
84 // pad in global coordinate system.
87 return LastPadCenterX() + GetMotif()->GetPadDimensions().X();
94 //______________________________________________________________________________
95 Double_t AliMpPadRowRSegment::LeftBorderX() const
97 // Returns the x coordinate of the left row segment border
98 // in global coordinate system.
101 return FirstPadBorderX();
104 //______________________________________________________________________________
105 Double_t AliMpPadRowRSegment::RightBorderX() const
107 // Returns the x coordinate of the right row segment border
108 // in global coordinate system.
111 return LastPadBorderX();