CMS 3D CMS Logo

ProxyStripTopology.cc
Go to the documentation of this file.
3 
6 
9  : theType(type), theLength(bp->bounds().length()), theWidth(bp->bounds().width()) {}
10 
12 /* inlined
13 LocalPoint ProxyStripTopology::localPosition( const MeasurementPoint& mp ) const
14 {
15  return specificTopology().localPosition(mp);
16 
17 // FIXME: Better this way? Well, but posOrig will not contain useful y!
18 // if (!this->surfaceDeformation()) return specificTopology().localPosition(mp);
19 //
20 // // correct with position information from input and zero track angles
21 // const LocalPoint posOrig(specificTopology().localPosition(mp));
22 // return this->localPosition(mp, Topology::LocalTrackPred(posOrig.x(), posOrig.y(), 0., 0.));
23 }
24 */
25 
28  const Topology::LocalTrackPred &trkPred) const {
29  if (!this->surfaceDeformation())
30  return specificTopology().localPosition(mp);
31 
32  // add correction from SurfaceDeformation
33  const LocalPoint posOld(specificTopology().localPosition(mp)); // 'original position'
35 
36  return LocalPoint(posOld.x() + corr.x(), posOld.y() + corr.y(), posOld.z());
37 }
38 
40 /* inlined
41 LocalPoint ProxyStripTopology::localPosition( float strip ) const
42 {
43  return specificTopology().localPosition(strip);
44 
45 // FIXME: Better this way? Well, but posOrig will not contain useful y!
46 // if (!this->surfaceDeformation()) return specificTopology().localPosition(strip);
47 
48 // // correct with position information from input and zero track angles
49 // const LocalPoint posOrig(specificTopology().localPosition(strip));
50 // return this->localPosition(mp, Topology::LocalTrackPred(posOrig.x(), posOrig.y(), 0., 0.));
51 }
52 */
53 
56  if (!this->surfaceDeformation())
57  return specificTopology().localPosition(strip);
58 
59  // add correction from SurfaceDeformation
61 
63  return LocalPoint(posOld.x() + corr.x(), posOld.y() + corr.y(), posOld.z());
64 }
65 
67 LocalError ProxyStripTopology::localError(float strip, float stripErr2, const Topology::LocalTrackPred &trkPred) const {
68  // 'strip' is from measurement frame and the topology knows to
69  // calculate the cartesian error.
70  // But assuming no uncertainty on the SurfaceDeformation variables,
71  // the errors do not change from a simple shift to compensate
72  // that the track 'sees' the surface at another place than it thinks...
73 
74  // In case of TwoBowedSurfacesDeformation one could add corrections here due to
75  // relative rotations of the sensors...
76  return specificTopology().localError(strip, stripErr2);
77 }
78 
81  const MeasurementError &me,
82  const Topology::LocalTrackPred &trkPred) const {
83  // See comment in localError(float strip, float stripErr2,
84  // const Topology::LocalTrackPred &trkPred)!
85  return specificTopology().localError(mp, me);
86 }
87 
90  const Topology::LocalTrackAngles &dir) const {
91  if (!this->surfaceDeformation())
93 
94  // subtract correction from SurfaceDeformation
96  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
97 
98  return specificTopology().measurementPosition(posOrig);
99 }
100 
103  const LocalError &le,
104  const Topology::LocalTrackAngles &dir) const {
105  if (!this->surfaceDeformation())
106  return specificTopology().measurementError(lp, le);
107 
108  // assuming 'lp' comes from a track prediction
109  // (i.e. where the track thinks it hits the surface)
110  // we need to subtract correction from SurfaceDeformation
112  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
113 
114  return specificTopology().measurementError(posOrig, le);
115 }
116 
119  if (!this->surfaceDeformation())
120  return specificTopology().channel(lp);
121 
122  // subtract correction from SurfaceDeformation
124  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
125 
126  return specificTopology().channel(posOrig);
127 }
128 
131  if (!this->surfaceDeformation())
132  return specificTopology().strip(lp);
133 
134  // subtract correction from SurfaceDeformation
136  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
137 
138  return specificTopology().strip(posOrig);
139 }
140 
143  if (!this->surfaceDeformation())
144  return specificTopology().localPitch(lp);
145 
146  // subtract correction from SurfaceDeformation
148  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
149 
150  return specificTopology().localPitch(posOrig);
151 }
152 
155  if (!this->surfaceDeformation())
156  return specificTopology().localStripLength(lp);
157 
158  // subtract correction from SurfaceDeformation
160  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
161 
162  return specificTopology().localStripLength(posOrig);
163 }
164 
167  theSurfaceDeformation.reset(deformation);
168 }
169 
172  const Topology::LocalTrackAngles &dir) const {
173  const SurfaceDeformation::Local2DPoint pos2D(pos.x(), pos.y()); // change precision and dimension
174 
175  return this->surfaceDeformation()->positionCorrection(pos2D, dir, theLength, theWidth);
176 }
177 
180  return this->surfaceDeformation()->positionCorrection(trk.point(), trk.angles(), theLength, theWidth);
181 }
Point2DBase
Definition: Point2DBase.h:9
ApeEstimator_cff.width
width
Definition: ApeEstimator_cff.py:24
ProxyStripTopology.h
StripGeomDetType.h
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
StripTopology::localStripLength
virtual float localStripLength(const LocalPoint &aLP) const =0
StripTopology::localPosition
virtual LocalPoint localPosition(float strip) const =0
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
pos
Definition: PixelAliasList.h:18
ProxyStripTopology::measurementPosition
MeasurementPoint measurementPosition(const LocalPoint &lp) const override
Definition: ProxyStripTopology.h:58
ProxyStripTopology::theWidth
float theWidth
Definition: ProxyStripTopology.h:112
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
StripTopology::localPitch
virtual float localPitch(const LocalPoint &) const =0
ProxyStripTopology::localError
LocalError localError(float strip, float stripErr2) const override
Definition: ProxyStripTopology.h:44
SurfaceDeformation
Definition: SurfaceDeformation.h:18
ProxyStripTopology::setSurfaceDeformation
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
Definition: ProxyStripTopology.cc:166
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
ProxyStripTopology::localPitch
float localPitch(const LocalPoint &lp) const override
Definition: ProxyStripTopology.h:82
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
Topology::measurementError
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
Vector2DBase
Definition: Vector2DBase.h:8
Bounds.h
Point3DBase< float, LocalTag >
StripTopology::strip
virtual float strip(const LocalPoint &) const =0
ProxyStripTopology::channel
int channel(const LocalPoint &lp) const override
Definition: ProxyStripTopology.h:70
ProxyStripTopology::surfaceDeformation
const SurfaceDeformation * surfaceDeformation() const
Definition: ProxyStripTopology.h:97
LocalError
Definition: LocalError.h:12
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
ProxyStripTopology::specificTopology
virtual const StripTopology & specificTopology() const
Definition: ProxyStripTopology.h:100
ProxyStripTopology::localStripLength
float localStripLength(const LocalPoint &lp) const override
Definition: ProxyStripTopology.h:91
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
Topology::LocalTrackAngles
Definition: Topology.h:44
Topology::measurementPosition
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
ProxyStripTopology::theSurfaceDeformation
std::unique_ptr< const SurfaceDeformation > theSurfaceDeformation
Definition: ProxyStripTopology.h:113
ProxyStripTopology::ProxyStripTopology
ProxyStripTopology(StripGeomDetType const *type, Plane *bp)
Definition: ProxyStripTopology.cc:8
StripGeomDetType
Definition: StripGeomDetType.h:11
BoundPlane
ProxyStripTopology::theLength
float theLength
Definition: ProxyStripTopology.h:112
BoundPlane.h
ProxyStripTopology::measurementError
MeasurementError measurementError(const LocalPoint &lp, const LocalError &le) const override
Definition: ProxyStripTopology.h:63
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
ProxyStripTopology::localPosition
LocalPoint localPosition(const MeasurementPoint &mp) const override
Definition: ProxyStripTopology.h:36
StripTopology::localError
virtual LocalError localError(float strip, float stripErr2) const =0
ProxyStripTopology::strip
float strip(const LocalPoint &lp) const override
Definition: ProxyStripTopology.h:73
ProxyStripTopology::positionCorrection
SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint &pos, const Topology::LocalTrackAngles &dir) const
Definition: ProxyStripTopology.cc:171
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23