|
|
Go to the documentation of this file.
10 #include "Math/GenVector/Cartesian3D.h"
11 #include "Math/GenVector/DisplacementVector3D.h"
35 msg +=
" left-handed rotation with a Rotation element. If";
36 msg +=
" you meant to make a reflection, use ReflectionRotation";
37 msg +=
" elements, otherwise, please check your matrix. Other";
38 msg +=
" errors may follow. Rotation matrix not created.";
39 edm::LogError(
"DetectorDescription_Parser_Rotation_and_Reflection")
44 ev.eval(nmspace, atts.find(
"thetaX")->second),
45 ev.eval(nmspace, atts.find(
"phiX")->second),
46 ev.eval(nmspace, atts.find(
"thetaY")->second),
47 ev.eval(nmspace, atts.find(
"phiY")->second),
48 ev.eval(nmspace, atts.find(
"thetaZ")->second),
49 ev.eval(nmspace, atts.find(
"phiZ")->second));
52 msg +=
" rotation using a ReflectionRotation element. ";
53 msg +=
" If you meant to make a Rotation, use Rotation";
54 msg +=
" elements, otherwise, please check your matrix.";
55 msg +=
" Other errors may follow. ReflectionRotation";
56 msg +=
" matrix not created.";
57 edm::LogError(
"DetectorDescription_Parser_Rotation_and_Reflection")
60 std::string msg =
"\nDDLRotationAndReflection::processElement tried to process wrong element.";
93 std::cout <<
"DDLRotationAndReflection Coordinate axes forming rotation matrix " <<
getDDName(nmspace)
94 <<
" are not orthonormal.(tolerance=" << tol <<
" check=" <<
std::abs(
check) <<
")" << std::endl
95 <<
" thetaX=" << (atts.find(
"thetaX")->second) <<
' '
97 <<
" phiX=" << (atts.find(
"phiX")->second) <<
' '
99 <<
" thetaY=" << (atts.find(
"thetaY")->second) <<
' '
101 <<
" phiY=" << (atts.find(
"phiY")->second) <<
' '
103 <<
" thetaZ=" << (atts.find(
"thetaZ")->second) <<
' '
105 <<
" phiZ=" << (atts.find(
"phiZ")->second) <<
' '
107 <<
" WAS NOT CREATED!" << std::endl;
109 }
else if (1.0 +
check <= tol) {
118 if (atts.find(
"thetaX") != atts.end()) {
120 double thetaX =
ev.eval(nmspace, atts.find(
"thetaX")->second);
121 double phiX =
ev.eval(nmspace, atts.find(
"phiX")->second);
133 if (atts.find(
"thetaY") != atts.end()) {
135 double thetaY =
ev.eval(nmspace, atts.find(
"thetaY")->second);
136 double phiY =
ev.eval(nmspace, atts.find(
"phiY")->second);
149 if (atts.find(
"thetaZ") != atts.end()) {
151 double thetaZ =
ev.eval(nmspace, atts.find(
"thetaZ")->second);
152 double phiZ =
ev.eval(nmspace, atts.find(
"phiZ")->second);
ret
prodAgent to be discontinued
virtual void clear(void)
clear this element's contents.
int isLeftHanded(const DD3Vector &x, const DD3Vector &y, const DD3Vector &z, const std::string &nmspace)
returns 1 = left handed rotation matrix, 0 = right-handed, -1 = not orthonormal.
void throwError(const std::string &keyMessage) const
format std::string for throw an error.
constexpr NumType convertRadToDeg(NumType radians)
DDLRotationAndReflection(DDLElementRegistry *myreg)
The main class for processing parsed elements.
DD3Vector makeX(const std::string &nmspace)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Sin< T >::type sin(const T &t)
ClhepEvaluator & evaluator()
Cos< T >::type cos(const T &t)
Compact representation of the geometrical detector hierarchy.
DD3Vector makeY(const std::string &nmspace)
std::map< std::string, std::string > DDXMLAttribute
This is a base class for processing XML elements in the DDD.
const virtual DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
DD3Vector makeZ(const std::string &nmspace)
Represents a uniquely identifyable rotation matrix.
DDLElementRegistry * myRegistry_
Abs< T >::type abs(const T &t)
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.