]>
Commit | Line | Data |
---|---|---|
1 | /************************************************************************** | |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | ||
16 | // $Id$ | |
17 | // $MpId: AliMpPadRowRSegment.cxx,v 1.6 2006/05/24 13:58:46 ivana Exp $ | |
18 | // Category: sector | |
19 | ||
20 | //----------------------------------------------------------------------------- | |
21 | // Class AliMpPadRowRSegment | |
22 | // ------------------------- | |
23 | // Class describing a pad row segment composed of the | |
24 | // the identic pads; | |
25 | // the pads are placed from the offset (defined in the base class) | |
26 | // to the right. | |
27 | // | |
28 | // Included in AliRoot: 2003/05/02 | |
29 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay | |
30 | //----------------------------------------------------------------------------- | |
31 | ||
32 | #include "AliMpPadRowRSegment.h" | |
33 | #include "AliMpPadRow.h" | |
34 | #include "AliMpMotif.h" | |
35 | #include "AliMpMotifType.h" | |
36 | ||
37 | /// \cond CLASSIMP | |
38 | ClassImp(AliMpPadRowRSegment) | |
39 | /// \endcond | |
40 | ||
41 | //______________________________________________________________________________ | |
42 | AliMpPadRowRSegment::AliMpPadRowRSegment(AliMpPadRow* padRow, AliMpMotif* motif, | |
43 | Int_t motifPositionId, Int_t nofPads) | |
44 | : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads) | |
45 | { | |
46 | /// Standard constructor | |
47 | } | |
48 | ||
49 | //______________________________________________________________________________ | |
50 | AliMpPadRowRSegment::AliMpPadRowRSegment() | |
51 | : AliMpVPadRowSegment() | |
52 | { | |
53 | /// Default constructor | |
54 | } | |
55 | ||
56 | //______________________________________________________________________________ | |
57 | AliMpPadRowRSegment::~AliMpPadRowRSegment() | |
58 | { | |
59 | /// Destructor | |
60 | } | |
61 | ||
62 | // | |
63 | // private methods | |
64 | // | |
65 | ||
66 | //______________________________________________________________________________ | |
67 | Double_t AliMpPadRowRSegment::FirstPadCenterX() const | |
68 | { | |
69 | /// Return the x coordinate of the first (the most left) pad center | |
70 | /// in the global coordinate system. | |
71 | ||
72 | return GetOffsetX() + GetMotif()->GetPadDimensionX(); | |
73 | } | |
74 | ||
75 | //______________________________________________________________________________ | |
76 | Double_t AliMpPadRowRSegment::LastPadCenterX() const | |
77 | { | |
78 | /// Return the x coordinate of the last (the most right) pad center | |
79 | /// in the global coordinate system. \n | |
80 | /// !! numbering of pads is in (-x) direction | |
81 | ||
82 | return GetOffsetX() + (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensionX(); | |
83 | } | |
84 | ||
85 | //______________________________________________________________________________ | |
86 | Double_t AliMpPadRowRSegment::FirstPadBorderX() const | |
87 | { | |
88 | /// Return the x coordinate of the left border of the first (the most left) | |
89 | /// pad in the global coordinate system. | |
90 | ||
91 | return GetOffsetX(); | |
92 | // Also could be | |
93 | // return FirstPadCenterX() + GetMotif()->GetPadDimensionX(); | |
94 | } | |
95 | ||
96 | //______________________________________________________________________________ | |
97 | Double_t AliMpPadRowRSegment::LastPadBorderX() const | |
98 | { | |
99 | /// Return the x coordinate of the right border of the last (the most right) | |
100 | /// pad in the global coordinate system. | |
101 | ||
102 | return LastPadCenterX() + GetMotif()->GetPadDimensionX(); | |
103 | } | |
104 | ||
105 | // | |
106 | // public methods | |
107 | // | |
108 | ||
109 | //______________________________________________________________________________ | |
110 | Double_t AliMpPadRowRSegment::LeftBorderX() const | |
111 | { | |
112 | /// Return the x coordinate of the left row segment border | |
113 | /// in the global coordinate system. | |
114 | ||
115 | return FirstPadBorderX(); | |
116 | } | |
117 | ||
118 | //______________________________________________________________________________ | |
119 | Double_t AliMpPadRowRSegment::RightBorderX() const | |
120 | { | |
121 | /// Return the x coordinate of the right row segment border | |
122 | /// in the global coordinate system. | |
123 | ||
124 | return LastPadBorderX(); | |
125 | } | |
126 |