Main Page
Namespaces
Classes
Package Documentation
DataFormats
GeometryCommonDetAlgo
src
PerpendicularBoundPlaneBuilder.cc
Go to the documentation of this file.
1
//#include "Utilities/Configuration/interface/Architecture.h"
2
3
#include "
DataFormats/GeometryCommonDetAlgo/interface/PerpendicularBoundPlaneBuilder.h
"
4
5
BoundPlane
*
PerpendicularBoundPlaneBuilder::operator()
(
const
Surface::GlobalPoint
& origin,
6
const
Surface::GlobalVector
&
perp
)
const
{
7
// z axis coincides with perp
8
GlobalVector
zAxis
= perp.
unit
();
9
10
// x axis has no global Z component
11
GlobalVector
xAxis
;
12
if
(zAxis.
x
() != 0 || zAxis.
y
() != 0) {
13
// precision is not an issue here, just protect against divizion by zero
14
xAxis =
GlobalVector
(-zAxis.
y
(), zAxis.
x
(), 0).
unit
();
15
}
else
{
// perp coincides with global Z
16
xAxis =
GlobalVector
(1, 0, 0);
17
}
18
19
// y axis obtained by cross product
20
GlobalVector
yAxis
(zAxis.
cross
(xAxis));
21
22
Surface::RotationType
rot
(
23
xAxis.
x
(), xAxis.
y
(), xAxis.
z
(),
yAxis
.x(),
yAxis
.y(),
yAxis
.z(), zAxis.
x
(), zAxis.
y
(), zAxis.
z
());
24
25
return
new
BoundPlane
(origin,
rot
);
26
}
BoundPlane
Vector3DBase::cross
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition:
Vector3DBase.h:110
PerpendicularBoundPlaneBuilder.h
Vector3DBase
Definition:
Vector3DBase.h:8
BoundPlane
Plane BoundPlane
Definition:
Plane.h:94
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
HLT_2018_cff.xAxis
xAxis
Definition:
HLT_2018_cff.py:44308
PerpendicularBoundPlaneBuilder::operator()
BoundPlane * operator()(const Surface::GlobalPoint &origin, const Surface::GlobalVector &perp) const
Definition:
PerpendicularBoundPlaneBuilder.cc:5
TkRotation< float >
PV3DBase::z
T z() const
Definition:
PV3DBase.h:61
Vector3DBase::unit
Vector3DBase unit() const
Definition:
Vector3DBase.h:54
HLT_2018_cff.yAxis
yAxis
Definition:
HLT_2018_cff.py:44310
HLT_2018_cff.zAxis
zAxis
Definition:
HLT_2018_cff.py:44309
Point3DBase< float, GlobalTag >
perp
T perp() const
Magnitude of transverse component.
Definition:
Basic3DVectorLD.h:133
PV3DBase::x
T x() const
Definition:
PV3DBase.h:59
makeMuonMisalignmentScenario.rot
rot
Definition:
makeMuonMisalignmentScenario.py:322
GlobalVector
Global3DVector GlobalVector
Definition:
GlobalVector.h:10
unit
Basic3DVector unit() const
Definition:
Basic3DVectorLD.h:162
Generated for CMSSW Reference Manual by
1.8.11