CMS 3D CMS Logo

RectangularStripTopology.cc
Go to the documentation of this file.
2 
3 #include <iostream>
4 #include <cmath>
5 #include <algorithm>
6 
8  : thePitch(p), theNumberOfStrips(ns), theStripLength(l) {
10 
11 #ifdef VERBOSE
12  cout << "Constructing RectangularStripTopology with"
13  << " nstrips = " << ns << " pitch = " << p << " length = " << l << endl;
14 #endif
15 }
16 
18  return LocalPoint(strip * thePitch + theOffset, 0.0f);
19 }
20 
22  return LocalPoint(mp.x() * thePitch + theOffset, mp.y() * theStripLength);
23 }
24 
25 LocalError RectangularStripTopology::localError(float /*strip*/, float stripErr2) const {
26  return LocalError(stripErr2 * thePitch * thePitch, 0.f, theStripLength * theStripLength * (1.f / 12.f));
27 }
28 
30  return LocalError(merr.uu() * thePitch * thePitch,
31  merr.uv() * thePitch * theStripLength,
32  merr.vv() * theStripLength * theStripLength);
33 }
34 
36  float aStrip = (lp.x() - theOffset) / thePitch;
37  if (aStrip < 0)
38  aStrip = 0;
39  else if (aStrip > theNumberOfStrips)
40  aStrip = theNumberOfStrips;
41  return aStrip;
42 }
43 
44 float RectangularStripTopology::coveredStrips(const LocalPoint& lp1, const LocalPoint& lp2) const {
45  return (lp1.x() - lp2.x()) / thePitch;
46 }
47 
49  return MeasurementPoint((lp.x() - theOffset) / thePitch, lp.y() / theStripLength);
50 }
51 
53  return MeasurementError(lerr.xx() / (thePitch * thePitch),
54  lerr.xy() / (thePitch * theStripLength),
55  lerr.yy() / (theStripLength * theStripLength));
56 }
float xx() const
Definition: LocalError.h:22
float coveredStrips(const LocalPoint &lp1, const LocalPoint &lp2) const override
float vv() const
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
T y() const
Definition: PV2DBase.h:44
MeasurementPoint measurementPosition(const LocalPoint &) const override
MeasurementError measurementError(const LocalPoint &, const LocalError &) const override
LocalError localError(float strip, float stripErr2) const override
LocalPoint localPosition(float strip) const override
T y() const
Definition: PV3DBase.h:60
float xy() const
Definition: LocalError.h:23
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
float yy() const
Definition: LocalError.h:24
RectangularStripTopology(int nstrips, float pitch, float detlength)
float uu() const
double f[11][100]
float strip(const LocalPoint &) const override
T x() const
Definition: PV2DBase.h:43
T x() const
Definition: PV3DBase.h:59
float uv() const