![]() |
|
|||
File indexing completed on 2025-08-06 08:09:55
0001 // This file is part of the Acts project. 0002 // 0003 // Copyright (C) 2018 CERN for the benefit of the Acts project 0004 // 0005 // This Source Code Form is subject to the terms of the Mozilla Public 0006 // License, v. 2.0. If a copy of the MPL was not distributed with this 0007 // file, You can obtain one at http://mozilla.org/MPL/2.0/. 0008 0009 #pragma once 0010 0011 #include "Acts/Material/Interactions.hpp" 0012 #include "Fatras/Kernel/detail/RandomNumberDistributions.hpp" 0013 0014 namespace Fatras { 0015 0016 /// @The struct for the Highland-based scattering 0017 /// 0018 /// This will scatter particles with a single gaussian distribution 0019 /// according to the highland formula. 0020 struct Highland { 0021 0022 /// @brief Call operator to perform this scattering 0023 /// 0024 /// @tparam generator_t is a random number generator type 0025 /// @tparam detector_t is the detector information type 0026 /// @tparam particle_t is the particle information type 0027 /// 0028 /// @param[in] generator is the random number generator 0029 /// @param[in] detector the detector information 0030 /// @param[in] particle the particle which is being scattered 0031 /// 0032 /// @return a scattering angle in 3D 0033 template <typename generator_t, typename detector_t, typename particle_t> 0034 double operator()(generator_t &generator, const detector_t &detector, 0035 particle_t &particle) const { 0036 0037 // Gauss distribution, will be sampled sampled with generator 0038 GaussDist gaussDist = GaussDist(0., 1.); 0039 0040 double qop = particle.q() / particle.p(); 0041 double theta0 = Acts::computeMultipleScatteringTheta0( 0042 detector, particle.pdg(), particle.m(), qop, particle.q()); 0043 // Return projection factor times sigma times grauss random 0044 return M_SQRT2 * theta0 * gaussDist(generator); 0045 } 0046 }; 0047 0048 } // namespace Fatras
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |