Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:24:52

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 #include "ActsFatras/EventData/SimulationOutcome.hpp"
0010 
0011 #include <ostream>
0012 #include <stdexcept>
0013 
0014 namespace ActsFatras {
0015 
0016 std::ostream &operator<<(std::ostream &os, SimulationOutcome outcome) {
0017   using enum SimulationOutcome;
0018 
0019   switch (outcome) {
0020     case Alive:
0021       return (os << "Alive");
0022     case KilledInteraction:
0023       return (os << "KilledInteraction");
0024     case KilledVolumeExit:
0025       return (os << "KilledVolumeExit");
0026     case KilledTime:
0027       return (os << "KilledTime");
0028     case KilledSecondaryParticle:
0029       return (os << "KilledSecondaryParticle");
0030   }
0031 
0032   throw std::runtime_error("Unknown SimulationOutcome");
0033 }
0034 
0035 }  // namespace ActsFatras