26 double cR = cBounds.get(CylinderBounds::eR);
28 throw(std::invalid_argument(
29 "CylinderVolumeBounds: invalid extrusion thickness."));
33 m_values[eHalfLengthZ] = cBounds.get(CylinderBounds::eHalfLengthZ);
34 m_values[eHalfPhiSector] = cBounds.get(CylinderBounds::eHalfPhiSector);
35 m_values[eAveragePhi] = cBounds.get(CylinderBounds::eAveragePhi);
43 throw(std::invalid_argument(
44 "CylinderVolumeBounds: invalid extrusion thickness."));
46 m_values[eMinR] = rBounds.get(RadialBounds::eMinR);
47 m_values[eMaxR] = rBounds.get(RadialBounds::eMaxR);
49 m_values[eHalfPhiSector] = rBounds.get(RadialBounds::eHalfPhiSector);
50 m_values[eAveragePhi] = rBounds.get(RadialBounds::eAveragePhi);
60 auto dSurface = Surface::makeShared<DiscSurface>(
64 dSurface = Surface::makeShared<DiscSurface>(
104 m_innerCylinderBounds = std::make_shared<const CylinderBounds>(
105 get(eMinR),
get(eHalfLengthZ),
get(eHalfPhiSector),
get(eAveragePhi));
107 m_outerCylinderBounds = std::make_shared<const CylinderBounds>(
108 get(eMaxR),
get(eHalfLengthZ),
get(eHalfPhiSector),
get(eAveragePhi));
109 m_discBounds = std::make_shared<const RadialBounds>(
110 get(eMinR),
get(eMaxR),
get(eHalfPhiSector),
get(eAveragePhi));
113 m_sectorPlaneBounds = std::make_shared<const RectangleBounds>(
114 0.5 * (
get(eMaxR) -
get(eMinR)),
get(eHalfLengthZ));
119 return dumpT<std::ostream>(sl);
124 const Volume* entity)
const {
128 if (
get(eHalfPhiSector) >
M_PI / 2.) {
132 xmin = xmax *
std::cos(
get(eHalfPhiSector));
135 ymax =
get(eMaxR) * std::sin(
get(eHalfPhiSector));
138 xmin =
get(eMinR) *
std::cos(
get(eHalfPhiSector));
141 Vector3D vmin(xmin, ymin, -
get(eHalfLengthZ));
142 Vector3D vmax(xmax, ymax,
get(eHalfLengthZ));
146 return trf ==
nullptr ?
box :
box.transformed(*trf);