CMS 3D CMS Logo

ProxyMTDTopology.cc
Go to the documentation of this file.
3 
6 
9  : theType(type), theLength(bp->bounds().length()), theWidth(bp->bounds().width()) {}
10 
13  return specificTopology().localPosition(mp);
14 }
15 
18  if (!this->surfaceDeformation())
19  return specificTopology().localPosition(mp);
20 
21  // add correction from SurfaceDeformation
22  const LocalPoint posOld(specificTopology().localPosition(mp)); // 'original position'
24 
25  return LocalPoint(posOld.x() + corr.x(), posOld.y() + corr.y(), posOld.z());
26 }
27 
30  return specificTopology().localError(mp, me);
31 }
32 
35  const MeasurementError &me,
36  const Topology::LocalTrackPred &trkPred) const {
37  // The topology knows to calculate the cartesian error from measurement frame.
38  // But assuming no uncertainty on the SurfaceDeformation variables,
39  // the errors do not change from a simple shift to compensate
40  // that the track 'sees' the surface at another place than it thinks...
41  return specificTopology().localError(mp, me);
42 }
43 
47 }
48 
51  const Topology::LocalTrackAngles &dir) const {
52  if (!this->surfaceDeformation())
54 
55  // subtract correction from SurfaceDeformation
57  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
58 
59  return specificTopology().measurementPosition(posOrig);
60 }
61 
64  return specificTopology().measurementError(lp, le);
65 }
66 
69  const LocalError &le,
70  const Topology::LocalTrackAngles &dir) const {
71  if (!this->surfaceDeformation())
72  return specificTopology().measurementError(lp, le);
73 
74  // subtract correction from SurfaceDeformation
76  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
77 
78  return specificTopology().measurementError(posOrig, le);
79 }
80 
82 int ProxyMTDTopology::channel(const LocalPoint &lp) const { return specificTopology().channel(lp); }
83 
86  if (!this->surfaceDeformation())
87  return specificTopology().channel(lp);
88 
89  // subtract correction from SurfaceDeformation
91  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
92 
93  return specificTopology().channel(posOrig);
94 }
95 
97 std::pair<float, float> ProxyMTDTopology::pixel(const LocalPoint &lp) const { return specificTopology().pixel(lp); }
98 
100 std::pair<float, float> ProxyMTDTopology::pixel(const LocalPoint &lp, const Topology::LocalTrackAngles &dir) const {
101  if (!this->surfaceDeformation())
102  return specificTopology().pixel(lp);
103 
104  // subtract correction from SurfaceDeformation
106  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
107 
108  return specificTopology().pixel(posOrig);
109 }
110 
112 float ProxyMTDTopology::localX(const float mpX) const { return specificTopology().localX(mpX); }
113 
115 float ProxyMTDTopology::localX(const float mpX, const Topology::LocalTrackPred &trkPred) const {
116  if (!this->surfaceDeformation())
117  return specificTopology().localX(mpX);
118 
119  // add correction from SurfaceDeformation
120  float xOld = specificTopology().localX(mpX); // 'original position'
122 
123  return xOld + corr.x();
124 }
125 
127 float ProxyMTDTopology::localY(const float mpY) const { return specificTopology().localY(mpY); }
128 
130 float ProxyMTDTopology::localY(const float mpY, const Topology::LocalTrackPred &trkPred) const {
131  if (!this->surfaceDeformation())
132  return specificTopology().localY(mpY);
133 
134  // add correction from SurfaceDeformation
135  float yOld = specificTopology().localY(mpY); // 'original position'
137 
138  return yOld + corr.y();
139 }
140 
143  theSurfaceDeformation.reset(deformation);
144 }
145 
148  const Topology::LocalTrackAngles &dir) const {
149  const SurfaceDeformation::Local2DPoint pos2D(pos.x(), pos.y()); // change precision and dimension
150 
151  return this->surfaceDeformation()->positionCorrection(pos2D, dir, theLength, theWidth);
152 }
153 
156  return this->surfaceDeformation()->positionCorrection(trk.point(), trk.angles(), theLength, theWidth);
157 }
Point2DBase
Definition: Point2DBase.h:9
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
ProxyMTDTopology::localX
float localX(const float mpX) const override
Definition: ProxyMTDTopology.cc:112
ProxyMTDTopology::surfaceDeformation
const SurfaceDeformation * surfaceDeformation() const
Definition: ProxyMTDTopology.h:87
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
ProxyMTDTopology::ProxyMTDTopology
ProxyMTDTopology(MTDGeomDetType const *type, Plane *bp)
Definition: ProxyMTDTopology.cc:8
ProxyMTDTopology::positionCorrection
SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint &pos, const Topology::LocalTrackAngles &dir) const
Definition: ProxyMTDTopology.cc:147
pos
Definition: PixelAliasList.h:18
ProxyMTDTopology::specificTopology
virtual const PixelTopology & specificTopology() const
Definition: ProxyMTDTopology.h:90
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
Topology::LocalTrackPred::angles
const LocalTrackAngles & angles() const
Definition: Topology.h:65
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
SurfaceDeformation::positionCorrection
virtual Local2DVector positionCorrection(const Local2DPoint &localPos, const LocalTrackAngles &localAngles, double length, double width) const =0
SurfaceDeformation
Definition: SurfaceDeformation.h:18
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
MTDGeomDetType
Definition: MTDGeomDetType.h:11
ProxyMTDTopology::theWidth
float theWidth
Definition: ProxyMTDTopology.h:102
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
MeasurementError
Definition: MeasurementError.h:8
Topology::channel
virtual int channel(const LocalPoint &p) const =0
Topology::LocalTrackPred::point
const Local2DPoint & point() const
Definition: Topology.h:64
Topology::LocalTrackPred
Definition: Topology.h:56
ProxyMTDTopology::theSurfaceDeformation
std::unique_ptr< const SurfaceDeformation > theSurfaceDeformation
Definition: ProxyMTDTopology.h:103
Topology::measurementError
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
Vector2DBase
Definition: Vector2DBase.h:8
Bounds.h
Point3DBase< float, LocalTag >
ProxyMTDTopology::measurementError
MeasurementError measurementError(const LocalPoint &lp, const LocalError &le) const override
Definition: ProxyMTDTopology.cc:63
ProxyMTDTopology::localY
float localY(const float mpY) const override
Definition: ProxyMTDTopology.cc:127
ProxyMTDTopology::pixel
std::pair< float, float > pixel(const LocalPoint &p) const override
Definition: ProxyMTDTopology.cc:97
ProxyMTDTopology::channel
int channel(const LocalPoint &) const override
Definition: ProxyMTDTopology.cc:82
LocalError
Definition: LocalError.h:12
ProxyMTDTopology::setSurfaceDeformation
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
Definition: ProxyMTDTopology.cc:142
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
Topology::LocalTrackAngles
Definition: Topology.h:44
MTDGeomDetType.h
Topology::measurementPosition
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
ProxyMTDTopology::measurementPosition
MeasurementPoint measurementPosition(const LocalPoint &) const override
Definition: ProxyMTDTopology.cc:45
ProxyMTDTopology.h
ProxyMTDTopology::theLength
float theLength
Definition: ProxyMTDTopology.h:102
ProxyMTDTopology::localPosition
LocalPoint localPosition(const MeasurementPoint &) const override
Definition: ProxyMTDTopology.cc:12
PixelTopology::pixel
virtual std::pair< float, float > pixel(const LocalPoint &p) const =0
Topology::localError
virtual LocalError localError(const MeasurementPoint &, const MeasurementError &) const =0
PixelTopology::localY
virtual float localY(float mpY) const =0
BoundPlane
BoundPlane.h
PixelTopology::localX
virtual float localX(float mpX) const =0
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
ProxyMTDTopology::localError
LocalError localError(const MeasurementPoint &, const MeasurementError &) const override
Definition: ProxyMTDTopology.cc:29
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23