7 #include "CLHEP/Units/GlobalSystemOfUnits.h"
8 #include "CLHEP/Units/SystemOfUnits.h"
17 #include "Math/GenVector/AxisAngle.h"
18 #include "Math/GenVector/Cartesian3D.h"
19 #include "Math/GenVector/DisplacementVector3D.h"
25 os << *(defined.first) <<
" ";
29 os <<
"t=" << ra.Axis().Theta()/deg <<
"deg "
30 <<
"p=" << ra.Axis().Phi()/deg <<
"deg "
31 <<
"a=" << ra.Angle()/deg <<
"deg";
34 os <<
"* rotation not defined * ";
38 os <<
"* rotation not declared * ";
46 constexpr char const* baseName =
"DdBlNa";
52 static std::atomic<int> countBlank;
54 snprintf(buf, 64,
"%s%i", baseName, countBlank++);
78 static std::atomic<int> countNN;
80 snprintf(buf, 64,
"DdNoNa%i", countNN++);
98 double thetaX,
double phiX,
99 double thetaY,
double phiY,
100 double thetaZ,
double phiZ)
108 double check = (x.Cross(y)).Dot(z);
109 if (fabs(1.-check)>tol) {
110 edm::LogError(
"DDRotation") << ddname <<
" is not a RIGHT-handed orthonormal matrix!" << std::endl;
132 double thetaX,
double phiX,
133 double thetaY,
double phiY,
134 double thetaZ,
double phiZ)
143 double check = (x.Cross(y)).Dot(z);
144 if (fabs(1.+check)>tol) {
145 edm::LogError(
"DDRotation") << ddname <<
" is not a LEFT-handed orthonormal matrix!" << std::endl;
159 double thetaY,
double phiY,
160 double thetaZ,
double phiZ)
168 double check = (x.Cross(y)).Dot(z);
169 if ((1.-fabs(check))>tol) {
170 std::ostringstream
o;
171 o <<
"matrix is not an (left or right handed) orthonormal matrix! (in deg)" << std::endl
172 <<
" thetaX=" << thetaX/deg <<
" phiX=" << phiX/deg << std::endl
173 <<
" thetaY=" << thetaY/deg <<
" phiY=" << phiY/deg << std::endl
174 <<
" thetaZ=" << thetaZ/deg <<
" phiZ=" << phiZ/deg << std::endl;
const DDRotationMatrix * rotation() const
Returns the read-only rotation-matrix.
def_type isDefined() const
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Represents a uniquely identifyable rotation matrix.
T x() const
Cartesian x coordinate.
static value_type & instance()
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Cos< T >::type cos(const T &t)
DDRotation()
refers to the unit-rotation (no rotation at all)
ROOT::Math::AxisAngle DDAxisAngle
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const std::string & name() const
Returns the name.