First run no scene

_Geant4 Version:11.03
_Operating System: Macos
_Compiler/Version: with QT=6

Hi all, Is any one have the same situation

void cxEventAction::EndOfEventAction(const G4Event* evt) {  // NOLINT
  G4HCofThisEvent* hitsCollections = evt->GetHCofThisEvent();
  auto* aWDhits = static_cast<WSDPMTHitsCollection*>(hitsCollections->GetHC(0));  //
  aWDhits->DrawAllHits();
}

1 event per run.
then.
for the first run, nothing show until I input /vis/scene/add/hits

after the first event. All works fine whatever I input /vis/scene/add/hits or not

It seems the reason of lack of vis command.

/vis/scene/endOfEventAction accumulate

Hi Chen Xu

If you ask the vis manager to draw hits (/vis/scene/add/hits), you don’t need a Draw in your EndOfEventAction.

John

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.