Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
d
e
f
l
m
o
p
s
t
u
v
Related Functions
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Package Documentation
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Geometry
CSCGeometry
src
CSCSlantedWireGeometry.cc
Go to the documentation of this file.
1
#include <
Geometry/CSCGeometry/src/CSCSlantedWireGeometry.h
>
2
#include <
Geometry/CSCGeometry/interface/nint.h
>
3
4
#include <
FWCore/MessageLogger/interface/MessageLogger.h
>
5
6
#include <cmath>
7
8
CSCSlantedWireGeometry::CSCSlantedWireGeometry
(
9
double
wireSpacing,
double
yOfFirstWire,
double
narrow,
double
wide,
double
length,
float
wireAngle)
10
:
CSCWireGeometry
(wireSpacing, yOfFirstWire, narrow, wide, length), theWireAngle(wireAngle) {
11
cosWireAngle
=
cos
(
wireAngle
);
12
sinWireAngle
=
sin
(
wireAngle
);
13
theWireOffset
=
yOfFirstWire
*
cosWireAngle
;
14
LogTrace
(
"CSCWireGeometry|CSC"
) <<
"CSCSlantedWireGeometry: constructed:\n"
15
<<
" wireSpacing = "
<<
wireSpacing
<<
", y1 = "
<<
yOfFirstWire
16
<<
", narrow_width = "
<< narrow <<
", wide_width = "
<< wide
17
<<
", length = "
<< length <<
", wireAngle = "
<<
wireAngle
18
<<
", theWireOffset = "
<<
theWireOffset
;
19
}
20
21
int
CSCSlantedWireGeometry::nearestWire
(
const
LocalPoint
& lp)
const
{
22
// Return nearest wire number to input LocalPoint.
23
// Beware this may not exist or be read out!
24
25
// rotate point to an axis perp. to wires
26
float
yprime = lp.
y
() *
cosWireAngle
- lp.
x
() *
sinWireAngle
;
27
28
// climb the ladder
29
return
1 +
nint
((yprime -
theWireOffset
) /
wireSpacing
());
30
}
31
32
float
CSCSlantedWireGeometry::yOfWire
(
float
wire,
float
x
)
const
{
33
// Return local y of given wire, at given x
34
35
// y in rotated frame with y axis perpendicular to wires...
36
float
yprime =
theWireOffset
+ (wire - 1.) *
wireSpacing
();
37
// then y in usual (unrotated!) local xy frame...
38
return
(yprime +
x
*
sinWireAngle
) /
cosWireAngle
;
39
}
MessageLogger.h
PV3DBase::x
T x() const
Definition:
PV3DBase.h:59
CSCSlantedWireGeometry::theWireOffset
float theWireOffset
Definition:
CSCSlantedWireGeometry.h:51
CSCWireGeometry::wireSpacing
double wireSpacing() const
Definition:
CSCWireGeometry.h:35
nint.h
DDAxes::x
funct::sin
Sin< T >::type sin(const T &t)
Definition:
Sin.h:22
nint
int nint(float a)
Return the nearest integer - analogous to the FORTRAN intrinsic NINT.
Definition:
nint.h:8
funct::cos
Cos< T >::type cos(const T &t)
Definition:
Cos.h:22
CSCSlantedWireGeometry::yOfWire
float yOfWire(float wire, float x=0.) const override
Definition:
CSCSlantedWireGeometry.cc:32
CSCSlantedWireGeometry::CSCSlantedWireGeometry
CSCSlantedWireGeometry(double wireSpacing, double yOfFirstWire, double narrow, double wide, double length, float wireAngle)
Definition:
CSCSlantedWireGeometry.cc:8
Point3DBase< float, LocalTag >
CSCWireGeometry
Definition:
CSCWireGeometry.h:17
CSCSlantedWireGeometry::nearestWire
int nearestWire(const LocalPoint &lp) const override
Definition:
CSCSlantedWireGeometry.cc:21
CSCSlantedWireGeometry::wireAngle
float wireAngle() const override
Definition:
CSCSlantedWireGeometry.h:28
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
CSCSlantedWireGeometry.h
genVertex_cff.x
x
Definition:
genVertex_cff.py:12
CSCSlantedWireGeometry::cosWireAngle
float cosWireAngle
Definition:
CSCSlantedWireGeometry.h:49
LogTrace
#define LogTrace(id)
Definition:
MessageLogger.h:224
CSCWireGeometry::yOfFirstWire
double yOfFirstWire() const
Definition:
CSCWireGeometry.h:40
CSCSlantedWireGeometry::sinWireAngle
float sinWireAngle
Definition:
CSCSlantedWireGeometry.h:50
Generated for CMSSW Reference Manual by
1.8.16