Mu2eG4/src/Mu2eG4UserHelpers.cc
G4String findStepStoppingProcessName(G4Step const* const aStep){

      G4VProcess const* process = aStep->GetPostStepPoint()->GetProcessDefinedStep();

      if (process) {

        return process->GetProcessName();

      } else {
        static bool printItOnce = true;
        if (printItOnce) {
          printItOnce = false;
          printProcessNotSpecifiedWarning(aStep->GetTrack());
        }
        static bool printItOnce2 = true;
        if (printItOnce2 && !printItOnce) {
          printItOnce2 = false;
          cout << __func__ << " The above message will not be repeated " << endl;
        }
        //        static const G4String pname = G4String("NotSpecified");
        return G4String("NotSpecified");

      }

    }
// Find the name of the process that defined the step
// G4String const & findStepStoppingProcessName(G4Step const* const aStep){
Find the name of the process that defined the step
G4String const & findStepStoppingProcessName(G4Step const* const aStep){
Find the name of the process that defined the step G4String const & findStepStoppingProcessName ( G4Step const * const aStep ) {
G4String findStepStoppingProcessName(G4Step const* const aStep){
      G4VProcess const* process = aStep->GetPostStepPoint()->GetProcessDefinedStep();
      if (process) {
        return process->GetProcessName();
      } else {
        static bool printItOnce = true;
        if (printItOnce) {
          printItOnce = false;
          printProcessNotSpecifiedWarning(aStep->GetTrack());
        }
        static bool printItOnce2 = true;
        if (printItOnce2 && !printItOnce) {
          printItOnce2 = false;
          cout << __func__ << " The above message will not be repeated " << endl;
        }
        return G4String("NotSpecified");
      }
    }
G4String findStepStoppingProcessName ( G4Step const * const aStep ) { G4VProcess const * process = aStep -> GetPostStepPoint ( ) -> GetProcessDefinedStep ( ) ; if ( process ) { return process -> GetProcessName ( ) ; } else { static bool printItOnce = true ; if ( printItOnce ) { printItOnce = false ; printProcessNotSpecifiedWarning ( aStep -> GetTrack ( ) ) ; } static bool printItOnce2 = true ; if ( printItOnce2 && ! printItOnce ) { printItOnce2 = false ; cout << __func__ << " " << endl ; } return G4String ( " " ) ; } }
Find the name of the process that defined the step
G4String const & findStepStoppingProcessName(G4Step const* const aStep){
Find the name of the process that defined the step G4String const & findStepStoppingProcessName ( G4Step const * const aStep ) {
//        static const G4String pname = G4String("NotSpecified");