File indexing completed on 2026-09-21 08:21:27
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "ActsFatras/Physics/ElectroMagnetic/BetheHeitler.hpp"
0010
0011 #include "Acts/Definitions/Algebra.hpp"
0012 #include "Acts/Definitions/PdgParticle.hpp"
0013 #include "Acts/Utilities/UnitVectors.hpp"
0014 #include "ActsFatras/EventData/Barcode.hpp"
0015 #include "ActsFatras/EventData/GenerationProcess.hpp"
0016
0017 #include <cmath>
0018 #include <numbers>
0019
0020 namespace ActsFatras {
0021
0022 Particle BetheHeitler::bremPhoton(const Particle &particle, double gammaE,
0023 double rndPsi, double rndTheta1,
0024 double rndTheta2, double rndTheta3) const {
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 const double psi = 2. * std::numbers::pi * rndPsi;
0035
0036
0037 double theta = 0.;
0038 if (uniformHertzDipoleAngle) {
0039
0040 theta = particle.mass() / particle.energy() * rndTheta1;
0041 } else {
0042
0043 theta = particle.mass() / particle.energy();
0044
0045 constexpr double a = 0.625;
0046 const double u = -std::log(rndTheta2 * rndTheta3) / a;
0047 theta *= (rndTheta1 < 0.25) ? u : u / 3.;
0048 }
0049
0050 const Acts::Vector3 particleDirection = particle.direction();
0051
0052
0053 const Acts::RotationMatrix3 rotation(
0054
0055 Acts::AngleAxis3(psi, particleDirection) *
0056
0057 Acts::AngleAxis3(theta, Acts::createCurvilinearUnitU(particleDirection)));
0058 const Acts::Vector3 photonDirection = rotation * particleDirection;
0059
0060 Particle photon(particle.particleId().makeDescendant(0),
0061 Acts::PdgParticle::eGamma);
0062 photon.setProcess(GenerationProcess::eBremsstrahlung)
0063 .setPosition4(particle.fourPosition())
0064 .setDirection(photonDirection)
0065 .setAbsoluteMomentum(gammaE)
0066 .setReferenceSurface(particle.referenceSurface());
0067 return photon;
0068 }
0069
0070 }