]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpPadRowLSegment.cxx
- Reordering includes from most specific to more general ones
[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.5 2006/03/17 11:38:43 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 ClassImp(AliMpPadRowLSegment)
36
37 //_____________________________________________________________________________
38 AliMpPadRowLSegment::AliMpPadRowLSegment(
39                           AliMpPadRow* padRow, AliMpMotif* motif, 
40                           Int_t motifPositionId, Int_t nofPads)
41   : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
42 {
43 /// Standard constructor 
44 }
45
46 //_____________________________________________________________________________
47 AliMpPadRowLSegment::AliMpPadRowLSegment() 
48   : AliMpVPadRowSegment()
49 {
50 /// Default constructor
51 }
52
53 //_____________________________________________________________________________
54 AliMpPadRowLSegment::~AliMpPadRowLSegment() 
55 {
56 /// Destructor  
57 }
58
59 //
60 // private methods  
61 //
62
63 //_____________________________________________________________________________
64 Double_t AliMpPadRowLSegment::FirstPadCenterX() const
65 {
66 /// Return the x coordinate of the first (the most right) pad center
67 /// in the global coordinate system.
68
69   return GetOffsetX() - GetMotif()->GetPadDimensions().X();
70 }  
71
72 //_____________________________________________________________________________
73 Double_t AliMpPadRowLSegment::LastPadCenterX() const
74 {
75 /// Return the x coordinate of the last (the most left) pad center
76 /// in the global coordinate system.                                         \n       
77 /// !! numbering of pads is in (-x) direction
78
79   return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X();
80 }
81
82 //_____________________________________________________________________________
83 Double_t AliMpPadRowLSegment::FirstPadBorderX() const
84 {
85 /// Return the x coordinate of the right border of the first (the most right) 
86 /// pad in the global coordinate system.
87
88   return GetOffsetX();
89          // Also could be
90          // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X();
91 }  
92
93 //_____________________________________________________________________________
94 Double_t AliMpPadRowLSegment::LastPadBorderX() const
95 {
96 /// Return the x coordinate of the left border of the last (the most left)
97 /// pad in the global coordinate system.
98
99   return LastPadCenterX() - GetMotif()->GetPadDimensions().X();
100 }  
101
102 //
103 // public methods  
104 //
105
106 //_____________________________________________________________________________
107 Double_t  AliMpPadRowLSegment::LeftBorderX() const
108 {
109 /// Return the x coordinate of the left row segment border
110 /// in the global coordinate system.
111
112   return LastPadBorderX();
113 }
114
115 //_____________________________________________________________________________
116 Double_t  AliMpPadRowLSegment::RightBorderX() const
117 {
118 /// Return the x coordinate of the right row segment border
119 /// in the global coordinate system.
120
121   return FirstPadBorderX();
122 }