Geometry
CommonTopologies
src
RectangularStripTopology.cc
Go to the documentation of this file.
1
#include "
Geometry/CommonTopologies/interface/RectangularStripTopology.h
"
2
3
#include <iostream>
4
#include <cmath>
5
#include <algorithm>
6
7
RectangularStripTopology::RectangularStripTopology
(
int
ns,
float
p
,
float
l
)
8
: thePitch(
p
), theNumberOfStrips(ns), theStripLength(
l
) {
9
theOffset
= -0.5f *
theNumberOfStrips
*
thePitch
;
10
11
#ifdef VERBOSE
12
cout
<<
"Constructing RectangularStripTopology with"
13
<<
" nstrips = "
<< ns <<
" pitch = "
<<
p
<<
" length = "
<<
l
<< endl;
14
#endif
15
}
16
17
LocalPoint
RectangularStripTopology::localPosition
(
float
strip
)
const
{
18
return
LocalPoint
(
strip
*
thePitch
+
theOffset
, 0.0
f
);
19
}
20
21
LocalPoint
RectangularStripTopology::localPosition
(
const
MeasurementPoint
& mp)
const
{
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
29
LocalError
RectangularStripTopology::localError
(
const
MeasurementPoint
&
/*mp*/
,
const
MeasurementError
& merr)
const
{
30
return
LocalError
(merr.
uu
() *
thePitch
*
thePitch
,
31
merr.
uv
() *
thePitch
*
theStripLength
,
32
merr.
vv
() *
theStripLength
*
theStripLength
);
33
}
34
35
float
RectangularStripTopology::strip
(
const
LocalPoint
& lp)
const
{
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
48
MeasurementPoint
RectangularStripTopology::measurementPosition
(
const
LocalPoint
& lp)
const
{
49
return
MeasurementPoint
((lp.
x
() -
theOffset
) /
thePitch
, lp.
y
() /
theStripLength
);
50
}
51
52
MeasurementError
RectangularStripTopology::measurementError
(
const
LocalPoint
&
/*lp*/
,
const
LocalError
& lerr)
const
{
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
Generated for CMSSW Reference Manual by
1.8.16