59 static const G4double kMatrixPrecision = 10
E-10;
62 if (cosb > kMatrixPrecision)
64 x = std::atan2(mtx.
zy(),mtx.
zz());
65 y = std::atan2(-mtx.
zx(),cosb);
66 z = std::atan2(mtx.
yx(),mtx.
xx());
70 x = std::atan2(-mtx.
yz(),mtx.
yy());
71 y = std::atan2(-mtx.
zx(),cosb);
89 xercesc::DOMElement* scaleElement =
NewElement(tag);
90 scaleElement->setAttributeNode(
NewAttribute(
"name",name));
94 element->appendChild(scaleElement);
105 xercesc::DOMElement* rotationElement =
NewElement(tag);
106 rotationElement->setAttributeNode(
NewAttribute(
"name",name));
110 rotationElement->setAttributeNode(
NewAttribute(
"unit",
"deg"));
111 element->appendChild(rotationElement);
122 xercesc::DOMElement* positionElement =
NewElement(tag);
123 positionElement->setAttributeNode(
NewAttribute(
"name",name));
127 positionElement->setAttributeNode(
NewAttribute(
"unit",
"mm"));
128 element->appendChild(positionElement);
CLHEP::Hep3Vector G4ThreeVector
static const G4double pos
void Position_vectorWrite(xercesc::DOMElement *, const G4String &, const G4String &, const G4ThreeVector &)
static constexpr double mm
xercesc::DOMElement * NewElement(const G4String &)
static const G4double kLinearPrecision
virtual ~G4GDMLWriteDefine()
void Scale_vectorWrite(xercesc::DOMElement *, const G4String &, const G4String &, const G4ThreeVector &)
G4ThreeVector GetAngles(const G4RotationMatrix &)
static const G4double kAngularPrecision
xercesc::DOMElement * defineElement
void Rotation_vectorWrite(xercesc::DOMElement *, const G4String &, const G4String &, const G4ThreeVector &)
static const G4double kRelativePrecision
static constexpr double degree
G4GLOB_DLL std::ostream G4cout
xercesc::DOMAttr * NewAttribute(const G4String &, const G4String &)
virtual void DefineWrite(xercesc::DOMElement *)