15 {
16 if (!m_surface_)
17 EXCEPTION_RAISE("BadGeometry",
18 "DetectorElement:: Sensor/Element ID not set");
19
20
21
22
23
24
26
27
28 if (element_id > 9999) {
29
30 return m_transform_;
31 }
32
33 auto ctx = gctx.get<GeometryContext*>();
34
35
36 if ((ctx->alignment_map_).count(element_id) > 0) {
37 const Acts::Transform3& c_transform = ctx->alignment_map_[element_id];
38
39 if (false) {
40
41 std::cout << "Aligned transform" << std::endl;
42 std::cout << c_transform.translation() << std::endl;
43 std::cout << c_transform.rotation() << std::endl;
44 std::cout << "Original transform" << std::endl;
45 std::cout << m_transform_.translation() << std::endl;
46 std::cout << m_transform_.rotation() << std::endl;
47 }
48
49 return c_transform;
50 }
51
52 else
53 return m_transform_;
54}
unsigned int unpackGeometryIdentifier(const Acts::GeometryIdentifier &geoId)
The geometry identifier will return vol=0 and lay=0 when it is not valid.