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

How to generate surfaces with their corresponding masks and transforms. More...

#include <detray/builders/surface_factory_interface.hpp>

Inheritance diagram for detray::surface_factory_interface< detector_t >:
[legend]

Public Types

using navigation_link = typename detector_t::surface_type::navigation_link
 Navigation link type used by surfaces produced by the factory.

Public Member Functions

virtual void clear ()=0
 Clear all data in the factory.
virtual 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=0
 Construct detector components from the data in the factory and add them the containers of a volume builder.
virtual dindex size () const =0
virtual void push_back (surface_data< detector_t > &&data)=0
 Add data to the factory.
virtual void push_back (std::vector< surface_data< detector_t > > &&data)=0

Protected Member Functions

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::surface_factory_interface< detector_t >

How to generate surfaces with their corresponding masks and transforms.

Can be hard coded surface generation or json reader.

Member Function Documentation

◆ clear()

◆ insert_in_container()

template<concepts::detector detector_t>
template<typename container_t, typename... Args>
dindex detray::surface_factory_interface< detector_t >::insert_in_container ( container_t & cont,
const typename container_t::value_type value,
const dindex idx,
Args &&... args ) const
protected

Insert a value in a container at a specific index.

Parameters
contthe container to be filled
valuethe value to be put into the container
idxthe position where to insert the value
argsoptional additional parameters for the container access
Returns
the position where the value has been copied.

◆ operator()()

template<concepts::detector detector_t>
virtual auto detray::surface_factory_interface< 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
pure virtual

Construct detector components from the data in the factory and add them the containers of a volume builder.

Parameters
volumeVolume receiving the generated surfaces.
surfacesDetector surface lookup to append to.
transformsDetector transform store to append to.
masksDetector mask store to append to.
ctxGeometry context used when constructing transforms.
Returns
Half-open range of newly added surfaces.

Implemented in detray::barrel_generator< detector_t, mask_shape_t >, detray::cuboid_portal_generator< detector_t >, detray::cylinder_portal_generator< detector_t >, detray::endcap_generator< detector_t, mask_shape_t >, detray::factory_decorator< detector_t >, detray::homogeneous_material_factory< detector_t >, detray::homogeneous_material_generator< detector_t >, detray::material_map_factory< detector_t, index_t >, detray::material_map_generator< detector_t >, detray::surface_factory< detector_t, mask_shape_t >, detray::surface_factory< detector_t, unmasked<> >, detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >, and detray::wire_layer_generator< detector_t, mask_shape_t >.

◆ push_back() [1/2]

template<concepts::detector detector_t>
virtual void detray::surface_factory_interface< detector_t >::push_back ( std::vector< surface_data< detector_t > > && data)
pure virtual
Parameters
dataSurface records to append in order.

Implemented in detray::factory_decorator< detector_t >.

◆ push_back() [2/2]

◆ size()

template<concepts::detector detector_t>
virtual dindex detray::surface_factory_interface< detector_t >::size ( ) const
pure virtual
Returns
the number of surfaces the factory will produce

Implemented in detray::factory_decorator< detector_t >.