5 #include "CLHEP/Units/GlobalSystemOfUnits.h"
6 #include <Math/AxisAngle.h>
24 os << *(defined.first) <<
" ";
28 os <<
"t=" << ra.Axis().Theta()/deg <<
"deg "
29 <<
"p=" << ra.Axis().Phi()/deg <<
"deg "
30 <<
"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++);
100 double thetaX,
double phiX,
101 double thetaY,
double phiY,
102 double thetaZ,
double phiZ)
110 double check = (x.Cross(y)).Dot(z);
111 if (fabs(1.-check)>tol) {
112 edm::LogError(
"DDRotation") << ddname <<
" is not a RIGHT-handed orthonormal matrix!" << std::endl;
136 double thetaX,
double phiX,
137 double thetaY,
double phiY,
138 double thetaZ,
double phiZ)
147 double check = (x.Cross(y)).Dot(z);
148 if (fabs(1.+check)>tol) {
149 edm::LogError(
"DDRotation") << ddname <<
" is not a LEFT-handed orthonormal matrix!" << std::endl;
166 double thetaY,
double phiY,
167 double thetaZ,
double phiZ)
175 double check = (x.Cross(y)).Dot(z);
176 if ((1.-fabs(check))>tol) {
177 std::ostringstream
o;
178 o <<
"matrix is not an (left or right handed) orthonormal matrix! (in deg)" << std::endl
179 <<
" thetaX=" << thetaX/deg <<
" phiX=" << phiX/deg << std::endl
180 <<
" thetaY=" << thetaY/deg <<
" phiY=" << phiY/deg << std::endl
181 <<
" 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.
bool check(const std::string &)
Cos< T >::type cos(const T &t)
#define DCOUT_V(M_v_Y, M_v_S)
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.