CMS 3D CMS Logo

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