From 3bffcf4722f3cb2d4ad92ff2ac7e8be38029f811 Mon Sep 17 00:00:00 2001 From: Ben Morgan Date: Thu, 2 May 2024 09:05:18 +0100 Subject: [PATCH] Use G4VG interface to convert geometry in AdePT --- src/AdePTTrackingManager.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/AdePTTrackingManager.cc b/src/AdePTTrackingManager.cc index be71c3b3..184eccd3 100644 --- a/src/AdePTTrackingManager.cc +++ b/src/AdePTTrackingManager.cc @@ -8,6 +8,7 @@ #include "G4EventManager.hh" #include "G4Event.hh" #include "G4RunManager.hh" +#include "G4TransportationManager.hh" #include "G4Electron.hh" #include "G4Gamma.hh" @@ -41,7 +42,9 @@ void AdePTTrackingManager::InitializeAdePT() auto tid = G4Threading::G4GetThreadId(); if (tid < 0) { // Load the VecGeom world in memory - AdePTGeant4Integration::CreateVecGeomWorld(fAdePTConfiguration->GetVecGeomGDML()); + auto* tman = G4TransportationManager::GetTransportationManager(); + auto* world = tman->GetNavigatorForTracking()->GetWorldVolume(); + AdePTGeant4Integration::CreateVecGeomWorld(world); // Track and Hit buffer capacities on GPU are split among threads int num_threads = G4RunManager::GetRunManager()->GetNumberOfThreads();