10 {
11 if (!m_surface)
12 throw std::logic_error("DetectorElement:: Sensor/Element ID not set");
13
14
15
16
17
18
20
21
22 if (elementId > 9999) {
23
24 return m_transform;
25 }
26
27 auto ctx = gctx.get<GeometryContext*>();
28
29
30 if ((ctx->alignment_map).count(elementId) > 0) {
31 const Acts::Transform3& c_transform = ctx->alignment_map[elementId];
32
33 if (m_debug) {
34 std::cout << "Aligned transform" << std::endl;
35 std::cout << c_transform.translation() << std::endl;
36 std::cout << c_transform.rotation() << std::endl;
37 std::cout << "Original transform" << std::endl;
38 std::cout << m_transform.translation() << std::endl;
39 std::cout << m_transform.rotation() << std::endl;
40 }
41
42 return c_transform;
43 }
44
45 else
46 return m_transform;
47}
unsigned int unpackGeometryIdentifier(const Acts::GeometryIdentifier &geoId)
The geometry identifier will return vol=0 and lay=0 when it is not valid.