|
|
Go to the documentation of this file.
15 #include "Math/GenVector/AxisAngle.h"
16 #include "Math/GenVector/Cartesian3D.h"
17 #include "Math/GenVector/DisplacementVector3D.h"
24 os << *(defined.first) <<
" ";
32 os <<
"* rotation not defined * ";
35 os <<
"* rotation not declared * ";
41 constexpr
char const* baseName =
"DdBlNa";
47 static std::atomic<int> countBlank;
49 snprintf(
buf, 64,
"%s%i", baseName, countBlank++);
61 static std::atomic<int> countNN;
63 snprintf(
buf, 64,
"DdNoNa%i", countNN++);
72 std::unique_ptr<DDRotation>
DDrotPtr(
const DDName& ddname, std::unique_ptr<DDRotationMatrix>
rot) {
74 return std::make_unique<DDRotation>(ddname,
std::move(
rot));
87 if (fabs(1. -
check) > tol) {
88 edm::LogError(
"DDRotation") << ddname <<
" is not a RIGHT-handed orthonormal matrix!" << std::endl;
93 std::make_unique<DDRotationMatrix>(
x.x(),
y.x(),
z.x(),
x.y(),
y.y(),
z.y(),
x.z(),
y.z(),
z.z()));
110 if (fabs(1. +
check) > tol) {
111 edm::LogError(
"DDRotation") << ddname <<
" is not a LEFT-handed orthonormal matrix!" << std::endl;
116 std::make_unique<DDRotationMatrix>(
x.x(),
y.x(),
z.x(),
x.y(),
y.y(),
z.y(),
x.z(),
y.z(),
z.z()));
129 if ((1. - fabs(
check)) > tol) {
130 std::ostringstream
o;
131 o <<
"matrix is not an (left or right handed) orthonormal matrix! (in deg)" << std::endl
140 return std::make_unique<DDRotationMatrix>(
x.x(),
y.x(),
z.x(),
x.y(),
y.y(),
z.y(),
x.z(),
y.z(),
z.z());
std::pair< const N *, bool > def_type
DDName is used to identify DDD entities uniquely.
std::unique_ptr< DDRotation > DDrotPtr(const DDName &ddname, std::unique_ptr< DDRotationMatrix > rot)
constexpr NumType convertRadToDeg(NumType radians)
DDRotation DDrotReflect(const DDName &ddname, std::unique_ptr< DDRotationMatrix > rot)
std::ostream & operator<<(std::ostream &os, const DDRotation &r)
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
std::unique_ptr< DDRotationMatrix > DDcreateRotationMatrix(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
create a new DDRotationMatrix in the GEANT3 style.
const DDName & name() const
ROOT::Math::AxisAngle DDAxisAngle
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
DDRotation DDrot(const DDName &ddname, std::unique_ptr< DDRotationMatrix > rot)
Definition of a uniquely identifiable rotation matrix named by DDName name.
const std::string & name() const
Returns the name.
DDRotation()
refers to the unit-rotation (no rotation at all)
Log< level::Error, false > LogError
std::unique_ptr< T, impl::DeviceDeleter > unique_ptr
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
void create(const DDName &name, std::unique_ptr< DDRotationMatrix > vals)
Represents a uniquely identifyable rotation matrix.
DDRotation DDanonymousRot(std::unique_ptr< DDRotationMatrix > rot)
Defines a anonymous rotation or rotation-reflection matrix.
ROOT::Math::Rotation3D DDRotation