1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 // $MpId: AliMpPadRowLSegment.cxx,v 1.6 2006/05/24 13:58:46 ivana Exp $
20 // Class AliMpPadRowLSegment
21 // -------------------------
22 // Class describing a pad row segment composed of the
24 // the pads are placed from the offset (defined in the base class)
27 // Included in AliRoot: 2003/05/02
28 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
30 #include "AliMpPadRowLSegment.h"
31 #include "AliMpPadRow.h"
32 #include "AliMpMotif.h"
33 #include "AliMpMotifType.h"
36 ClassImp(AliMpPadRowLSegment)
39 //_____________________________________________________________________________
40 AliMpPadRowLSegment::AliMpPadRowLSegment(
41 AliMpPadRow* padRow, AliMpMotif* motif,
42 Int_t motifPositionId, Int_t nofPads)
43 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
45 /// Standard constructor
48 //_____________________________________________________________________________
49 AliMpPadRowLSegment::AliMpPadRowLSegment()
50 : AliMpVPadRowSegment()
52 /// Default constructor
55 //_____________________________________________________________________________
56 AliMpPadRowLSegment::~AliMpPadRowLSegment()
65 //_____________________________________________________________________________
66 Double_t AliMpPadRowLSegment::FirstPadCenterX() const
68 /// Return the x coordinate of the first (the most right) pad center
69 /// in the global coordinate system.
71 return GetOffsetX() - GetMotif()->GetPadDimensions().X();
74 //_____________________________________________________________________________
75 Double_t AliMpPadRowLSegment::LastPadCenterX() const
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
81 return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X();
84 //_____________________________________________________________________________
85 Double_t AliMpPadRowLSegment::FirstPadBorderX() const
87 /// Return the x coordinate of the right border of the first (the most right)
88 /// pad in the global coordinate system.
92 // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X();
95 //_____________________________________________________________________________
96 Double_t AliMpPadRowLSegment::LastPadBorderX() const
98 /// Return the x coordinate of the left border of the last (the most left)
99 /// pad in the global coordinate system.
101 return LastPadCenterX() - GetMotif()->GetPadDimensions().X();
108 //_____________________________________________________________________________
109 Double_t AliMpPadRowLSegment::LeftBorderX() const
111 /// Return the x coordinate of the left row segment border
112 /// in the global coordinate system.
114 return LastPadBorderX();
117 //_____________________________________________________________________________
118 Double_t AliMpPadRowLSegment::RightBorderX() const
120 /// Return the x coordinate of the right row segment border
121 /// in the global coordinate system.
123 return FirstPadBorderX();