CMS 3D CMS Logo

List of all members | Public Member Functions
PerpendicularBoundPlaneBuilder Class Reference

#include <PerpendicularBoundPlaneBuilder.h>

Public Member Functions

BoundPlaneoperator() (const Surface::GlobalPoint &origin, const Surface::GlobalVector &perp) const
 

Detailed Description

Constructs a plane perpendicular to an axis, and oriented in a special way. Must be updated for reference counting.

Definition at line 11 of file PerpendicularBoundPlaneBuilder.h.

Member Function Documentation

◆ operator()()

BoundPlane * PerpendicularBoundPlaneBuilder::operator() ( const Surface::GlobalPoint origin,
const Surface::GlobalVector perp 
) const

Definition at line 5 of file PerpendicularBoundPlaneBuilder.cc.

6  {
7  // z axis coincides with perp
8  GlobalVector zAxis = perp.unit();
9 
10  // x axis has no global Z component
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 
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 }

References perp(), makeMuonMisalignmentScenario::rot, unit(), HLT_FULL_cff::xAxis, HLT_FULL_cff::yAxis, and HLT_FULL_cff::zAxis.

Vector3DBase
Definition: Vector3DBase.h:8
TkRotation< float >
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
perp
T perp() const
Magnitude of transverse component.
Definition: Basic3DVectorLD.h:133
HLT_FULL_cff.zAxis
zAxis
Definition: HLT_FULL_cff.py:46151
HLT_FULL_cff.yAxis
yAxis
Definition: HLT_FULL_cff.py:46152
unit
Basic3DVector unit() const
Definition: Basic3DVectorLD.h:162
BoundPlane
Plane BoundPlane
Definition: Plane.h:94
HLT_FULL_cff.xAxis
xAxis
Definition: HLT_FULL_cff.py:46150
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322