Mu2eG4/src/Mu2eG4UserHelpers.cc
ProcessCode findCreationCode(G4Track const* const trk){
      G4VProcess const* process = trk->GetCreatorProcess();

      // If there is no creator process, then the G4Track was created by PrimaryGenerator action.
      if ( process == 0 ){
        return ProcessCode::mu2ePrimary;
      }

      // Extract the name from the process and look up the code.
      string name = process->GetProcessName();
      return ProcessCode::findByName(name);
    }
// Find the name of the code for the process that created this track.
Find the name of the code for the process that created this track.
Find the name of the code for the process that created this track .
ProcessCode findCreationCode(G4Track const* const trk){
      G4VProcess const* process = trk->GetCreatorProcess();
      if ( process == 0 ){
        return ProcessCode::mu2ePrimary;
      }
      string name = process->GetProcessName();
      return ProcessCode::findByName(name);
    }
ProcessCode findCreationCode ( G4Track const * const trk ) { G4VProcess const * process = trk -> GetCreatorProcess ( ) ; if ( process == 0 ) { return ProcessCode :: mu2ePrimary ; } string name = process -> GetProcessName ( ) ; return ProcessCode :: findByName ( name ) ; }
Find the name of the code for the process that created this track.
Find the name of the code for the process that created this track .
// If there is no creator process, then the G4Track was created by PrimaryGenerator action. // Extract the name from the process and look up the code.