]>
Commit | Line | Data |
---|---|---|
ea4cae7a | 1 | // $Id$ |
2 | // Category: sector | |
3 | // | |
4 | // Class AliMpPadRowRSegment | |
5 | // ------------------------- | |
6 | // Class describing a pad row segment composed of the | |
7 | // the identic pads; | |
8 | // the pads are placed from the offset (defined in the base class) | |
9 | // to the right. | |
10 | // | |
dbe945cc | 11 | // Included in AliRoot: 2003/05/02 |
ea4cae7a | 12 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay |
13 | ||
14 | #include <TError.h> | |
15 | ||
16 | #include "AliMpPadRowRSegment.h" | |
17 | #include "AliMpPadRow.h" | |
18 | #include "AliMpMotif.h" | |
19 | #include "AliMpMotifType.h" | |
20 | ||
21 | ClassImp(AliMpPadRowRSegment) | |
22 | ||
23 | //______________________________________________________________________________ | |
24 | AliMpPadRowRSegment::AliMpPadRowRSegment(AliMpPadRow* padRow, AliMpMotif* motif, | |
25 | Int_t motifPositionId, Int_t nofPads) | |
26 | : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads) | |
27 | { | |
28 | // | |
29 | } | |
30 | ||
31 | //______________________________________________________________________________ | |
32 | AliMpPadRowRSegment::AliMpPadRowRSegment() | |
33 | : AliMpVPadRowSegment() | |
34 | { | |
35 | // | |
36 | } | |
37 | ||
38 | //______________________________________________________________________________ | |
39 | AliMpPadRowRSegment::~AliMpPadRowRSegment() { | |
40 | // | |
41 | } | |
42 | ||
43 | // | |
44 | // private methods | |
45 | // | |
46 | ||
47 | //______________________________________________________________________________ | |
48 | Double_t AliMpPadRowRSegment::FirstPadCenterX() const | |
49 | { | |
50 | // Returns the x coordinate of the first (the most left) pad center | |
51 | // in global coordinate system. | |
52 | // --- | |
53 | ||
54 | return GetOffsetX() + GetMotif()->GetPadDimensions().X(); | |
55 | } | |
56 | ||
57 | //______________________________________________________________________________ | |
58 | Double_t AliMpPadRowRSegment::LastPadCenterX() const | |
59 | { | |
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 | |
63 | // --- | |
64 | ||
65 | return GetOffsetX() + (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X(); | |
66 | } | |
67 | ||
68 | //______________________________________________________________________________ | |
69 | Double_t AliMpPadRowRSegment::FirstPadBorderX() const | |
70 | { | |
71 | // Returns the x coordinate of the left border of the first (the most left) | |
72 | // pad in global coordinate system. | |
73 | // --- | |
74 | ||
75 | return GetOffsetX(); | |
76 | // Also could be | |
77 | // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X(); | |
78 | } | |
79 | ||
80 | //______________________________________________________________________________ | |
81 | Double_t AliMpPadRowRSegment::LastPadBorderX() const | |
82 | { | |
83 | // Returns the x coordinate of the right border of the last (the most right) | |
84 | // pad in global coordinate system. | |
85 | // --- | |
86 | ||
87 | return LastPadCenterX() + GetMotif()->GetPadDimensions().X(); | |
88 | } | |
89 | ||
90 | // | |
91 | // public methods | |
92 | // | |
93 | ||
94 | //______________________________________________________________________________ | |
95 | Double_t AliMpPadRowRSegment::LeftBorderX() const | |
96 | { | |
97 | // Returns the x coordinate of the left row segment border | |
98 | // in global coordinate system. | |
99 | // --- | |
100 | ||
101 | return FirstPadBorderX(); | |
102 | } | |
103 | ||
104 | //______________________________________________________________________________ | |
105 | Double_t AliMpPadRowRSegment::RightBorderX() const | |
106 | { | |
107 | // Returns the x coordinate of the right row segment border | |
108 | // in global coordinate system. | |
109 | // --- | |
110 | ||
111 | return LastPadBorderX(); | |
112 | } | |
113 |