29 namespace ActsFatras {
51 template <
typename generator_t>
63 template <
typename generator_t>
65 std::vector<Particle>& generated)
const;
86 template <
typename generator_t>
97 template <
typename generator_t>
114 return (delta > 1.4) ? 42.038 - 8.29 * std::log(delta + 0.958)
115 : 42.184 - delta * (7.444 - 1.623 *
delta);
121 return (delta > 1.4) ? 42.038 - 8.29 * std::log(delta + 0.958)
122 : 41.326 - delta * (5.848 - 0.902 *
delta);
125 template <
typename generator_t>
126 std::pair<Particle::Scalar, Particle::Scalar>
134 return std::make_pair(std::numeric_limits<Scalar>::infinity(),
135 std::numeric_limits<Scalar>::infinity());
151 constexpr
Scalar p0 = -7.01612e-03;
152 constexpr
Scalar p1 = 7.69040e-02;
153 constexpr
Scalar p2 = -6.07682e-01;
158 std::uniform_real_distribution<Scalar> uniformDistribution{0., 1.};
160 return std::make_pair(-9. / 7. *
162 (1 - uniformDistribution(generator))) /
164 std::numeric_limits<Scalar>::infinity());
167 template <
typename generator_t>
175 constexpr
Scalar k1 = 0.0083;
176 constexpr
Scalar k2 = 0.20206;
177 constexpr
Scalar k3 = 0.0020;
178 constexpr
Scalar k4 = 0.0369;
179 constexpr
Scalar alphaEM = 1. / 137.;
180 constexpr
Scalar m_Z = 13.;
181 constexpr
Scalar az2 = (alphaEM * m_Z) * (alphaEM * m_Z);
182 constexpr
Scalar az4 = az2 * az2;
183 constexpr
Scalar coulombFactor =
184 (k1 * az4 + k2 + 1. / (1. + az2)) * az2 - (k3 * az4 + k4) * az4;
186 const Scalar logZ13 = std::log(m_Z) * 1. / 3.;
187 const Scalar FZ = 8. * (logZ13 + coulombFactor);
188 const Scalar deltaMax = exp((42.038 - FZ) * 0.1206) - 0.958;
190 const Scalar deltaPreFactor = 136. / std::pow(m_Z, 1. / 3.);
192 const Scalar deltaFactor = deltaPreFactor * eps0;
193 const Scalar deltaMin = 4. * deltaFactor;
197 std::max(eps0, 0.5 - 0.5 * std::sqrt(1. - deltaMin / deltaMax));
198 const Scalar epsRange = 0.5 - epsMin;
203 const Scalar NormF1 = F10 * epsRange * epsRange;
204 const Scalar NormF2 = 1.5 * F20;
209 std::uniform_real_distribution<Scalar> rndmEngine;
211 if (NormF1 > rndmEngine(generator) * (NormF1 + NormF2)) {
212 eps = 0.5 - epsRange * std::pow(rndmEngine(generator), 1. / 3.);
216 eps = epsMin + epsRange * rndmEngine(generator);
220 }
while (greject < rndmEngine(generator));
225 template <
typename generator_t>
234 std::uniform_real_distribution<Scalar> uniformDistribution{0., 1.};
235 const Scalar u = -std::log(uniformDistribution(generator) *
236 uniformDistribution(generator)) *
239 theta *= (uniformDistribution(generator) < 0.25)
245 std::uniform_real_distribution<double>(-M_PI, M_PI)(generator);
254 direction.applyOnTheLeft(rotation);
261 using namespace Acts::UnitLiterals;
266 sqrt(childEnergy * childEnergy - massChild * massChild);
271 momentum1 * childDirection;
272 const Scalar momentum2 = vtmp.norm();
278 std::array<Particle, 2> children = {
282 .setDirection(childDirection)
289 .setDirection(childDirection)
297 template <
typename generator_t>
299 std::vector<Particle>& generated)
const {
321 generated.insert(generated.end(), finalState.begin(), finalState.end());