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 }
Point2DBase
Definition: Point2DBase.h:9
LocalError::xy
float xy() const
Definition: LocalError.h:23
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
gather_cfg.cout
cout
Definition: gather_cfg.py:144
RectangularStripTopology::theStripLength
float theStripLength
Definition: RectangularStripTopology.h:51
RectangularStripTopology::measurementPosition
MeasurementPoint measurementPosition(const LocalPoint &) const override
Definition: RectangularStripTopology.cc:48
align::LocalPoint
Point3DBase< Scalar, LocalTag > LocalPoint
Definition: Definitions.h:30
RectangularStripTopology::theNumberOfStrips
int theNumberOfStrips
Definition: RectangularStripTopology.h:50
RectangularStripTopology.h
RectangularStripTopology::localPosition
LocalPoint localPosition(float strip) const override
Definition: RectangularStripTopology.cc:17
RectangularStripTopology::thePitch
float thePitch
Definition: RectangularStripTopology.h:49
LocalError::xx
float xx() const
Definition: LocalError.h:22
MeasurementError
Definition: MeasurementError.h:8
Point3DBase< float, LocalTag >
MeasurementError::uv
float uv() const
Definition: MeasurementError.h:15
MeasurementPoint
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Definition: MeasurementPoint.h:12
RectangularStripTopology::coveredStrips
float coveredStrips(const LocalPoint &lp1, const LocalPoint &lp2) const override
Definition: RectangularStripTopology.cc:44
LocalError
Definition: LocalError.h:12
PV2DBase::y
T y() const
Definition: PV2DBase.h:44
RectangularStripTopology::theOffset
float theOffset
Definition: RectangularStripTopology.h:52
PV2DBase::x
T x() const
Definition: PV2DBase.h:43
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
RectangularStripTopology::RectangularStripTopology
RectangularStripTopology(int nstrips, float pitch, float detlength)
Definition: RectangularStripTopology.cc:7
RectangularStripTopology::strip
float strip(const LocalPoint &) const override
Definition: RectangularStripTopology.cc:35
cmsLHEtoEOSManager.l
l
Definition: cmsLHEtoEOSManager.py:193
RectangularStripTopology::localError
LocalError localError(float strip, float stripErr2) const override
Definition: RectangularStripTopology.cc:25
RectangularStripTopology::measurementError
MeasurementError measurementError(const LocalPoint &, const LocalError &) const override
Definition: RectangularStripTopology.cc:52
MeasurementError::vv
float vv() const
Definition: MeasurementError.h:16
MeasurementError::uu
float uu() const
Definition: MeasurementError.h:14
LocalError::yy
float yy() const
Definition: LocalError.h:24