ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::intersection_record< detector_t > Struct Template Reference

Record of a surface intersection along a track. More...

#include <detray/test/utils/data_record.hpp>

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

Public Types

using algebra_type = dalgebra<typename detector_t::algebra_type, double>
 Algebra type used to store values in double precision.
using intersection_type
 Intersection result type stored by this record.
using point3_type = dpoint3D<algebra_type>
 3D point type used to store positions.
using scalar_type = dscalar<algebra_type>
 Scalar type used by this record.
using vector3_type = dvector3D<algebra_type>
 3D vector type used to store directions.

Public Member Functions

constexpr intersection_record (const typename detector_t::point3_type &position, const typename detector_t::vector3_type &direction, const intersection_type &intr, const double q=detray::detail::invalid_value< double >(), const double p=detray::detail::invalid_value< double >(), const dindex v_idx=dindex_invalid)
 The particle charge is not known in the navigation, but might be provided in a different context.
template<concepts::value V = value_t>
auto position () const
 GettersGet the intersection position.
template<concepts::value V = value_t>
auto direction () const
 Get the track direction.
const intersection_type & intersection () const
 Get the intersection result.
intersection_type & intersection ()
 Get the mutable intersection result.
dindex volume () const
 Get the containing volume index.
template<concepts::value V = value_t>
auto charge () const
 Get the particle charge.
template<concepts::value V = value_t>
auto p () const
 Get the momentum magnitude.
free_track_parameters< typename detector_t::algebra_type > track_param () const
template<concepts::point3D point_t>
void position (const point_t &position)
 SettersSet the intersection position.
template<concepts::vector3D vector_t>
void direction (const vector_t &dir)
 Set the track direction.
void intersection (const intersection_type &intr)
 Set the intersection result.
void volume (dindex vol_idx)
 Set the containing volume index.
template<concepts::scalar scalar_t>
void charge (const scalar_t q)
 Set the particle charge.
template<concepts::scalar scalar_t>
void p (const scalar_t p)
 Set the momentum magnitude.

Detailed Description

template<concepts::detector detector_t>
struct detray::intersection_record< detector_t >

Record of a surface intersection along a track.

Member Typedef Documentation

◆ intersection_type

template<concepts::detector detector_t>
using detray::intersection_record< detector_t >::intersection_type
Initial value:
intersection2D<typename detector_t::surface_type,
typename detector_t::algebra_type,
intersection::contains_pos>
This class holds the intersection information.
Definition intersection.hpp:212

Intersection result type stored by this record.

Constructor & Destructor Documentation

◆ intersection_record()

template<concepts::detector detector_t>
detray::intersection_record< detector_t >::intersection_record ( const typename detector_t::point3_type & position,
const typename detector_t::vector3_type & direction,
const intersection_type & intr,
const double q = detray::detail::invalid_value<double>(),
const double p = detray::detail::invalid_value<double>(),
const dindex v_idx = dindex_invalid )
constexpr

The particle charge is not known in the navigation, but might be provided in a different context.

Parameters
positionGlobal intersection position.
directionTrack direction at the intersection.
intrIntersection result.
qParticle charge.
pMomentum magnitude.
v_idxIndex of the volume containing the intersection.

Member Function Documentation

◆ charge() [1/2]

template<concepts::detector detector_t>
template<concepts::value V = value_t>
auto detray::intersection_record< detector_t >::charge ( ) const

Get the particle charge.

Returns
Charge, cast to the requested value type.

◆ charge() [2/2]

template<concepts::detector detector_t>
template<concepts::scalar scalar_t>
void detray::intersection_record< detector_t >::charge ( const scalar_t q)

Set the particle charge.

Parameters
qNew charge value.

◆ direction() [1/2]

template<concepts::detector detector_t>
template<concepts::value V = value_t>
auto detray::intersection_record< detector_t >::direction ( ) const

Get the track direction.

Returns
The direction, cast to the requested value type.

◆ direction() [2/2]

template<concepts::detector detector_t>
template<concepts::vector3D vector_t>
void detray::intersection_record< detector_t >::direction ( const vector_t & dir)

Set the track direction.

Parameters
dirNew track direction.

◆ intersection() [1/3]

template<concepts::detector detector_t>
intersection_type & detray::intersection_record< detector_t >::intersection ( )

Get the mutable intersection result.

Returns
Mutable reference to the intersection result.

◆ intersection() [2/3]

template<concepts::detector detector_t>
const intersection_type & detray::intersection_record< detector_t >::intersection ( ) const

Get the intersection result.

Returns
The intersection result.

◆ intersection() [3/3]

template<concepts::detector detector_t>
void detray::intersection_record< detector_t >::intersection ( const intersection_type & intr)

Set the intersection result.

Parameters
intrNew intersection result.

◆ p() [1/2]

template<concepts::detector detector_t>
template<concepts::value V = value_t>
auto detray::intersection_record< detector_t >::p ( ) const

Get the momentum magnitude.

Returns
Momentum magnitude, cast to the requested value type.

◆ p() [2/2]

template<concepts::detector detector_t>
template<concepts::scalar scalar_t>
void detray::intersection_record< detector_t >::p ( const scalar_t p)

Set the momentum magnitude.

Parameters
pNew momentum magnitude.

◆ position() [1/2]

template<concepts::detector detector_t>
template<concepts::value V = value_t>
auto detray::intersection_record< detector_t >::position ( ) const

GettersGet the intersection position.

Returns
The position, cast to the requested value type.

◆ position() [2/2]

template<concepts::detector detector_t>
template<concepts::point3D point_t>
void detray::intersection_record< detector_t >::position ( const point_t & position)

SettersSet the intersection position.

Parameters
positionNew global position.

◆ track_param()

template<concepts::detector detector_t>
free_track_parameters< typename detector_t::algebra_type > detray::intersection_record< detector_t >::track_param ( ) const
Returns
the information as free track parameters

◆ volume() [1/2]

template<concepts::detector detector_t>
dindex detray::intersection_record< detector_t >::volume ( ) const

Get the containing volume index.

Returns
Volume index.

◆ volume() [2/2]

template<concepts::detector detector_t>
void detray::intersection_record< detector_t >::volume ( dindex vol_idx)

Set the containing volume index.

Parameters
vol_idxNew volume index.