ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::telescope_generator< detector_t, mask_shape_t, trajectory_t > Class Template Referencefinal

Generates a number of surfaces along a given direction. More...

#include <detray/test/common/factories/telescope_generator.hpp>

Inheritance diagram for detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >:
[legend]
Collaboration diagram for detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >:
[legend]

Public Member Functions

 telescope_generator (scalar_t length, std::size_t n_surfaces, darray< scalar_t, mask_shape_t::boundaries::e_size > boundaries, trajectory_t traj)
 Infer the sensitive surface placement from the telescope.
 telescope_generator (std::vector< scalar_t > positions, const darray< scalar_t, mask_shape_t::boundaries::e_size > &boundaries, trajectory_t traj)
 Build a surface at every position along the pilot track with the given extent.
void clear () override
 Clear the positions and boundaries of the surfaces.
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 a surface telescope.
auto size () const -> dindex override
void push_back (surface_data< detector_t > &&) override
 This is a surface generator, no external surface data needed.
auto push_back (std::vector< surface_data< detector_t > > &&) -> void override
 Ignore supplied surface data because this factory generates its own.
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, typename mask_shape_t = rectangle2D, typename trajectory_t = detail::ray<typename detector_t::algebra_type>>
class detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >

Generates a number of surfaces along a given direction.

Template Parameters
detector_tthe type of detector the volume belongs to.

Constructor & Destructor Documentation

◆ telescope_generator() [1/2]

template<concepts::detector detector_t, typename mask_shape_t = rectangle2D, typename trajectory_t = detail::ray<typename detector_t::algebra_type>>
detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >::telescope_generator ( std::vector< scalar_t > positions,
const darray< scalar_t, mask_shape_t::boundaries::e_size > & boundaries,
trajectory_t traj )

Build a surface at every position along the pilot track with the given extent.

Parameters
positionspositions of the surfaces along the pilot track
boundariesmask boundaries of the surfaces
trajpilot track used to position the surfaces

◆ telescope_generator() [2/2]

template<concepts::detector detector_t, typename mask_shape_t = rectangle2D, typename trajectory_t = detail::ray<typename detector_t::algebra_type>>
detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >::telescope_generator ( scalar_t length,
std::size_t n_surfaces,
darray< scalar_t, mask_shape_t::boundaries::e_size > boundaries,
trajectory_t traj )

Infer the sensitive surface placement from the telescope.

Parameters
lengthif no concrete positions were given.
n_surfacesnumber of surfaces to be generated
boundariesmask boundaries of the surfaces
trajpilot track along which to build the telescope

Member Function Documentation

◆ clear()

template<concepts::detector detector_t, typename mask_shape_t = rectangle2D, typename trajectory_t = detail::ray<typename detector_t::algebra_type>>
void detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >::clear ( )
overridevirtual

Clear the positions and boundaries of the surfaces.

Implements detray::surface_factory_interface< detector_t >.

◆ operator()()

template<concepts::detector detector_t, typename mask_shape_t = rectangle2D, typename trajectory_t = detail::ray<typename detector_t::algebra_type>>
auto detray::telescope_generator< detector_t, mask_shape_t, trajectory_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 a surface telescope.

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
range of generated surfaces

Implements detray::surface_factory_interface< detector_t >.

◆ push_back()

template<concepts::detector detector_t, typename mask_shape_t = rectangle2D, typename trajectory_t = detail::ray<typename detector_t::algebra_type>>
void detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >::push_back ( surface_data< detector_t > && )
overridevirtual

This is a surface generator, no external surface data needed.

Implements detray::surface_factory_interface< detector_t >.

◆ size()

template<concepts::detector detector_t, typename mask_shape_t = rectangle2D, typename trajectory_t = detail::ray<typename detector_t::algebra_type>>
auto detray::telescope_generator< detector_t, mask_shape_t, trajectory_t >::size ( ) const->dindex
override
Returns
the number of surfaces this factory will produce