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 volumeId = geoId.volume();
7 unsigned int layerId = geoId.layer() / 2;
8 unsigned int sensorId = geoId.sensitive() - 1;
9 unsigned int surfaceId = volumeId * 1000 + layerId * 100 + sensorId;
10
11 return surfaceId;
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