24 using UniformReal = std::uniform_real_distribution<double>;
25 using UniformIndex = std::uniform_int_distribution<size_t>;
27 UniformReal
d0Dist(m_cfg.d0Range[0], m_cfg.d0Range[1]);
28 UniformReal
z0Dist(m_cfg.z0Range[0], m_cfg.z0Range[1]);
29 UniformReal t0Dist(m_cfg.t0Range[0], m_cfg.t0Range[1]);
30 UniformReal
phiDist(m_cfg.phiRange[0], m_cfg.phiRange[1]);
31 UniformReal
etaDist(m_cfg.etaRange[0], m_cfg.etaRange[1]);
32 UniformReal ptDist(m_cfg.ptRange[0], m_cfg.ptRange[1]);
34 UniformIndex particleTypeChoice(0
u, m_cfg.randomizeCharge ? 1
u : -0
u);
40 const double qChoices[] = {
46 particles.reserve(m_cfg.numParticles);
49 for (
size_t ip = 1;
ip <= m_cfg.numParticles; ++
ip) {
50 const auto d0 =
d0Dist(rng);
51 const auto z0 =
z0Dist(rng);
52 const auto t0 = t0Dist(rng);
55 const auto pt = ptDist(rng);
56 const auto type = particleTypeChoice(rng);
57 const auto pdg = pdgChoices[type];
58 const auto q = qChoices[type];
70 particles.insert(particles.end(), std::move(particle));