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++);
99 return std::make_unique<DDRotation>(
ddname,
rot);
104 double thetaX,
double phiX,
105 double thetaY,
double phiY,
106 double thetaZ,
double phiZ)
114 double check = (x.Cross(y)).Dot(z);
115 if (fabs(1.-check)>tol) {
116 edm::LogError(
"DDRotation") << ddname <<
" is not a RIGHT-handed orthonormal matrix!" << std::endl;
138 double thetaX,
double phiX,
139 double thetaY,
double phiY,
140 double thetaZ,
double phiZ)
149 double check = (x.Cross(y)).Dot(z);
150 if (fabs(1.+check)>tol) {
151 edm::LogError(
"DDRotation") << ddname <<
" is not a LEFT-handed orthonormal matrix!" << std::endl;
165 double thetaY,
double phiY,
166 double thetaZ,
double phiZ)
174 double check = (x.Cross(y)).Dot(z);
175 if ((1.-fabs(check))>tol) {
176 std::ostringstream
o;
177 o <<
"matrix is not an (left or right handed) orthonormal matrix! (in deg)" << std::endl
178 <<
" thetaX=" << thetaX/deg <<
" phiX=" << phiX/deg << std::endl
179 <<
" thetaY=" << thetaY/deg <<
" phiY=" << phiY/deg << std::endl
180 <<
" 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 std::unique_ptr< DDRotation > DDrotPtr(const DDName &, DDRotationMatrix *)
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