]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpPadRowLSegment.cxx
Slats mapping files in Bending
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpPadRowLSegment.cxx
CommitLineData
ea4cae7a 1// $Id$
2// Category: sector
3//
4// Class AliMpPadRowLSegment
5// -------------------------
6// Class describing a pad row segment composed of the
7// the identic pads;
8// the pads are placed from the offset (defined in the base class)
9// to the left.
10//
dbe945cc 11// Included in AliRoot: 2003/05/02
ea4cae7a 12// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
13
14#include <TError.h>
15
16#include "AliMpPadRowLSegment.h"
17#include "AliMpPadRow.h"
18#include "AliMpMotif.h"
19#include "AliMpMotifType.h"
20
21ClassImp(AliMpPadRowLSegment)
22
23//_____________________________________________________________________________
24AliMpPadRowLSegment::AliMpPadRowLSegment(
25 AliMpPadRow* padRow, AliMpMotif* motif,
26 Int_t motifPositionId, Int_t nofPads)
27 : AliMpVPadRowSegment(padRow, motif, motifPositionId, nofPads)
28{
29//
30}
31
32//_____________________________________________________________________________
33AliMpPadRowLSegment::AliMpPadRowLSegment()
34 : AliMpVPadRowSegment()
35{
36//
37}
38
39//_____________________________________________________________________________
40AliMpPadRowLSegment::~AliMpPadRowLSegment() {
41//
42}
43
44//
45// private methods
46//
47
48//_____________________________________________________________________________
49Double_t AliMpPadRowLSegment::FirstPadCenterX() const
50{
51// Returns the x coordinate of the first (the most right) pad center
52// in global coordinate system.
53// ---
54
55 return GetOffsetX() - GetMotif()->GetPadDimensions().X();
56}
57
58//_____________________________________________________________________________
59Double_t AliMpPadRowLSegment::LastPadCenterX() const
60{
61// Returns the x coordinate of the last (the most left) pad center
62// in global coordinate system.
63// !! numbering of pads is in (-x) direction
64// ---
65
66 return GetOffsetX() - (2.*GetNofPads() - 1)*GetMotif()->GetPadDimensions().X();
67}
68
69//_____________________________________________________________________________
70Double_t AliMpPadRowLSegment::FirstPadBorderX() const
71{
72// Returns the x coordinate of the right border of the first (the most right)
73// pad in global coordinate system.
74// ---
75
76 return GetOffsetX();
77 // Also could be
78 // return FirstPadCenterX() + GetMotif()->GetPadDimensions().X();
79}
80
81//_____________________________________________________________________________
82Double_t AliMpPadRowLSegment::LastPadBorderX() const
83{
84// Returns the x coordinate of the left border of the last (the most left)
85// pad in global coordinate system.
86// ---
87
88 return LastPadCenterX() - GetMotif()->GetPadDimensions().X();
89}
90
91//
92// public methods
93//
94
95//_____________________________________________________________________________
96Double_t AliMpPadRowLSegment::LeftBorderX() const
97{
98// Returns the x coordinate of the left row segment border
99// in global coordinate system.
100// ---
101
102 return LastPadBorderX();
103}
104
105//_____________________________________________________________________________
106Double_t AliMpPadRowLSegment::RightBorderX() const
107{
108// Returns the x coordinate of the right row segment border
109// in global coordinate system.
110// ---
111
112 return FirstPadBorderX();
113}