15 const xml_comp_t& x_det_comp) {
17 double cx = Acts::getAttrValueOr<double>(x_det_comp,
"cx", 0.);
18 double cy = Acts::getAttrValueOr<double>(x_det_comp,
"cy", 0.);
19 double cz = Acts::getAttrValueOr<double>(x_det_comp,
"cz", 0.);
21 double xx = Acts::getAttrValueOr<double>(x_det_comp,
"xx", 1.);
22 double xy = Acts::getAttrValueOr<double>(x_det_comp,
"xy", 0.);
23 double xz = Acts::getAttrValueOr<double>(x_det_comp,
"xz", 0.);
25 double yx = Acts::getAttrValueOr<double>(x_det_comp,
"yx", 0.);
26 double yy = Acts::getAttrValueOr<double>(x_det_comp,
"yy", 1.);
27 double yz = Acts::getAttrValueOr<double>(x_det_comp,
"yz", 0.);
29 Position xAxis(xx, xy, xz);
30 Position yAxis(yx, yy, yz);
31 Position zAxis = xAxis.Cross(yAxis);
32 double zx = zAxis.X();
33 double zy = zAxis.Y();
34 double zz = zAxis.Z();
37 return Transform3D(xx, yx, zx, cx, xy, yy, zy, cy, xz, yz, zz, cz);
41 const std::array<int, 2u>& axes) {
42 auto tr = tf.translation();
43 auto rot = tf.rotation();
45 std::stringstream sxml;
46 sxml <<
"cx=\"" << tr[0
u] <<
"*mm\" ";
47 sxml <<
"cy=\"" << tr[1
u] <<
"*mm\" ";
48 sxml <<
"cz=\"" << tr[2
u] <<
"*mm\" ";
50 sxml <<
"xx=\"" << rot.col(axes[0
u])[0
u] <<
"\" ";
51 sxml <<
"xy=\"" << rot.col(axes[0u])[1
u] <<
"\" ";
52 sxml <<
"xz=\"" << rot.col(axes[0u])[2
u] <<
"\" ";
53 sxml <<
"yx=\"" << rot.col(axes[1u])[0
u] <<
"\" ";
54 sxml <<
"yy=\"" << rot.col(axes[1u])[1
u] <<
"\" ";
55 sxml <<
"yz=\"" << rot.col(axes[1u])[2
u] <<
"\" ";
64 std::stringstream sxml;
67 std::array<int, 2u> axes = {0, 1};
72 double dx = (boundValues[2
u] - boundValues[0
u]);
73 double dy = (boundValues[3
u] - boundValues[1
u]);
75 sxml <<
"dx=\"" << dx <<
"*mm\" ";
76 sxml <<
"dy=\"" << dy <<
"*mm\" ";
77 sxml <<
"dz=\"" << dz <<
"*mm\" ";
83 double hxmin = boundValues[0
u];
84 double hxmax = boundValues[1
u];
85 double dy = 2 * boundValues[2
u];
87 sxml <<
"x1=\"" << hxmin <<
"*mm\" ";
88 sxml <<
"x2=\"" << hxmax <<
"*mm\" ";
89 sxml <<
"dy=\"" << dy <<
"*mm\" ";
90 sxml <<
"dz=\"" << dz <<
"*mm\" ";
97 auto relTransform = ref * surface.
transform(gctx);
99 sxml <<
" material=\"Air\"";
100 sxml <<
" sensitive=\"true\"/>";