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
*
6
PerpendicularBoundPlaneBuilder::operator()
(
const
Surface::GlobalPoint
& origin,
7
const
Surface::GlobalVector
&
perp
)
const
8
{
9
// z axis coincides with perp
10
GlobalVector
zAxis
= perp.
unit
();
11
12
// x axis has no global Z component
13
GlobalVector
xAxis
;
14
if
( zAxis.
x
() != 0 || zAxis.
y
() != 0) {
15
// precision is not an issue here, just protect against divizion by zero
16
xAxis =
GlobalVector
( -zAxis.
y
(), zAxis.
x
(), 0).
unit
();
17
}
18
else
{
// perp coincides with global Z
19
xAxis =
GlobalVector
( 1, 0, 0);
20
}
21
22
// y axis obtained by cross product
23
GlobalVector
yAxis
( zAxis.
cross
( xAxis));
24
25
Surface::RotationType
rot
( xAxis.
x
(), xAxis.
y
(), xAxis.
z
(),
26
yAxis
.x(),
yAxis
.y(),
yAxis
.z(),
27
zAxis.
x
(), zAxis.
y
(), zAxis.
z
());
28
29
return
new
BoundPlane
( origin,
rot
);
30
}
BoundPlane
PerpendicularBoundPlaneBuilder.h
Vector3DBase< float, GlobalTag >
MuonErrorMatrixValues_cff.xAxis
xAxis
Definition:
MuonErrorMatrixValues_cff.py:24
BoundPlane
Plane BoundPlane
Definition:
Plane.h:95
PV3DBase::y
T y() const
Definition:
PV3DBase.h:63
MuonErrorMatrixValues_cff.yAxis
yAxis
Definition:
MuonErrorMatrixValues_cff.py:25
csvLumiCalc.unit
unit
Definition:
csvLumiCalc.py:46
MetAnalyzer.zAxis
zAxis
Definition:
MetAnalyzer.py:56
PerpendicularBoundPlaneBuilder::operator()
BoundPlane * operator()(const Surface::GlobalPoint &origin, const Surface::GlobalVector &perp) const
Definition:
PerpendicularBoundPlaneBuilder.cc:6
TkRotation< float >
Vector3DBase::cross
Vector3DBase< typename PreciseFloatType< T, U >::Type, FrameTag > cross(const Vector3DBase< U, FrameTag > &v) const
Definition:
Vector3DBase.h:119
PV3DBase::z
T z() const
Definition:
PV3DBase.h:64
Vector3DBase::unit
Vector3DBase unit() const
Definition:
Vector3DBase.h:57
Point3DBase< float, GlobalTag >
perp
T perp() const
Magnitude of transverse component.
Definition:
Basic3DVectorLD.h:162
PV3DBase::x
T x() const
Definition:
PV3DBase.h:62
makeMuonMisalignmentScenario.rot
rot
Definition:
makeMuonMisalignmentScenario.py:320
GlobalVector
Global3DVector GlobalVector
Definition:
GlobalVector.h:10
Generated for CMSSW Reference Manual by
1.8.11