CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
15 {
16  return specificTopology().localPosition(mp);
17 
18 // FIXME: Better this way? Well, but posOrig will not contain useful y!
19 // if (!this->surfaceDeformation()) return specificTopology().localPosition(mp);
20 //
21 // // correct with position information from input and zero track angles
22 // const LocalPoint posOrig(specificTopology().localPosition(mp));
23 // return this->localPosition(mp, Topology::LocalTrackPred(posOrig.x(), posOrig.y(), 0., 0.));
24 }
25 
28  const Topology::LocalTrackPred &trkPred ) const
29 {
30  if (!this->surfaceDeformation()) 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 
41 {
42  return specificTopology().localPosition(strip);
43 
44 // FIXME: Better this way? Well, but posOrig will not contain useful y!
45 // if (!this->surfaceDeformation()) return specificTopology().localPosition(strip);
46 
47 // // correct with position information from input and zero track angles
48 // const LocalPoint posOrig(specificTopology().localPosition(strip));
49 // return this->localPosition(mp, Topology::LocalTrackPred(posOrig.x(), posOrig.y(), 0., 0.));
50 }
51 
54 {
55  if (!this->surfaceDeformation()) return specificTopology().localPosition(strip);
56 
57  // add correction from SurfaceDeformation
58  const LocalPoint posOld(specificTopology().localPosition(strip));
59 
61  return LocalPoint(posOld.x()+corr.x(), posOld.y()+corr.y(), posOld.z());
62 }
63 
65 LocalError ProxyStripTopology::localError( float strip, float stripErr2 ) const
66 {
67  return specificTopology().localError(strip, stripErr2);
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 
87  const MeasurementError& me) const
88 {
89  return specificTopology().localError(mp, me);
90 }
91 
94  const MeasurementError& me,
95  const Topology::LocalTrackPred &trkPred) const
96 {
97  // See comment in localError(float strip, float stripErr2,
98  // const Topology::LocalTrackPred &trkPred)!
99  return specificTopology().localError(mp, me);
100 }
101 
104 {
106 }
107 
110  const Topology::LocalTrackAngles &dir) const
111 {
112  if (!this->surfaceDeformation()) return specificTopology().measurementPosition(lp);
113 
114  // subtract correction from SurfaceDeformation
116  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
117 
118  return specificTopology().measurementPosition(posOrig);
119 }
120 
123 {
124  return specificTopology().measurementError(lp, le);
125 }
126 
129  const Topology::LocalTrackAngles &dir) const
130 {
131  if (!this->surfaceDeformation()) return specificTopology().measurementError(lp, le);
132 
133  // assuming 'lp' comes from a track prediction
134  // (i.e. where the track thinks it hits the surface)
135  // we need to subtract correction from SurfaceDeformation
137  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
138 
139  return specificTopology().measurementError(posOrig, le);
140 }
141 
144 {
145  return specificTopology().channel(lp);
146 }
147 
150 {
151  if (!this->surfaceDeformation()) return specificTopology().channel(lp);
152 
153  // subtract correction from SurfaceDeformation
155  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
156 
157  return specificTopology().channel(posOrig);
158 }
159 
161 float ProxyStripTopology::strip(const LocalPoint& lp) const
162 {
163  return specificTopology().strip(lp);
164 }
165 
168 {
169  if (!this->surfaceDeformation()) return specificTopology().strip(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().strip(posOrig);
176 }
177 
179 {
180  return specificTopology().pitch();
181 }
182 
185 {
186  return specificTopology().localPitch(lp);
187 }
188 
191 {
192  if (!this->surfaceDeformation()) return specificTopology().localPitch(lp);
193 
194  // subtract correction from SurfaceDeformation
196  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
197 
198  return specificTopology().localPitch(posOrig);
199 }
200 
203 {
204  return specificTopology().stripAngle(strip);
205 }
206 
209 {
210  return specificTopology().nstrips();
211 }
212 
215 {
216  return specificTopology().stripLength();
217 }
218 
221 {
222  return specificTopology().localStripLength(lp);
223 }
224 
227 {
228  if (!this->surfaceDeformation()) return specificTopology().localStripLength(lp);
229 
230  // subtract correction from SurfaceDeformation
232  const LocalPoint posOrig(lp.x() - corr.x(), lp.y() - corr.y(), lp.z());
233 
234  return specificTopology().localStripLength(posOrig);
235 }
236 
238 const GeomDetType& ProxyStripTopology::type() const { return *theType;}
239 
242 
245 {
246  return specificType().specificTopology();
247 }
248 
251 {
252  theSurfaceDeformation = deformation;
253 }
254 
258  const Topology::LocalTrackAngles &dir) const
259 {
260  const SurfaceDeformation::Local2DPoint pos2D(pos.x(), pos.y());// change precision and dimension
261 
262  return this->surfaceDeformation()->positionCorrection(pos2D, dir,
264 }
265 
269 {
270  return this->surfaceDeformation()->positionCorrection(trk.point(), trk.angles(),
272 }
virtual int nstrips() const
type
Definition: HCALResponse.h:22
virtual int nstrips() const =0
T y() const
Definition: PV2DBase.h:45
virtual float pitch() const
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
virtual int channel(const LocalPoint &lp) const
virtual float stripAngle(float strip) const =0
ProxyStripTopology(StripGeomDetType *type, BoundPlane *bp)
StripGeomDetType * theType
virtual float localStripLength(const LocalPoint &lp) const
T y() const
Definition: PV3DBase.h:62
virtual float strip(const LocalPoint &) const =0
virtual float stripLength() const
virtual float localPitch(const LocalPoint &) const =0
virtual float stripLength() const =0
virtual float stripAngle(float strip) const
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
DeepCopyPointerByClone< const SurfaceDeformation > theSurfaceDeformation
T z() const
Definition: PV3DBase.h:63
virtual const TopologyType & specificTopology() const
const LocalTrackAngles & angles() const
Definition: Topology.h:66
virtual int channel(const LocalPoint &p) const =0
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
JetCorrectorParameters corr
Definition: classes.h:9
virtual float strip(const LocalPoint &lp) const
virtual const GeomDetType & type() const
const SurfaceDeformation * surfaceDeformation() const
virtual LocalPoint localPosition(const MeasurementPoint &mp) const
const Local2DPoint & point() const
Definition: Topology.h:65
SurfaceDeformation::Local2DVector positionCorrection(const LocalPoint &pos, const Topology::LocalTrackAngles &dir) const
virtual Local2DVector positionCorrection(const Local2DPoint &localPos, const LocalTrackAngles &localAngles, double length, double width) const =0
virtual LocalError localError(float strip, float stripErr2) const =0
virtual float localStripLength(const LocalPoint &aLP) const =0
virtual float pitch() const =0
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
virtual StripGeomDetType & specificType() const
virtual LocalPoint localPosition(float strip) const =0
virtual const StripTopology & specificTopology() const
dbl *** dir
Definition: mlp_gen.cc:35
virtual void setSurfaceDeformation(const SurfaceDeformation *deformation)
T x() const
Definition: PV2DBase.h:44
T x() const
Definition: PV3DBase.h:61
virtual LocalError localError(float strip, float stripErr2) const
virtual MeasurementError measurementError(const LocalPoint &lp, const LocalError &le) const
virtual MeasurementPoint measurementPosition(const LocalPoint &lp) const
virtual float localPitch(const LocalPoint &lp) const
unsigned long long le
Definition: VDTMath.h:202