36 #include <Geant4/G4SystemOfUnits.hh>
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);
133 std::cout <<
"PHG4GDML: Writing definitions..." << std::endl;