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