CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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
14  <<" pitch = "<<p
15  <<" length = "<<l
16  <<endl;
17 #endif
18 }
19 
22  return LocalPoint( strip*thePitch + theOffset, 0.0f);
23 }
24 
27  return LocalPoint( mp.x()*thePitch+theOffset, mp.y()*theStripLength);
28 }
29 
31 RectangularStripTopology::localError(float /*strip*/, float stripErr2) const{
32  return LocalError(stripErr2 * thePitch*thePitch,
33  0.f,
35 }
36 
39  const MeasurementError& merr) const{
40  return LocalError(merr.uu() * thePitch*thePitch,
41  merr.uv() * thePitch*theStripLength,
42  merr.vv() * theStripLength*theStripLength);
43 }
44 
45 float
47  float aStrip = (lp.x() - theOffset) / thePitch;
48  if (aStrip < 0 ) aStrip = 0;
49  else if (aStrip > theNumberOfStrips) aStrip = theNumberOfStrips;
50  return aStrip;
51 }
52 
53 float
55  return (lp1.x()-lp2.x())/thePitch;
56 }
57 
60  return MeasurementPoint((lp.x()-theOffset)/thePitch,
61  lp.y()/theStripLength);
62 }
63 
66  const LocalError& lerr) const {
67  return MeasurementError(lerr.xx()/(thePitch*thePitch),
68  lerr.xy()/(thePitch*theStripLength),
70 }
71 
float xx() const
Definition: LocalError.h:24
float vv() const
T y() const
Definition: PV2DBase.h:46
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const
T y() const
Definition: PV3DBase.h:63
virtual LocalError localError(float strip, float stripErr2) const
float xy() const
Definition: LocalError.h:25
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
float yy() const
Definition: LocalError.h:26
RectangularStripTopology(int nstrips, float pitch, float detlength)
float uu() const
double f[11][100]
virtual float strip(const LocalPoint &) const
Local3DPoint LocalPoint
Definition: LocalPoint.h:11
tuple cout
Definition: gather_cfg.py:121
virtual float coveredStrips(const LocalPoint &lp1, const LocalPoint &lp2) const
virtual LocalPoint localPosition(float strip) const
virtual MeasurementPoint measurementPosition(const LocalPoint &) const
T x() const
Definition: PV2DBase.h:45
T x() const
Definition: PV3DBase.h:62
float uv() const