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