Skip to content
Snippets Groups Projects
Geant4StepHandler.cpp 1.51 KiB
Newer Older
Markus Frank's avatar
Markus Frank committed
//====================================================================
//  AIDA Detector description implementation
//--------------------------------------------------------------------
//
//  Author     : M.Frank
//
//====================================================================

// Framework include files
#include "DDG4/Geant4StepHandler.h"
using namespace DD4hep::Simulation;

const char* Geant4StepHandler::stepStatus(G4StepStatus status) {
  switch (status) {
  // Step reached the world boundary
  case fWorldBoundary:
    return "WorldBoundary";
Markus Frank's avatar
Markus Frank committed
    // Step defined by a geometry boundary
  case fGeomBoundary:
    return "GeomBoundary";
Markus Frank's avatar
Markus Frank committed
    // Step defined by a PreStepDoItVector
  case fAtRestDoItProc:
    return "AtRestDoItProc";
Markus Frank's avatar
Markus Frank committed
    // Step defined by a AlongStepDoItVector
  case fAlongStepDoItProc:
    return "AlongStepDoItProc";
Markus Frank's avatar
Markus Frank committed
    // Step defined by a PostStepDoItVector
  case fPostStepDoItProc:
    return "PostStepDoItProc";
Markus Frank's avatar
Markus Frank committed
    // Step defined by the user Step limit in the logical volume
  case fUserDefinedLimit:
    return "UserDefinedLimit";
    // Step defined by an exclusively forced PostStepDoIt process
  case fExclusivelyForcedProc:
    return "ExclusivelyForcedProc";
Markus Frank's avatar
Markus Frank committed
    // Step not defined yet
  case fUndefined:
  default:
    return "Undefined";
const char* Geant4StepHandler::preStepStatus() const {
Markus Frank's avatar
Markus Frank committed
  return stepStatus(pre ? pre->GetStepStatus() : fUndefined);
}

const char* Geant4StepHandler::postStepStatus() const {
  return stepStatus(post ? post->GetStepStatus() : fUndefined);
}