Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 07:50:35

0001 #pragma once
0002 /**
0003 U4TrackStatus.h
0004 =================
0005 
0006 
0007   fAlive,             // Continue the tracking
0008   fStopButAlive,      // Invoke active rest physics processes and
0009                       // and kill the current track afterward
0010   fStopAndKill,       // Kill the current track
0011 
0012   fKillTrackAndSecondaries,
0013                       // Kill the current track and also associated
0014                       // secondaries.
0015   fSuspend,           // Suspend the current track
0016   fPostponeToNextEvent
0017                       // Postpones the tracking of thecurrent track 
0018                       // to the next event.
0019 
0020 **/
0021 
0022 #include "G4TrackStatus.hh"
0023 
0024 struct U4TrackStatus
0025 {
0026     static const char* Name(unsigned status); 
0027     static constexpr const char* fAlive_ = "fAlive" ; 
0028     static constexpr const char* fStopButAlive_ = "fStopButAlive" ; 
0029     static constexpr const char* fStopAndKill_ = "fStopAndKill" ; 
0030     static constexpr const char* fKillTrackAndSecondaries_ = "fKillTrackAndSecondaries" ; 
0031     static constexpr const char* fSuspend_ = "fSuspend" ; 
0032     static constexpr const char* fPostponeToNextEvent_ = "fPostponeToNextEvent" ; 
0033 };
0034 
0035 inline const char* U4TrackStatus::Name(unsigned status)
0036 {
0037     const char* s = nullptr ; 
0038     switch(status)
0039     {
0040        case fAlive:                   s = fAlive_                   ; break ;  
0041        case fStopButAlive:            s = fStopButAlive_            ; break ;  
0042        case fStopAndKill:             s = fStopAndKill_             ; break ; 
0043        case fKillTrackAndSecondaries: s = fKillTrackAndSecondaries_ ; break ; 
0044        case fSuspend:                 s = fSuspend_                 ; break ; 
0045        case fPostponeToNextEvent:     s = fPostponeToNextEvent_     ; break ; 
0046     }
0047     return s ; 
0048 }
0049