6 #include "Acts/Geometry/CutoutCylinderVolumeBounds.hpp"
7 #include "Acts/Geometry/CylinderVolumeBounds.hpp"
8 #include "Acts/Geometry/TrapezoidVolumeBounds.hpp"
9 #include "Acts/Visualization/GeometryView3D.hpp"
10 #include "Acts/Geometry/GeometryIdentifier.hpp"
11 #include "Acts/Detector/GeometryIdGenerator.hpp"
12 #include "Acts/Detector/DetectorVolume.hpp"
13 #include "Acts/Detector/PortalGenerators.hpp"
14 #include "Acts/Navigation/DetectorVolumeFinders.hpp"
15 #include "Acts/Navigation/InternalNavigation.hpp"
16 #include "Acts/Navigation/NavigationDelegates.hpp"
17 #include "Acts/Navigation/NavigationState.hpp"
18 #include "Acts/Navigation/DetectorVolumeFinders.hpp"
19 #include "Acts/Visualization/ObjVisualization3D.hpp"
26 declareInterface<IDetectorVolumeBuilderTool>(
this);
32 auto cylinderBounds = std::make_unique<Acts::CylinderVolumeBounds>(0,
m_radiusMax,
m_outerZ);
33 auto cylinderDetectorVolume = Acts::Experimental::DetectorVolumeFactory::construct(
34 Acts::Experimental::defaultPortalGenerator(), gctx->
context(),
"EnvelopeSimple",
35 Acts::Transform3::Identity(), std::move(cylinderBounds), Acts::Experimental::tryAllPortalsAndSurfaces());
36 cylinderDetectorVolume->assignGeometryId(Acts::GeometryIdentifier{}.setVolume(1));
39 Acts::ObjVisualization3D
helper;
40 Acts::GeometryView3D::drawDetectorVolume(
helper, *cylinderDetectorVolume, gctx->
context());
41 helper.write(
"detectorSimple.obj");
45 Acts::Experimental::DetectorComponent::PortalContainer portalContainer;
46 for (
auto [
ip,
p] : Acts::enumerate(cylinderDetectorVolume->portalPtrs())) {
47 portalContainer[
ip] =
p;
50 return Acts::Experimental::DetectorComponent{
51 {cylinderDetectorVolume},
52 std::move(portalContainer),
53 {{cylinderDetectorVolume}, Acts::Experimental::tryRootVolumes()}};