File PortalHelper.hpp

namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

namespace Experimental

Typedefs

using PortalReplacement = std::tuple<std::shared_ptr<Experimental::Portal>, unsigned int, NavigationDirection, std::vector<ActsScalar>, BinningValue>

Definition of a portal replacement when building proto containers It consists of the new portal, the index, the direction, the parameters gathered from the sub volumes, the binning description.

Functions

void attachDetectorVolumeUpdators(const GeometryContext &gctx, const std::vector<std::shared_ptr<DetectorVolume>> &volumes, std::vector<PortalReplacement> &pReplacements)

Create and attach the multi link updator.

Parameters
  • gctx – the geometry context

  • volumes – are the volumes that are pointed to

  • pReplacements – are the portal replacements that are newly connected

std::vector<std::shared_ptr<DetectorVolume>> attachedDetectorVolumes(Portal &portal) noexcept(false)

Method that strips out attached volumes from portals.

Note

it throws an exception if both sides are already taken

Parameters

portal – the portal to be resolved

Returns

a vector of attached volumes

static inline Delegate< std::vector< std::shared_ptr< Portal > > const Transform3 &, const VolumeBounds &, const std::shared_ptr< DetectorVolume > &)> defaultPortalAndSubPortalGenerator ()

Create a default portal generator that connects to the static method.

Note

parameters are ignored in this case

static inline std::vector<std::shared_ptr<Portal>> generatePortalsUpdateInternals(const Transform3 &dTransform, const VolumeBounds &dBounds, const std::shared_ptr<DetectorVolume> &dVolume) noexcept(false)

Calls the portal generation and adds registration to sub portals.

This code is split off the PortalGenerator code in order to allow unit testing of the portal generation wihtout detector volume construction

Parameters
  • dTransform – a contextually resolved transform

  • dBounds – the detecor volume bounds

  • dVolume – the reference to the detector volume which generates this volume

Returns

a vector of newly created portals with registered inside volume