Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 09:55:27

0001 // This file is part of the Acts project.
0002 //
0003 // Copyright (C) 2020-2021 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 "ActsFatras/EventData/Hit.hpp"
0012 #include "ActsFatras/EventData/Particle.hpp"
0013 
0014 #include <limits>
0015 #include <vector>
0016 
0017 namespace ActsFatras {
0018 
0019 /// Single particle simulation result (and intermediate state).
0020 ///
0021 /// This result struct is used by multiple components and is thus defined
0022 /// separately from its usage.
0023 struct SimulationResult {
0024   /// Current/ final particle state.
0025   Particle particle;
0026   /// Additional particles generated by interactions or decay.
0027   std::vector<Particle> generatedParticles;
0028   /// Hits created by the particle.
0029   std::vector<Hit> hits;
0030 
0031   // The following variables are internal implementation details that must be
0032   // defined here for technical reasons.
0033   //
0034   // Values are initialized to NaN so the simulation actor can detect when it is
0035   // called for the first time, i.e. when the result struct is
0036   // default-initialized.
0037 
0038   // Whether the particle is still alive and the simulation should continue
0039   bool isAlive = true;
0040   // Proper time limit before decay.
0041   Particle::Scalar properTimeLimit =
0042       std::numeric_limits<Particle::Scalar>::quiet_NaN();
0043   // Accumulated radiation/interaction length limit before next interaction.
0044   Particle::Scalar x0Limit = std::numeric_limits<Particle::Scalar>::quiet_NaN();
0045   Particle::Scalar l0Limit = std::numeric_limits<Particle::Scalar>::quiet_NaN();
0046   // Process selection for the next interaction.
0047   std::size_t x0Process = SIZE_MAX;
0048   std::size_t l0Process = SIZE_MAX;
0049 };
0050 
0051 }  // namespace ActsFatras