Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-10-20 07:59:29

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   /// Flag indicating whether the particle is still alive and simulation should
0039   /// continue
0040   bool isAlive = true;
0041   /// Proper time limit before particle decay occurs
0042   double properTimeLimit = std::numeric_limits<double>::quiet_NaN();
0043   /// Accumulated radiation length limit before next electromagnetic interaction
0044   double x0Limit = std::numeric_limits<double>::quiet_NaN();
0045   /// Accumulated nuclear interaction length limit before next hadronic
0046   /// interaction
0047   double l0Limit = std::numeric_limits<double>::quiet_NaN();
0048   /// Process index selection for the next electromagnetic interaction
0049   std::size_t x0Process = std::numeric_limits<std::size_t>::max();
0050   /// Process index selection for the next hadronic interaction
0051   std::size_t l0Process = std::numeric_limits<std::size_t>::max();
0052 };
0053 
0054 }  // namespace ActsFatras