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: AliMpPadRowRSegment.cxx,v 1.6 2006/05/24 13:58:46 ivana Exp $
20 //-----------------------------------------------------------------------------
21 // Class AliMpPadRowRSegment
22 // -------------------------
23 // Class describing a pad row segment composed of the
25 // the pads are placed from the offset (defined in the base class)
28 // Included in AliRoot: 2003/05/02
29 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
30 //-----------------------------------------------------------------------------
32 #include "AliMpPadRowRSegment.h"
33 #include "AliMpPadRow.h"
34 #include "AliMpMotif.h"
35 #include "AliMpMotifType.h"
38 ClassImp(AliMpPadRowRSegment)
41 //______________________________________________________________________________
42 AliMpPadRowRSegment::AliMpPadRowRSegment(AliMpPadRow* padRow, AliMpMotif* motif,
43 Int_t motifPositionId, Int_t nofPads)
44 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
46 /// Standard constructor
49 //______________________________________________________________________________
50 AliMpPadRowRSegment::AliMpPadRowRSegment()
51 : AliMpVPadRowSegment()
53 /// Default constructor
56 //______________________________________________________________________________
57 AliMpPadRowRSegment::~AliMpPadRowRSegment()
66 //______________________________________________________________________________
67 Double_t AliMpPadRowRSegment::FirstPadCenterX() const
69 /// Return the x coordinate of the first (the most left) pad center
70 /// in the global coordinate system.
72 return GetOffsetX() + GetMotif()->GetPadDimensionX();
75 //______________________________________________________________________________
76 Double_t AliMpPadRowRSegment::LastPadCenterX() const
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
82 return GetOffsetX() + (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensionX();
85 //______________________________________________________________________________
86 Double_t AliMpPadRowRSegment::FirstPadBorderX() const
88 /// Return the x coordinate of the left border of the first (the most left)
89 /// pad in the global coordinate system.
93 // return FirstPadCenterX() + GetMotif()->GetPadDimensionX();
96 //______________________________________________________________________________
97 Double_t AliMpPadRowRSegment::LastPadBorderX() const
99 /// Return the x coordinate of the right border of the last (the most right)
100 /// pad in the global coordinate system.
102 return LastPadCenterX() + GetMotif()->GetPadDimensionX();
109 //______________________________________________________________________________
110 Double_t AliMpPadRowRSegment::LeftBorderX() const
112 /// Return the x coordinate of the left row segment border
113 /// in the global coordinate system.
115 return FirstPadBorderX();
118 //______________________________________________________________________________
119 Double_t AliMpPadRowRSegment::RightBorderX() const
121 /// Return the x coordinate of the right row segment border
122 /// in the global coordinate system.
124 return LastPadBorderX();