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