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

Configuration for the random track generator. More...

#include <detray/test/common/event_generator/random_track_generator_config.hpp>

Collaboration diagram for detray::random_track_generator_config< scalar_t >:
[legend]

Public Types

using seed_t = std::uint64_t
 Random engine seed type.

Public Member Functions

random_track_generator_config & seed (const seed_t s)
 Setters.
random_track_generator_config & do_vertex_smearing (bool b)
random_track_generator_config & n_tracks (std::size_t n)
random_track_generator_config & phi_range (const scalar_t low, const scalar_t high)
template<typename o_scalar_t>
random_track_generator_config & phi_range (darray< o_scalar_t, 2 > r)
random_track_generator_config & theta_range (scalar_t low, scalar_t high)
template<typename o_scalar_t>
random_track_generator_config & theta_range (darray< o_scalar_t, 2 > r)
random_track_generator_config & eta_range (scalar_t low, scalar_t high)
template<typename o_scalar_t>
random_track_generator_config & eta_range (darray< o_scalar_t, 2 > r)
random_track_generator_config & mom_range (scalar_t low, scalar_t high)
template<typename o_scalar_t>
random_track_generator_config & mom_range (darray< o_scalar_t, 2 > r)
random_track_generator_config & pT_range (scalar_t low, scalar_t high)
template<typename o_scalar_t>
random_track_generator_config & pT_range (darray< o_scalar_t, 2 > r)
random_track_generator_config & p_tot (scalar_t p)
random_track_generator_config & p_T (scalar_t p)
random_track_generator_config & origin (const scalar_t x, const scalar_t y, const scalar_t z)
template<concepts::point3D point3_t>
random_track_generator_config & origin (const point3_t &ori)
random_track_generator_config & origin_stddev (const scalar_t x, const scalar_t y, const scalar_t z)
template<concepts::point3D point3_t>
random_track_generator_config & origin_stddev (point3_t stddev)
random_track_generator_config & randomize_charge (bool rc)
random_track_generator_config & time (scalar_t t)
random_track_generator_config & charge (scalar_t q)
constexpr seed_t seed () const
 Getters.
constexpr bool do_vertex_smearing () const
constexpr std::size_t n_tracks () const
constexpr const darray< scalar_t, 2 > & phi_range () const
constexpr const darray< scalar_t, 2 > & theta_range () const
constexpr const darray< scalar_t, 2 > & mom_range () const
constexpr const auto & origin () const
constexpr const auto & origin_stddev () const
constexpr bool is_pT () const
constexpr bool randomize_charge () const
constexpr scalar_t time () const
constexpr scalar_t charge () const

Public Attributes

scalar_t m_charge {-1.f * unit<scalar_t>::e}
 Track charge.
bool m_do_vtx_smearing = false
 Gaussian vertex smearing.
bool m_is_pT {false}
 Whether to interpret the momentum m_mom_range as p_T.
darray< scalar_t, 2 > m_mom_range
 Momentum range.
std::size_t m_n_tracks {10u}
 How many tracks will be generated.
darray< scalar_t, 3 > m_origin {0.f, 0.f, 0.f}
 Track origin.
darray< scalar_t, 3 > m_origin_stddev {0.f, 0.f, 0.f}
 Vertex smearing standard deviations.
darray< scalar_t, 2 > m_phi_range
 Range for phi [-pi, pi) and theta [0, pi).
bool m_randomize_charge {false}
 Randomly flip the charge sign?
seed_t m_seed {detail::random_numbers<scalar_t>::default_seed()}
 Monte-Carlo seed.
darray< scalar_t, 2 > m_theta_range {0.f, constant<scalar_t>::pi}
 Polar angle range.
scalar_t m_time {0.f * unit<scalar_t>::us}
 Time parameter and charge of the track.

Detailed Description

template<concepts::scalar scalar_t>
struct detray::random_track_generator_config< scalar_t >

Configuration for the random track generator.

Member Function Documentation

◆ charge() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::random_track_generator_config< scalar_t >::charge ( ) const
constexpr
Returns
track charge

◆ charge() [2/2]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::charge ( scalar_t q)
Parameters
qtrack charge
Returns
this configuration

◆ do_vertex_smearing() [1/2]

template<concepts::scalar scalar_t>
bool detray::random_track_generator_config< scalar_t >::do_vertex_smearing ( ) const
constexpr
Returns
whether Gaussian vertex smearing is enabled

◆ do_vertex_smearing() [2/2]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::do_vertex_smearing ( bool b)
Parameters
bwhether Gaussian vertex smearing is enabled
Returns
this configuration

◆ eta_range() [1/2]

template<concepts::scalar scalar_t>
template<typename o_scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::eta_range ( darray< o_scalar_t, 2 > r)
Parameters
rpseudorapidity range
Returns
this configuration

◆ eta_range() [2/2]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::eta_range ( scalar_t low,
scalar_t high )
Parameters
lowlower bound of the pseudorapidity range
highupper bound of the pseudorapidity range
Returns
this configuration

◆ is_pT()

template<concepts::scalar scalar_t>
bool detray::random_track_generator_config< scalar_t >::is_pT ( ) const
constexpr
Returns
whether momentum is interpreted as transverse momentum

◆ mom_range() [1/3]

template<concepts::scalar scalar_t>
const darray< scalar_t, 2 > & detray::random_track_generator_config< scalar_t >::mom_range ( ) const
constexpr
Returns
momentum range

◆ mom_range() [2/3]

template<concepts::scalar scalar_t>
template<typename o_scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::mom_range ( darray< o_scalar_t, 2 > r)
Parameters
rmomentum range
Returns
this configuration

◆ mom_range() [3/3]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::mom_range ( scalar_t low,
scalar_t high )
Parameters
lowlower bound of the momentum range
highupper bound of the momentum range
Returns
this configuration

◆ n_tracks() [1/2]

template<concepts::scalar scalar_t>
std::size_t detray::random_track_generator_config< scalar_t >::n_tracks ( ) const
constexpr
Returns
number of tracks to generate

◆ n_tracks() [2/2]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::n_tracks ( std::size_t n)
Parameters
nnumber of tracks to generate
Returns
this configuration

◆ origin() [1/3]

template<concepts::scalar scalar_t>
const auto & detray::random_track_generator_config< scalar_t >::origin ( ) const
constexpr
Returns
track origin

◆ origin() [2/3]

template<concepts::scalar scalar_t>
template<concepts::point3D point3_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::origin ( const point3_t & ori)
Parameters
oritrack origin
Returns
this configuration

◆ origin() [3/3]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::origin ( const scalar_t x,
const scalar_t y,
const scalar_t z )
Parameters
xx component of the track origin
yy component of the track origin
zz component of the track origin
Returns
this configuration

◆ origin_stddev() [1/3]

template<concepts::scalar scalar_t>
const auto & detray::random_track_generator_config< scalar_t >::origin_stddev ( ) const
constexpr
Returns
vertex smearing standard deviations

◆ origin_stddev() [2/3]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::origin_stddev ( const scalar_t x,
const scalar_t y,
const scalar_t z )
Parameters
xx component of the vertex smearing standard deviations
yy component of the vertex smearing standard deviations
zz component of the vertex smearing standard deviations
Returns
this configuration

◆ origin_stddev() [3/3]

template<concepts::scalar scalar_t>
template<concepts::point3D point3_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::origin_stddev ( point3_t stddev)
Parameters
stddevvertex smearing standard deviations
Returns
this configuration

◆ p_T()

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::p_T ( scalar_t p)
Parameters
ptransverse momentum magnitude
Returns
this configuration

◆ p_tot()

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::p_tot ( scalar_t p)
Parameters
ptotal momentum magnitude
Returns
this configuration

◆ phi_range() [1/3]

template<concepts::scalar scalar_t>
const darray< scalar_t, 2 > & detray::random_track_generator_config< scalar_t >::phi_range ( ) const
constexpr
Returns
azimuthal angle range

◆ phi_range() [2/3]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::phi_range ( const scalar_t low,
const scalar_t high )
Parameters
lowlower bound of the azimuthal angle range
highupper bound of the azimuthal angle range
Returns
this configuration

◆ phi_range() [3/3]

template<concepts::scalar scalar_t>
template<typename o_scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::phi_range ( darray< o_scalar_t, 2 > r)
Parameters
razimuthal angle range
Returns
this configuration

◆ pT_range() [1/2]

template<concepts::scalar scalar_t>
template<typename o_scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::pT_range ( darray< o_scalar_t, 2 > r)
Parameters
rtransverse momentum range
Returns
this configuration

◆ pT_range() [2/2]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::pT_range ( scalar_t low,
scalar_t high )
Parameters
lowlower bound of the transverse momentum range
highupper bound of the transverse momentum range
Returns
this configuration

◆ randomize_charge() [1/2]

template<concepts::scalar scalar_t>
bool detray::random_track_generator_config< scalar_t >::randomize_charge ( ) const
constexpr
Returns
whether to randomize the charge sign

◆ randomize_charge() [2/2]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::randomize_charge ( bool rc)
Parameters
rcwhether to randomize the charge sign
Returns
this configuration

◆ seed() [1/2]

template<concepts::scalar scalar_t>
seed_t detray::random_track_generator_config< scalar_t >::seed ( ) const
constexpr

Getters.

Returns
random engine seed

◆ seed() [2/2]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::seed ( const seed_t s)

Setters.

Parameters
srandom engine seed
Returns
this configuration

◆ theta_range() [1/3]

template<concepts::scalar scalar_t>
const darray< scalar_t, 2 > & detray::random_track_generator_config< scalar_t >::theta_range ( ) const
constexpr
Returns
polar angle range

◆ theta_range() [2/3]

template<concepts::scalar scalar_t>
template<typename o_scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::theta_range ( darray< o_scalar_t, 2 > r)
Parameters
rpolar angle range
Returns
this configuration

◆ theta_range() [3/3]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::theta_range ( scalar_t low,
scalar_t high )
Parameters
lowlower bound of the polar angle range
highupper bound of the polar angle range
Returns
this configuration

◆ time() [1/2]

template<concepts::scalar scalar_t>
scalar_t detray::random_track_generator_config< scalar_t >::time ( ) const
constexpr
Returns
track time

◆ time() [2/2]

template<concepts::scalar scalar_t>
random_track_generator_config & detray::random_track_generator_config< scalar_t >::time ( scalar_t t)
Parameters
ttrack time
Returns
this configuration

Member Data Documentation

◆ m_mom_range

template<concepts::scalar scalar_t>
darray<scalar_t, 2> detray::random_track_generator_config< scalar_t >::m_mom_range
Initial value:
static constexpr scalar_t GeV
Native energy unit, the gigaelectronvolt.
Definition units.hpp:81

Momentum range.

◆ m_phi_range

template<concepts::scalar scalar_t>
darray<scalar_t, 2> detray::random_track_generator_config< scalar_t >::m_phi_range
Initial value:
static constexpr scalar_t pi
π
Definition units.hpp:136

Range for phi [-pi, pi) and theta [0, pi).