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 {
11 }
12 
14 /* inlined
15 LocalPoint ProxyStripTopology::localPosition( const MeasurementPoint& mp ) const
16 {
17  return specificTopology().localPosition(mp);
18 
19 // FIXME: Better this way? Well, but posOrig will not contain useful y!
20 // if (!this->surfaceDeformation()) return specificTopology().localPosition(mp);
21 //
22 // // correct with position information from input and zero track angles
23 // const LocalPoint posOrig(specificTopology().localPosition(mp));
24 // return this->localPosition(mp, Topology::LocalTrackPred(posOrig.x(), posOrig.y(), 0., 0.));
25 }
26 */
27 
30  const Topology::LocalTrackPred &trkPred ) const
31 {
32  if (!this->surfaceDeformation()) return specificTopology().localPosition(mp);
33 
34  // add correction from SurfaceDeformation
35  const LocalPoint posOld(specificTopology().localPosition(mp)); // 'original position'
37 
38  return LocalPoint(posOld.x()+corr.x(), posOld.y()+corr.y(), posOld.z());
39 }
40 
42 /* inlined
43 LocalPoint ProxyStripTopology::localPosition( float strip ) const
44 {
45  return specificTopology().localPosition(strip);
46 
47 // FIXME: Better this way? Well, but posOrig will not contain useful y!
48 // if (!this->surfaceDeformation()) return specificTopology().localPosition(strip);
49 
50 // // correct with position information from input and zero track angles
51 // const LocalPoint posOrig(specificTopology().localPosition(strip));
52 // return this->localPosition(mp, Topology::LocalTrackPred(posOrig.x(), posOrig.y(), 0., 0.));
53 }
54 */
55 
58 {
59  if (!this->surfaceDeformation()) return specificTopology().localPosition(strip);
60 
61  // add correction from SurfaceDeformation
62  const LocalPoint posOld(specificTopology().localPosition(strip));
63 
65  return LocalPoint(posOld.x()+corr.x(), posOld.y()+corr.y(), posOld.z());
66 }
67 
68 
69 
72  const Topology::LocalTrackPred &trkPred) const
73 {
74  // 'strip' is from measurement frame and the topology knows to
75  // calculate the cartesian error.
76  // But assuming no uncertainty on the SurfaceDeformation variables,
77  // the errors do not change from a simple shift to compensate
78  // that the track 'sees' the surface at another place than it thinks...
79 
80  // In case of TwoBowedSurfacesDeformation one could add corrections here due to
81  // relative rotations of the sensors...
82  return specificTopology().localError(strip, stripErr2);
83 }
84 
85 
88  const MeasurementError& me,
89  const Topology::LocalTrackPred &trkPred) const
90 {
91  // See comment in localError(float strip, float stripErr2,
92  // const Topology::LocalTrackPred &trkPred)!
93  return specificTopology().localError(mp, me);
94 }
95 
96 
99  const Topology::LocalTrackAngles &dir) const
100 {
101  if (!this->surfaceDeformation()) return specificTopology().measurementPosition(lp);
102 
103  // subtract correction from SurfaceDeformation
105  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
106 
107  return specificTopology().measurementPosition(posOrig);
108 }
109 
110 
113  const Topology::LocalTrackAngles &dir) const
114 {
115  if (!this->surfaceDeformation()) return specificTopology().measurementError(lp, le);
116 
117  // assuming 'lp' comes from a track prediction
118  // (i.e. where the track thinks it hits the surface)
119  // we need to subtract correction from SurfaceDeformation
121  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
122 
123  return specificTopology().measurementError(posOrig, le);
124 }
125 
126 
129 {
130  if (!this->surfaceDeformation()) return specificTopology().channel(lp);
131 
132  // subtract correction from SurfaceDeformation
134  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
135 
136  return specificTopology().channel(posOrig);
137 }
138 
139 
142 {
143  if (!this->surfaceDeformation()) return specificTopology().strip(lp);
144 
145  // subtract correction from SurfaceDeformation
147  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
148 
149  return specificTopology().strip(posOrig);
150 }
151 
152 
155 {
156  if (!this->surfaceDeformation()) return specificTopology().localPitch(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().localPitch(posOrig);
163 }
164 
165 
168 {
169  if (!this->surfaceDeformation()) return specificTopology().localStripLength(lp);
170 
171  // subtract correction from SurfaceDeformation
173  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
174 
175  return specificTopology().localStripLength(posOrig);
176 }
177 
178 
181 {
182  theSurfaceDeformation.reset(deformation);
183 }
184 
188  const Topology::LocalTrackAngles &dir) const
189 {
190  const SurfaceDeformation::Local2DPoint pos2D(pos.x(), pos.y());// change precision and dimension
191 
192  return this->surfaceDeformation()->positionCorrection(pos2D, dir,
194 }
195 
199 {
200  return this->surfaceDeformation()->positionCorrection(trk.point(), trk.angles(),
202 }
type
Definition: HCALResponse.h:21
virtual MeasurementPoint measurementPosition(const LocalPoint &lp) const
virtual LocalError localError(float strip, float stripErr2) const
virtual const StripTopology & specificTopology() const
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:32
T y() const
Definition: PV2DBase.h:46
std::unique_ptr< const SurfaceDeformation > theSurfaceDeformation
virtual Local2DVector positionCorrection(const Local2DPoint &localPos, const LocalTrackAngles &localAngles, double length, double width) const =0
virtual int channel(const LocalPoint &lp) const
virtual float localStripLength(const LocalPoint &aLP) const =0
virtual LocalError localError(float strip, float stripErr2) const =0
T y() const
Definition: PV3DBase.h:63
virtual float strip(const LocalPoint &) const =0
ProxyStripTopology(StripGeomDetType const *type, Plane *bp)
virtual LocalPoint localPosition(float strip) const =0
T z() const
Definition: PV3DBase.h:64
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
virtual float strip(const LocalPoint &lp) const
virtual MeasurementError measurementError(const LocalPoint &lp, const LocalError &le) const
const LocalTrackAngles & angles() const
Definition: Topology.h:68
virtual int channel(const LocalPoint &p) const =0
virtual LocalPoint localPosition(const MeasurementPoint &mp) const
JetCorrectorParameters corr
Definition: classes.h:5
const SurfaceDeformation * surfaceDeformation() const
virtual float localPitch(const LocalPoint &lp) const
const Local2DPoint & point() const
Definition: Topology.h:67
SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint &pos, const Topology::LocalTrackAngles &dir) const
virtual float localPitch(const LocalPoint &) const =0
dbl *** dir
Definition: mlp_gen.cc:35
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
T x() const
Definition: PV2DBase.h:45
T x() const
Definition: PV3DBase.h:62
virtual float localStripLength(const LocalPoint &lp) const