ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::cylinder_portal_generator< detector_t > Class Template Referencefinal

Generates a portal box around a volume that already contains surfaces. More...

#include <detray/builders/cylinder_portal_generator.hpp>

Inheritance diagram for detray::cylinder_portal_generator< detector_t >:
[legend]
Collaboration diagram for detray::cylinder_portal_generator< detector_t >:
[legend]

Classes

struct  boundaries
 Save the boundaries of the cylinder after autofitting the portals. More...

Public Member Functions

 cylinder_portal_generator (const cylinder_portal_config< scalar_t > &cfg)
 Construct from configuration cfg.
void clear () override
 Clear all data in the factory.
auto operator() (typename detector_t::volume_type &volume, typename detector_t::surface_lookup_container &surfaces, typename detector_t::transform_container &transforms, typename detector_t::mask_container &masks, typename detector_t::geometry_context ctx={}) -> dindex_range override
 Create minimum aabbs around all surfaces that are passed and then construct cylinder and disc portals using the measures of the global aabb.
auto push_back (std::vector< surface_data< detector_t > > &&) -> void override
 Ignore inserted surface records; portal geometry is derived from the existing volume surfaces when this generator is invoked.
void push_back (surface_data< detector_t > &&) override
 Add data to the factory.
auto size () const -> dindex override
const boundaries & volume_boundaries () const
 Access the volume boundaries after fitting.
Public Member Functions inherited from detray::surface_factory_interface< detector_t >
virtual dindex size () const =0
virtual void push_back (std::vector< surface_data< detector_t > > &&data)=0

Additional Inherited Members

Public Types inherited from detray::surface_factory_interface< detector_t >
using navigation_link = typename detector_t::surface_type::navigation_link
 Navigation link type used by surfaces produced by the factory.
Protected Member Functions inherited from detray::surface_factory_interface< detector_t >
template<typename container_t, typename... Args>
dindex insert_in_container (container_t &cont, const typename container_t::value_type value, const dindex idx, Args &&...args) const
 Insert a value in a container at a specific index.

Detailed Description

template<concepts::detector detector_t>
class detray::cylinder_portal_generator< detector_t >

Generates a portal box around a volume that already contains surfaces.

Template Parameters
detector_tthe type of detector the volume belongs to.

Constructor & Destructor Documentation

◆ cylinder_portal_generator()

template<concepts::detector detector_t>
detray::cylinder_portal_generator< detector_t >::cylinder_portal_generator ( const cylinder_portal_config< scalar_t > & cfg)
explicit

Construct from configuration cfg.

Parameters
cfgConfiguration for bounds, envelope, and adjacent volumes.

Member Function Documentation

◆ clear()

template<concepts::detector detector_t>
void detray::cylinder_portal_generator< detector_t >::clear ( )
overridevirtual

Clear all data in the factory.

Implements detray::surface_factory_interface< detector_t >.

◆ operator()()

template<concepts::detector detector_t>
auto detray::cylinder_portal_generator< detector_t >::operator() ( typename detector_t::volume_type & volume,
typename detector_t::surface_lookup_container & surfaces,
typename detector_t::transform_container & transforms,
typename detector_t::mask_container & masks,
typename detector_t::geometry_context ctx = {} )->dindex_range
overridevirtual

Create minimum aabbs around all surfaces that are passed and then construct cylinder and disc portals using the measures of the global aabb.

Parameters
volumethe volume the portals need to be added to.
surfacesthe surface collection to wrap and to add the portals to
transformsthe transforms of the surfaces.
masksthe masks of the surfaces.
ctxthe geometry context (not needed for portals).
Returns
Half-open range of portal surfaces appended to the lookup.

Implements detray::surface_factory_interface< detector_t >.

◆ push_back()

template<concepts::detector detector_t>
void detray::cylinder_portal_generator< detector_t >::push_back ( surface_data< detector_t > && data)
overridevirtual

Add data to the factory.

Parameters
dataSurface record to append.

Implements detray::surface_factory_interface< detector_t >.

◆ size()

template<concepts::detector detector_t>
auto detray::cylinder_portal_generator< detector_t >::size ( ) const->dindex
override
Returns
the number of portals this factory will produce

◆ volume_boundaries()

template<concepts::detector detector_t>
const boundaries & detray::cylinder_portal_generator< detector_t >::volume_boundaries ( ) const

Access the volume boundaries after fitting.

Returns
Fitted inner and outer radii and axial limits.