CMS 3D CMS Logo

ProxyPixelTopology.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  const Topology::LocalTrackPred &trkPred) const {
19  if (!this->surfaceDeformation())
20  return specificTopology().localPosition(mp);
21 
22  // add correction from SurfaceDeformation
23  const LocalPoint posOld(specificTopology().localPosition(mp)); // 'original position'
25 
26  return LocalPoint(posOld.x() + corr.x(), posOld.y() + corr.y(), posOld.z());
27 }
28 
31  return specificTopology().localError(mp, me);
32 }
33 
36  const MeasurementError &me,
37  const Topology::LocalTrackPred &trkPred) const {
38  // The topology knows to calculate the cartesian error from measurement frame.
39  // But assuming no uncertainty on the SurfaceDeformation variables,
40  // the errors do not change from a simple shift to compensate
41  // that the track 'sees' the surface at another place than it thinks...
42  return specificTopology().localError(mp, me);
43 }
44 
48 }
49 
52  const Topology::LocalTrackAngles &dir) const {
53  if (!this->surfaceDeformation())
55 
56  // subtract correction from SurfaceDeformation
58  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
59 
60  return specificTopology().measurementPosition(posOrig);
61 }
62 
65  return specificTopology().measurementError(lp, le);
66 }
67 
70  const LocalError &le,
71  const Topology::LocalTrackAngles &dir) const {
72  if (!this->surfaceDeformation())
73  return specificTopology().measurementError(lp, le);
74 
75  // subtract correction from SurfaceDeformation
77  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
78 
79  return specificTopology().measurementError(posOrig, le);
80 }
81 
83 int ProxyPixelTopology::channel(const LocalPoint &lp) const { return specificTopology().channel(lp); }
84 
87  if (!this->surfaceDeformation())
88  return specificTopology().channel(lp);
89 
90  // subtract correction from SurfaceDeformation
92  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
93 
94  return specificTopology().channel(posOrig);
95 }
96 
98 std::pair<float, float> ProxyPixelTopology::pixel(const LocalPoint &lp) const { return specificTopology().pixel(lp); }
99 
101 std::pair<float, float> ProxyPixelTopology::pixel(const LocalPoint &lp, const Topology::LocalTrackAngles &dir) const {
102  if (!this->surfaceDeformation())
103  return specificTopology().pixel(lp);
104 
105  // subtract correction from SurfaceDeformation
107  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
108 
109  return specificTopology().pixel(posOrig);
110 }
111 
113 float ProxyPixelTopology::localX(const float mpX) const { return specificTopology().localX(mpX); }
114 
116 float ProxyPixelTopology::localX(const float mpX, const Topology::LocalTrackPred &trkPred) const {
117  if (!this->surfaceDeformation())
118  return specificTopology().localX(mpX);
119 
120  // add correction from SurfaceDeformation
121  float xOld = specificTopology().localX(mpX); // 'original position'
123 
124  return xOld + corr.x();
125 }
126 
128 float ProxyPixelTopology::localY(const float mpY) const { return specificTopology().localY(mpY); }
129 
131 float ProxyPixelTopology::localY(const float mpY, const Topology::LocalTrackPred &trkPred) const {
132  if (!this->surfaceDeformation())
133  return specificTopology().localY(mpY);
134 
135  // add correction from SurfaceDeformation
136  float yOld = specificTopology().localY(mpY); // 'original position'
138 
139  return yOld + corr.y();
140 }
141 
144  theSurfaceDeformation.reset(deformation);
145 }
146 
149  const Topology::LocalTrackAngles &dir) const {
150  const SurfaceDeformation::Local2DPoint pos2D(pos.x(), pos.y()); // change precision and dimension
151 
152  return this->surfaceDeformation()->positionCorrection(pos2D, dir, theLength, theWidth);
153 }
154 
157  return this->surfaceDeformation()->positionCorrection(trk.point(), trk.angles(), theLength, theWidth);
158 }
Point2DBase
Definition: Point2DBase.h:9
ProxyPixelTopology::specificTopology
virtual const PixelTopology & specificTopology() const
Definition: ProxyPixelTopology.h:89
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
ProxyPixelTopology::measurementPosition
MeasurementPoint measurementPosition(const LocalPoint &) const override
Definition: ProxyPixelTopology.cc:46
pos
Definition: PixelAliasList.h:18
Topology::localPosition
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
Topology::LocalTrackPred::angles
const LocalTrackAngles & angles() const
Definition: Topology.h:65
ProxyPixelTopology::measurementError
MeasurementError measurementError(const LocalPoint &lp, const LocalError &le) const override
Definition: ProxyPixelTopology.cc:64
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
ProxyPixelTopology::localError
LocalError localError(const MeasurementPoint &, const MeasurementError &) const override
Definition: ProxyPixelTopology.cc: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
ProxyPixelTopology::channel
int channel(const LocalPoint &) const override
Definition: ProxyPixelTopology.cc:83
ProxyPixelTopology::theWidth
float theWidth
Definition: ProxyPixelTopology.h:101
ProxyPixelTopology::localPosition
LocalPoint localPosition(const MeasurementPoint &) const override
Definition: ProxyPixelTopology.cc:12
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
ProxyPixelTopology::positionCorrection
SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint &pos, const Topology::LocalTrackAngles &dir) const
Definition: ProxyPixelTopology.cc:148
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
Topology::measurementError
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
ProxyPixelTopology.h
Vector2DBase
Definition: Vector2DBase.h:8
Bounds.h
Point3DBase< float, LocalTag >
ProxyPixelTopology::surfaceDeformation
const SurfaceDeformation * surfaceDeformation() const
Definition: ProxyPixelTopology.h:86
ProxyPixelTopology::localY
float localY(const float mpY) const override
Definition: ProxyPixelTopology.cc:128
LocalError
Definition: LocalError.h:12
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
ProxyPixelTopology::ProxyPixelTopology
ProxyPixelTopology(PixelGeomDetType const *type, Plane *bp)
Definition: ProxyPixelTopology.cc:8
Topology::LocalTrackAngles
Definition: Topology.h:44
Topology::measurementPosition
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
PixelGeomDetType.h
ProxyPixelTopology::localX
float localX(const float mpX) const override
Definition: ProxyPixelTopology.cc:113
ProxyPixelTopology::theLength
float theLength
Definition: ProxyPixelTopology.h:101
ProxyPixelTopology::setSurfaceDeformation
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
Definition: ProxyPixelTopology.cc:143
ProxyPixelTopology::theSurfaceDeformation
std::unique_ptr< const SurfaceDeformation > theSurfaceDeformation
Definition: ProxyPixelTopology.h:102
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
ProxyPixelTopology::pixel
std::pair< float, float > pixel(const LocalPoint &p) const override
Definition: ProxyPixelTopology.cc:98
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
PixelGeomDetType
Definition: PixelGeomDetType.h:11
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23