Geometry
MTDGeometryBuilder
src
RectangularMTDTopology.cc
Go to the documentation of this file.
1
#include "
Geometry/MTDGeometryBuilder/interface/RectangularMTDTopology.h
"
2
3
//--------------------------------------------------------------------
4
// PixelTopology interface.
5
// Transform LocalPoint in cm to measurement in pitch units.
6
std::pair<float, float>
RectangularMTDTopology::pixel
(
const
LocalPoint
&
p
)
const
{
7
// check limits
8
float
py
=
p
.y();
9
float
px
=
p
.x();
10
11
// In Y
12
float
newybin = (
py
-
m_yoffset
) /
m_pitchy
;
13
// In X
14
float
newxbin = (
px
-
m_xoffset
) /
m_pitchx
;
15
16
return
std::pair<float, float>(newxbin, newybin);
17
}
18
19
//----------------------------------------------------------------------
20
// Topology interface, go from Measurement to Local corrdinates
21
// pixel coordinates (mp) -> cm (LocalPoint)
22
LocalPoint
RectangularMTDTopology::localPosition
(
const
MeasurementPoint
& mp)
const
{
23
float
mpy = mp.
y
();
// measurements
24
float
mpx = mp.
x
();
25
26
float
lpY =
localY
(mpy);
27
float
lpX =
localX
(mpx);
28
29
// Return it as a LocalPoint
30
return
LocalPoint
(lpX, lpY);
31
}
32
33
//--------------------------------------------------------------------
34
//
35
// measuremet to local transformation for X coordinate
36
float
RectangularMTDTopology::localX
(
const
float
mpx)
const
{
37
// The final position in local coordinates
38
float
lpX = mpx *
m_pitchx
+
m_xoffset
;
39
40
return
lpX;
41
}
42
43
float
RectangularMTDTopology::localY
(
const
float
mpy)
const
{
44
// The final position in local coordinates
45
float
lpY = mpy *
m_pitchy
+
m_yoffset
;
46
47
return
lpY;
48
}
49
51
// Get hit errors in LocalPoint coordinates (cm)
52
LocalError
RectangularMTDTopology::localError
(
const
MeasurementPoint
& mp,
const
MeasurementError
&
me
)
const
{
53
return
LocalError
(
me
.uu() *
float
(
m_pitchx
*
m_pitchx
), 0,
me
.vv() *
float
(
m_pitchy
*
m_pitchy
));
54
}
55
57
// Get errors in pixel pitch units.
58
MeasurementError
RectangularMTDTopology::measurementError
(
const
LocalPoint
& lp,
const
LocalError
& le)
const
{
59
return
MeasurementError
(le.
xx
() /
float
(
m_pitchx
*
m_pitchx
), 0, le.
yy
() /
float
(
m_pitchy
*
m_pitchy
));
60
}
Point2DBase
Definition:
Point2DBase.h:9
RectangularMTDTopology::m_pitchy
float m_pitchy
Definition:
RectangularMTDTopology.h:173
dqmMemoryStats.float
float
Definition:
dqmMemoryStats.py:127
multPhiCorr_741_25nsDY_cfi.py
py
Definition:
multPhiCorr_741_25nsDY_cfi.py:12
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
RectangularMTDTopology::pixel
std::pair< float, float > pixel(const LocalPoint &p) const override
Definition:
RectangularMTDTopology.cc:6
RectangularMTDTopology::localY
float localY(const float mpY) const override
Definition:
RectangularMTDTopology.cc:43
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition:
Definitions.h:30
RectangularMTDTopology::localPosition
LocalPoint localPosition(const MeasurementPoint &mp) const override
Definition:
RectangularMTDTopology.cc:22
LocalError::xx
float xx() const
Definition:
LocalError.h:22
RectangularMTDTopology::m_xoffset
float m_xoffset
Definition:
RectangularMTDTopology.h:174
MeasurementError
Definition:
MeasurementError.h:8
RectangularMTDTopology.h
Point3DBase< float, LocalTag >
RectangularMTDTopology::localError
LocalError localError(const MeasurementPoint &, const MeasurementError &) const override
Definition:
RectangularMTDTopology.cc:52
RectangularMTDTopology::m_pitchx
float m_pitchx
Definition:
RectangularMTDTopology.h:172
LocalError
Definition:
LocalError.h:12
PV2DBase::y
T y() const
Definition:
PV2DBase.h:44
PV2DBase::x
T x() const
Definition:
PV2DBase.h:43
RectangularMTDTopology::measurementError
MeasurementError measurementError(const LocalPoint &, const LocalError &) const override
Definition:
RectangularMTDTopology.cc:58
RectangularMTDTopology::localX
float localX(const float mpX) const override
Definition:
RectangularMTDTopology.cc:36
multPhiCorr_741_25nsDY_cfi.px
px
Definition:
multPhiCorr_741_25nsDY_cfi.py:10
RectangularMTDTopology::m_yoffset
float m_yoffset
Definition:
RectangularMTDTopology.h:175
hlt_dqm_clientPB-live_cfg.me
me
Definition:
hlt_dqm_clientPB-live_cfg.py:61
LocalError::yy
float yy() const
Definition:
LocalError.h:24
Generated for CMSSW Reference Manual by
1.8.16