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