]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpPadRowLSegment.cxx
Previous commit had the bad side-effect of changing the behaviour of Raw QA to comput...
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpPadRowLSegment.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: AliMpPadRowLSegment.cxx,v 1.6 2006/05/24 13:58:46 ivana Exp $
ea4cae7a 18// Category: sector
3d1463c8 19
20//-----------------------------------------------------------------------------
ea4cae7a 21// Class AliMpPadRowLSegment
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 left.
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 "AliMpPadRowLSegment.h"
33#include "AliMpPadRow.h"
34#include "AliMpMotif.h"
35#include "AliMpMotifType.h"
36
13985652 37/// \cond CLASSIMP
ea4cae7a 38ClassImp(AliMpPadRowLSegment)
13985652 39/// \endcond
ea4cae7a 40
41//_____________________________________________________________________________
42AliMpPadRowLSegment::AliMpPadRowLSegment(
43 AliMpPadRow* padRow, AliMpMotif* motif,
44 Int_t motifPositionId, Int_t nofPads)
45 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
46{
dee1d5f1 47/// Standard constructor
ea4cae7a 48}
49
50//_____________________________________________________________________________
51AliMpPadRowLSegment::AliMpPadRowLSegment()
52 : AliMpVPadRowSegment()
53{
dee1d5f1 54/// Default constructor
ea4cae7a 55}
56
57//_____________________________________________________________________________
dee1d5f1 58AliMpPadRowLSegment::~AliMpPadRowLSegment()
59{
60/// Destructor
ea4cae7a 61}
62
63//
64// private methods
65//
66
67//_____________________________________________________________________________
68Double_t AliMpPadRowLSegment::FirstPadCenterX() const
69{
dee1d5f1 70/// Return the x coordinate of the first (the most right) pad center
71/// in the global coordinate system.
ea4cae7a 72
6e97fbb8 73 return GetOffsetX() - GetMotif()->GetPadDimensionX();
ea4cae7a 74}
75
76//_____________________________________________________________________________
77Double_t AliMpPadRowLSegment::LastPadCenterX() const
78{
dee1d5f1 79/// Return the x coordinate of the last (the most left) pad center
80/// in the global coordinate system. \n
81/// !! numbering of pads is in (-x) direction
ea4cae7a 82
6e97fbb8 83 return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensionX();
ea4cae7a 84}
85
86//_____________________________________________________________________________
87Double_t AliMpPadRowLSegment::FirstPadBorderX() const
88{
dee1d5f1 89/// Return the x coordinate of the right border of the first (the most right)
90/// pad in the global coordinate system.
ea4cae7a 91
92 return GetOffsetX();
93 // Also could be
6e97fbb8 94 // return FirstPadCenterX() + GetMotif()->GetPadDimensionX();
ea4cae7a 95}
96
97//_____________________________________________________________________________
98Double_t AliMpPadRowLSegment::LastPadBorderX() const
99{
dee1d5f1 100/// Return the x coordinate of the left border of the last (the most left)
101/// pad in the global coordinate system.
ea4cae7a 102
6e97fbb8 103 return LastPadCenterX() - GetMotif()->GetPadDimensionX();
ea4cae7a 104}
105
106//
107// public methods
108//
109
110//_____________________________________________________________________________
111Double_t AliMpPadRowLSegment::LeftBorderX() const
112{
dee1d5f1 113/// Return the x coordinate of the left row segment border
114/// in the global coordinate system.
ea4cae7a 115
116 return LastPadBorderX();
117}
118
119//_____________________________________________________________________________
120Double_t AliMpPadRowLSegment::RightBorderX() const
121{
dee1d5f1 122/// Return the x coordinate of the right row segment border
123/// in the global coordinate system.
ea4cae7a 124
125 return FirstPadBorderX();
126}