]>
Commit | Line | Data |
---|---|---|
dee1d5f1 | 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 | ||
ea4cae7a | 16 | // $Id$ |
13985652 | 17 | // $MpId: AliMpPadRowLSegment.cxx,v 1.6 2006/05/24 13:58:46 ivana Exp $ |
ea4cae7a | 18 | // Category: sector |
19 | // | |
20 | // Class AliMpPadRowLSegment | |
21 | // ------------------------- | |
22 | // Class describing a pad row segment composed of the | |
23 | // the identic pads; | |
24 | // the pads are placed from the offset (defined in the base class) | |
25 | // to the left. | |
26 | // | |
dbe945cc | 27 | // Included in AliRoot: 2003/05/02 |
ea4cae7a | 28 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay |
29 | ||
ea4cae7a | 30 | #include "AliMpPadRowLSegment.h" |
31 | #include "AliMpPadRow.h" | |
32 | #include "AliMpMotif.h" | |
33 | #include "AliMpMotifType.h" | |
34 | ||
13985652 | 35 | /// \cond CLASSIMP |
ea4cae7a | 36 | ClassImp(AliMpPadRowLSegment) |
13985652 | 37 | /// \endcond |
ea4cae7a | 38 | |
39 | //_____________________________________________________________________________ | |
40 | AliMpPadRowLSegment::AliMpPadRowLSegment( | |
41 | AliMpPadRow* padRow, AliMpMotif* motif, | |
42 | Int_t motifPositionId, Int_t nofPads) | |
43 | : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads) | |
44 | { | |
dee1d5f1 | 45 | /// Standard constructor |
ea4cae7a | 46 | } |
47 | ||
48 | //_____________________________________________________________________________ | |
49 | AliMpPadRowLSegment::AliMpPadRowLSegment() | |
50 | : AliMpVPadRowSegment() | |
51 | { | |
dee1d5f1 | 52 | /// Default constructor |
ea4cae7a | 53 | } |
54 | ||
55 | //_____________________________________________________________________________ | |
dee1d5f1 | 56 | AliMpPadRowLSegment::~AliMpPadRowLSegment() |
57 | { | |
58 | /// Destructor | |
ea4cae7a | 59 | } |
60 | ||
61 | // | |
62 | // private methods | |
63 | // | |
64 | ||
65 | //_____________________________________________________________________________ | |
66 | Double_t AliMpPadRowLSegment::FirstPadCenterX() const | |
67 | { | |
dee1d5f1 | 68 | /// Return the x coordinate of the first (the most right) pad center |
69 | /// in the global coordinate system. | |
ea4cae7a | 70 | |
71 | return GetOffsetX() - GetMotif()->GetPadDimensions().X(); | |
72 | } | |
73 | ||
74 | //_____________________________________________________________________________ | |
75 | Double_t AliMpPadRowLSegment::LastPadCenterX() const | |
76 | { | |
dee1d5f1 | 77 | /// Return the x coordinate of the last (the most left) pad center |
78 | /// in the global coordinate system. \n | |
79 | /// !! numbering of pads is in (-x) direction | |
ea4cae7a | 80 | |
81 | return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X(); | |
82 | } | |
83 | ||
84 | //_____________________________________________________________________________ | |
85 | Double_t AliMpPadRowLSegment::FirstPadBorderX() const | |
86 | { | |
dee1d5f1 | 87 | /// Return the x coordinate of the right border of the first (the most right) |
88 | /// pad in the global coordinate system. | |
ea4cae7a | 89 | |
90 | return GetOffsetX(); | |
91 | // Also could be | |
92 | // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X(); | |
93 | } | |
94 | ||
95 | //_____________________________________________________________________________ | |
96 | Double_t AliMpPadRowLSegment::LastPadBorderX() const | |
97 | { | |
dee1d5f1 | 98 | /// Return the x coordinate of the left border of the last (the most left) |
99 | /// pad in the global coordinate system. | |
ea4cae7a | 100 | |
101 | return LastPadCenterX() - GetMotif()->GetPadDimensions().X(); | |
102 | } | |
103 | ||
104 | // | |
105 | // public methods | |
106 | // | |
107 | ||
108 | //_____________________________________________________________________________ | |
109 | Double_t AliMpPadRowLSegment::LeftBorderX() const | |
110 | { | |
dee1d5f1 | 111 | /// Return the x coordinate of the left row segment border |
112 | /// in the global coordinate system. | |
ea4cae7a | 113 | |
114 | return LastPadBorderX(); | |
115 | } | |
116 | ||
117 | //_____________________________________________________________________________ | |
118 | Double_t AliMpPadRowLSegment::RightBorderX() const | |
119 | { | |
dee1d5f1 | 120 | /// Return the x coordinate of the right row segment border |
121 | /// in the global coordinate system. | |
ea4cae7a | 122 | |
123 | return FirstPadBorderX(); | |
124 | } |