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 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
15 #include "AliMpPadRowRSegment.h"
16 #include "AliMpPadRow.h"
17 #include "AliMpMotif.h"
18 #include "AliMpMotifType.h"
20 ClassImp(AliMpPadRowRSegment)
22 //______________________________________________________________________________
23 AliMpPadRowRSegment::AliMpPadRowRSegment(AliMpPadRow* padRow, AliMpMotif* motif,
24 Int_t motifPositionId, Int_t nofPads)
25 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
30 //______________________________________________________________________________
31 AliMpPadRowRSegment::AliMpPadRowRSegment()
32 : AliMpVPadRowSegment()
37 //______________________________________________________________________________
38 AliMpPadRowRSegment::~AliMpPadRowRSegment() {
46 //______________________________________________________________________________
47 Double_t AliMpPadRowRSegment::FirstPadCenterX() const
49 // Returns the x coordinate of the first (the most left) pad center
50 // in global coordinate system.
53 return GetOffsetX() + GetMotif()->GetPadDimensions().X();
56 //______________________________________________________________________________
57 Double_t AliMpPadRowRSegment::LastPadCenterX() const
59 // Returns the x coordinate of the last (the most right) pad center
60 // in global coordinate system.
61 // !! numbering of pads is in (-x) direction
64 return GetOffsetX() + (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X();
67 //______________________________________________________________________________
68 Double_t AliMpPadRowRSegment::FirstPadBorderX() const
70 // Returns the x coordinate of the left border of the first (the most left)
71 // pad in global coordinate system.
76 // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X();
79 //______________________________________________________________________________
80 Double_t AliMpPadRowRSegment::LastPadBorderX() const
82 // Returns the x coordinate of the right border of the last (the most right)
83 // pad in global coordinate system.
86 return LastPadCenterX() + GetMotif()->GetPadDimensions().X();
93 //______________________________________________________________________________
94 Double_t AliMpPadRowRSegment::LeftBorderX() const
96 // Returns the x coordinate of the left row segment border
97 // in global coordinate system.
100 return FirstPadBorderX();
103 //______________________________________________________________________________
104 Double_t AliMpPadRowRSegment::RightBorderX() const
106 // Returns the x coordinate of the right row segment border
107 // in global coordinate system.
110 return LastPadBorderX();