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
const DDName & name() const
Sin< T >::type sin(const T &t)
DDName is used to identify DDD entities uniquely.
DDRotationMatrix * DDcreateRotationMatrix(double thetaX, double phiX, double thetaY, double phiY, double thetaZ, double phiZ)
create a new DDRotationMatrix in the GEANT3 style.
Represents a uniquely identifyable rotation matrix.
static value_type & instance()
std::ostream & operator<<(std::ostream &os, const DDRotation &r)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Cos< T >::type cos(const T &t)
friend DDRotation DDrotReflect(const DDName &, double, double, double, double, double, double)
Defines a rotation-reflection in the Geant3 way.
friend DDRotation DDrot(const DDName &, DDRotationMatrix *)
Definition of a uniquely identifiable rotation matrix named by DDName name.
friend DDRotation DDanonymousRot(DDRotationMatrix *)
Defines a anonymous rotation or rotation-reflection matrix.
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.
const DDName & ddname() const