Back to home page

EIC code displayed by LXR

 
 

    


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

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