LDMX Software
GeoUtils.cxx
1#include "Tracking/geo/GeoUtils.h"
2
3namespace tracking::geo {
4
5unsigned int unpackGeometryIdentifier(const Acts::GeometryIdentifier& geoId) {
6 unsigned int volume_id = geoId.volume();
7 unsigned int layer_id = geoId.layer() / 2;
8 unsigned int sensor_id = geoId.sensitive() - 1;
9 unsigned int surface_id = volume_id * 1000 + layer_id * 100 + sensor_id;
10
11 return surface_id;
12}
13
14Acts::RotationMatrix3 deltaRot(const Acts::Vector3& deltaR) {
15 // This is fine because RotationMatrix3 doesn't need to be symmetric
16 Acts::RotationMatrix3 rot = Acts::RotationMatrix3::Identity();
17 rot(0, 1) = -deltaR(2);
18 rot(0, 2) = deltaR(1);
19 rot(1, 2) = -deltaR(0);
20
21 rot(1, 0) = -rot(0, 1);
22 rot(2, 0) = -rot(0, 2);
23 rot(2, 1) = -rot(1, 2);
24
25 return rot;
26}
27
28} // namespace tracking::geo
Visualization.
unsigned int unpackGeometryIdentifier(const Acts::GeometryIdentifier &geoId)
The geometry identifier will return vol=0 and lay=0 when it is not valid.
Definition GeoUtils.cxx:5