]>
Commit | Line | Data |
---|---|---|
ea4cae7a | 1 | // $Id$ |
2 | // Category: sector | |
3 | // | |
4 | // Class AliMpPadRowLSegment | |
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 left. | |
10 | // | |
11 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
12 | ||
13 | #include <TError.h> | |
14 | ||
15 | #include "AliMpPadRowLSegment.h" | |
16 | #include "AliMpPadRow.h" | |
17 | #include "AliMpMotif.h" | |
18 | #include "AliMpMotifType.h" | |
19 | ||
20 | ClassImp(AliMpPadRowLSegment) | |
21 | ||
22 | //_____________________________________________________________________________ | |
23 | AliMpPadRowLSegment::AliMpPadRowLSegment( | |
24 | AliMpPadRow* padRow, AliMpMotif* motif, | |
25 | Int_t motifPositionId, Int_t nofPads) | |
26 | : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads) | |
27 | { | |
28 | // | |
29 | } | |
30 | ||
31 | //_____________________________________________________________________________ | |
32 | AliMpPadRowLSegment::AliMpPadRowLSegment() | |
33 | : AliMpVPadRowSegment() | |
34 | { | |
35 | // | |
36 | } | |
37 | ||
38 | //_____________________________________________________________________________ | |
39 | AliMpPadRowLSegment::~AliMpPadRowLSegment() { | |
40 | // | |
41 | } | |
42 | ||
43 | // | |
44 | // private methods | |
45 | // | |
46 | ||
47 | //_____________________________________________________________________________ | |
48 | Double_t AliMpPadRowLSegment::FirstPadCenterX() const | |
49 | { | |
50 | // Returns the x coordinate of the first (the most right) pad center | |
51 | // in global coordinate system. | |
52 | // --- | |
53 | ||
54 | return GetOffsetX() - GetMotif()->GetPadDimensions().X(); | |
55 | } | |
56 | ||
57 | //_____________________________________________________________________________ | |
58 | Double_t AliMpPadRowLSegment::LastPadCenterX() const | |
59 | { | |
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 | |
63 | // --- | |
64 | ||
65 | return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X(); | |
66 | } | |
67 | ||
68 | //_____________________________________________________________________________ | |
69 | Double_t AliMpPadRowLSegment::FirstPadBorderX() const | |
70 | { | |
71 | // Returns the x coordinate of the right border of the first (the most right) | |
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 AliMpPadRowLSegment::LastPadBorderX() const | |
82 | { | |
83 | // Returns the x coordinate of the left border of the last (the most left) | |
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 AliMpPadRowLSegment::LeftBorderX() const | |
96 | { | |
97 | // Returns the x coordinate of the left row segment border | |
98 | // in global coordinate system. | |
99 | // --- | |
100 | ||
101 | return LastPadBorderX(); | |
102 | } | |
103 | ||
104 | //_____________________________________________________________________________ | |
105 | Double_t AliMpPadRowLSegment::RightBorderX() const | |
106 | { | |
107 | // Returns the x coordinate of the right row segment border | |
108 | // in global coordinate system. | |
109 | // --- | |
110 | ||
111 | return FirstPadBorderX(); | |
112 | } |