CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
LocalPoint localPosition(float strip) const override
float vv() const
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
T y() const
Definition: PV2DBase.h:44
T y() const
Definition: PV3DBase.h:60
float strip(const LocalPoint &) const override
LocalError localError(float strip, float stripErr2) const override
float coveredStrips(const LocalPoint &lp1, const LocalPoint &lp2) const override
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
MeasurementPoint measurementPosition(const LocalPoint &) const override
tuple cout
Definition: gather_cfg.py:144
T x() const
Definition: PV2DBase.h:43
T x() const
Definition: PV3DBase.h:59
float uv() const
MeasurementError measurementError(const LocalPoint &, const LocalError &) const override