MUON + CheckCompiler
[u/mrichter/AliRoot.git] / MUON / MUONmapping / AliMpPadRowRSegment.cxx
CommitLineData
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: AliMpPadRowRSegment.cxx,v 1.6 2006/05/24 13:58:46 ivana Exp $
ea4cae7a 18// Category: sector
3d1463c8 19
20//-----------------------------------------------------------------------------
ea4cae7a 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//
dbe945cc 28// Included in AliRoot: 2003/05/02
ea4cae7a 29// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
3d1463c8 30//-----------------------------------------------------------------------------
ea4cae7a 31
ea4cae7a 32#include "AliMpPadRowRSegment.h"
33#include "AliMpPadRow.h"
34#include "AliMpMotif.h"
35#include "AliMpMotifType.h"
36
13985652 37/// \cond CLASSIMP
ea4cae7a 38ClassImp(AliMpPadRowRSegment)
13985652 39/// \endcond
ea4cae7a 40
41//______________________________________________________________________________
42AliMpPadRowRSegment::AliMpPadRowRSegment(AliMpPadRow* padRow, AliMpMotif* motif,
43 Int_t motifPositionId, Int_t nofPads)
44 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
45{
dee1d5f1 46/// Standard constructor
ea4cae7a 47}
48
49//______________________________________________________________________________
50AliMpPadRowRSegment::AliMpPadRowRSegment()
51 : AliMpVPadRowSegment()
52{
dee1d5f1 53/// Default constructor
ea4cae7a 54}
55
56//______________________________________________________________________________
dee1d5f1 57AliMpPadRowRSegment::~AliMpPadRowRSegment()
58{
59/// Destructor
ea4cae7a 60}
61
62//
63// private methods
64//
65
66//______________________________________________________________________________
67Double_t AliMpPadRowRSegment::FirstPadCenterX() const
68{
dee1d5f1 69/// Return the x coordinate of the first (the most left) pad center
70/// in the global coordinate system.
ea4cae7a 71
6e97fbb8 72 return GetOffsetX() + GetMotif()->GetPadDimensionX();
ea4cae7a 73}
74
75//______________________________________________________________________________
76Double_t AliMpPadRowRSegment::LastPadCenterX() const
77{
dee1d5f1 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
ea4cae7a 81
6e97fbb8 82 return GetOffsetX() + (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensionX();
ea4cae7a 83}
84
85//______________________________________________________________________________
86Double_t AliMpPadRowRSegment::FirstPadBorderX() const
87{
dee1d5f1 88/// Return the x coordinate of the left border of the first (the most left)
89/// pad in the global coordinate system.
ea4cae7a 90
91 return GetOffsetX();
92 // Also could be
6e97fbb8 93 // return FirstPadCenterX() + GetMotif()->GetPadDimensionX();
ea4cae7a 94}
95
96//______________________________________________________________________________
97Double_t AliMpPadRowRSegment::LastPadBorderX() const
98{
dee1d5f1 99/// Return the x coordinate of the right border of the last (the most right)
100/// pad in the global coordinate system.
ea4cae7a 101
6e97fbb8 102 return LastPadCenterX() + GetMotif()->GetPadDimensionX();
ea4cae7a 103}
104
105//
106// public methods
107//
108
109//______________________________________________________________________________
110Double_t AliMpPadRowRSegment::LeftBorderX() const
111{
dee1d5f1 112/// Return the x coordinate of the left row segment border
113/// in the global coordinate system.
ea4cae7a 114
115 return FirstPadBorderX();
116}
117
118//______________________________________________________________________________
119Double_t AliMpPadRowRSegment::RightBorderX() const
120{
dee1d5f1 121/// Return the x coordinate of the right row segment border
122/// in the global coordinate system.
ea4cae7a 123
124 return LastPadBorderX();
125}
126