6# include <Acts/Geometry/VolumeBounds.hpp>
7# include <Acts/Geometry/CuboidVolumeBounds.hpp>
8# include <Acts/Geometry/TrapezoidVolumeBounds.hpp>
12 double halfXlowY(
const Acts::VolumeBounds& visitBounds) {
13 switch (visitBounds.type()) {
14 case Acts::VolumeBounds::BoundsType::eCuboid: {
15 const auto& bounds =
static_cast<const Acts::CuboidVolumeBounds&
>(visitBounds);
16 using BoundEnum = Acts::CuboidVolumeBounds::BoundValues;
17 return bounds.get(BoundEnum::eHalfLengthX);
19 case Acts::VolumeBounds::BoundsType::eTrapezoid: {
20 const auto& bounds =
static_cast<const Acts::TrapezoidVolumeBounds&
>(visitBounds);
21 using BoundEnum = Acts::TrapezoidVolumeBounds::BoundValues;
22 return bounds.get(BoundEnum::eHalfLengthXnegY);
28 double halfXhighY(
const Acts::VolumeBounds& visitBounds) {
29 switch (visitBounds.type()) {
30 case Acts::VolumeBounds::BoundsType::eCuboid: {
31 const auto& bounds =
static_cast<const Acts::CuboidVolumeBounds&
>(visitBounds);
32 using BoundEnum = Acts::CuboidVolumeBounds::BoundValues;
33 return bounds.get(BoundEnum::eHalfLengthX);
35 case Acts::VolumeBounds::BoundsType::eTrapezoid: {
36 const auto& bounds =
static_cast<const Acts::TrapezoidVolumeBounds&
>(visitBounds);
37 using BoundEnum = Acts::TrapezoidVolumeBounds::BoundValues;
38 return bounds.get(BoundEnum::eHalfLengthXposY);
44 double halfY(
const Acts::VolumeBounds& visitBounds) {
45 switch (visitBounds.type()) {
46 case Acts::VolumeBounds::BoundsType::eCuboid: {
47 const auto& bounds =
static_cast<const Acts::CuboidVolumeBounds&
>(visitBounds);
48 using BoundEnum = Acts::CuboidVolumeBounds::BoundValues;
49 return bounds.get(BoundEnum::eHalfLengthY);
51 case Acts::VolumeBounds::BoundsType::eTrapezoid: {
52 const auto& bounds =
static_cast<const Acts::TrapezoidVolumeBounds&
>(visitBounds);
53 using BoundEnum = Acts::TrapezoidVolumeBounds::BoundValues;
54 return bounds.get(BoundEnum::eHalfLengthY);
61 double halfZ(
const Acts::VolumeBounds& visitBounds) {
62 switch (visitBounds.type()) {
63 case Acts::VolumeBounds::BoundsType::eCuboid: {
64 const auto& bounds =
static_cast<const Acts::CuboidVolumeBounds&
>(visitBounds);
65 using BoundEnum = Acts::CuboidVolumeBounds::BoundValues;
66 return bounds.get(BoundEnum::eHalfLengthZ);
68 case Acts::VolumeBounds::BoundsType::eTrapezoid: {
69 const auto& bounds =
static_cast<const Acts::TrapezoidVolumeBounds&
>(visitBounds);
70 using BoundEnum = Acts::TrapezoidVolumeBounds::BoundValues;
71 return bounds.get(BoundEnum::eHalfLengthZ);
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
double halfY(const Acts::VolumeBounds &bounds)
Returns the half-Y length for the parsed volume bounds (Trapezoid/ Cuboid)
double halfZ(const Acts::VolumeBounds &bounds)
Returns the half-Z length for the parsed volume bounds (Trapezoid/ Cuboid)
double halfXhighY(const Acts::VolumeBounds &bounds)
Returns the half-Y length @ posiive Y for the parsed volume bounds (Trapezoid/ Cuboid)
double halfXlowY(const Acts::VolumeBounds &bounds)
Returns the half-X length @ negative Y for the parsed volume bounds (Trapezoid/ Cuboid)
#define THROW_EXCEPTION(MESSAGE)