Can I get EventID from step or track class?

I want to get EventID for step or track class, what should i do?

Is there some public resolution?

You don’t. The event ID is a member of G4Event. You can get the current event from either G4RunManager::GetRunManager()->GetCurrentEvent() or G4EventManager::GetEventManager()->GetCurrentEvent(). In either case, you should test the returned pointer for null.

1 Like