Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:12:13

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 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 https://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   double properTimeLimit = std::numeric_limits<double>::quiet_NaN();
0042   // Accumulated radiation/interaction length limit before next interaction.
0043   double x0Limit = std::numeric_limits<double>::quiet_NaN();
0044   double l0Limit = std::numeric_limits<double>::quiet_NaN();
0045   // Process selection for the next interaction.
0046   std::size_t x0Process = std::numeric_limits<std::size_t>::max();
0047   std::size_t l0Process = std::numeric_limits<std::size_t>::max();
0048 };
0049 
0050 }  // namespace ActsFatras