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[] = {m_charge, -m_charge};
43 SimVertex process(SimVertex::Vector4::Zero());
46 for (
size_t ip = 1; ip <= m_cfg.numParticles; ++ip) {
47 const auto d0 =
d0Dist(rng);
49 const auto t0 = t0Dist(rng);
52 const auto pt = ptDist(rng);
53 const auto type = particleTypeChoice(rng);
54 const auto pdg = pdgChoices[type];
55 const auto q = qChoices[type];
66 process.
outgoing.push_back(std::move(particle));