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 (element_id > 9999) {
23
24 return m_transform_;
25 }
26
27 auto ctx = gctx.get<GeometryContext*>();
28
29
30 if ((ctx->alignment_map_).count(element_id) > 0) {
31 const Acts::Transform3& c_transform = ctx->alignment_map_[element_id];
32
33 if (false) {
34
35 std::cout << "Aligned transform" << std::endl;
36 std::cout << c_transform.translation() << std::endl;
37 std::cout << c_transform.rotation() << std::endl;
38 std::cout << "Original transform" << std::endl;
39 std::cout << m_transform_.translation() << std::endl;
40 std::cout << m_transform_.rotation() << std::endl;
41 }
42
43 return c_transform;
44 }
45
46 else
47 return m_transform_;
48}
unsigned int unpackGeometryIdentifier(const Acts::GeometryIdentifier &geoId)
The geometry identifier will return vol=0 and lay=0 when it is not valid.