When running a macro, the geometry in the visualisation disappears (but not particle paths) if the macro contains any lines that modify the geometry. The following warning occurs in the output
QObject::connect: No such signal QTabWidget::tabCloseRequested(G4int)
QObject::connect: No such signal QTabWidget::currentChanged(G4int)
QObject::connect: No such signal QTabWidget::currentChanged(G4int)
QObject::connect: No such signal QComboBox::activated(G4int)
...
...
...
WARNING: Trajectory storing has been requested. This action may be
reversed with "/tracking/storeTrajectory 0".
Changing export format to "jpg"
-------- WWWW ------- G4Exception-START -------- WWWW -------
*** G4Exception : modeling0015
issued by : G4PhysicalVolumeModel::Validate
Attempt to validate a volume that is no longer in the physical volume store.
*** This is just a warning message. ***
-------- WWWW -------- G4Exception-END --------- WWWW -------
WARNING: Model "G4PhysicalVolumeModel World:0 BasePath: TOP" is no longer valid - being removed
from scene "scene-0"
from the Construct method in DetectorConstruction stops the geometry from disappearing. However then the displayed geometry doesn’t seem to match the geometry that the photons are interacting with.
This is after running a macro that increases the length of the fibre I am simulating. The displayed geometry is the default, but the photons are propagating through the longer fibre that is set by the macro.
Note: When I run the macro in batch mode the warning does not appear.
This problem was occurring with Geant4-11.1.0, I tried upgrading to 11.1.1 (Release Geant4 11.1.1 · Geant4/geant4 · GitHub) as the post I referred to above said this problem would be fixed in the next release, however it is still occurring.
Hi,
I am having the same problem with the exact same error messages from Qt.
I am however not changing the geometry on the fly, so the overall problem might be unrelated to that or my problem might be a different one.
I am using a simulation that used to run on 10.7.3. I updated to 11.01.01 with minimal modifications and now run into this error.
OK, I’ll try downloading 11.1.1, perhaps from GitHub just in case there’s a problem there. Can either of you let me have a set of macro that display the problem in a Geant4 example? But I’m afraid this will not be before the weekend.
Otherwise, I’m out of ideas. I’m happy for anyone else to come in with ideas.
Here is a simulation that exhibit the problem : Nextcloud
Just compile and launch ./SpectrumShaper and the error will show.
This simulation is not currently working in batch mode, but for totally unrelated reasons and only if you start to track a particle, as I am still in the process of having it to work on the newest Geant4.
I will update the file as soon as I have a working version.
BTW, I do not know if those are useful information but examples are working and Qt Viewer is working fine with them (for example B4c), and I compiled Geant4 with the c++17 standard as my version of ROOT requires it.
OK, you can’t have ntuples without linking to ROOT, it seems. I don’t have ROOT, so I simply commented out the analysisManager->FillNtupleDColumn statements.
Then /control/execute iso.mac and /run/beamOn 100 gives attached image. Looks OK?
So…what exactly am I looking for? When you say
how exactly do I do that? I don’t see any such commands in the supplied macros, and I don’t see any geometry-modifying commands in the commands create (of course, I may have missed them).
So that’s where it stands at the moment. Over to you.
how exactly do I do that? I don’t see any such commands in the supplied macros, and I don’t see any geometry-modifying commands in the commands create (of course, I may have missed them).
The command is user defined, the definition is
void DetectorConstruction::updateGeom() {
/// reset geometry
G4GeometryManager::GetInstance()->OpenGeometry();
G4PhysicalVolumeStore::Clean();
G4LogicalVolumeStore::Clean();
G4SolidStore::Clean();
fiberInstances.clear();
/// update LS properties
deployLsProperties();
materials->CreateMaterials(simulateFibers);
G4RunManager::GetRunManager()->DefineWorldVolume(buildGeom());
logic_hori_fiber_->SetSensitiveDetector(hori_fiber_SD_);
logic_vessel_->SetSensitiveDetector(vessel_SD_);
logic_hori_ru_sipmt_->SetSensitiveDetector(hori_sipmt_SD_);
/// issue flag to re-optimize geometry and physics before to run
G4RunManager::GetRunManager()->GeometryHasBeenModified();
G4RunManager::GetRunManager()->PhysicsHasBeenModified();
/// debug: check the material associated to LS logical volume
G4LogicalVolumeStore *pLVStore = G4LogicalVolumeStore::GetInstance();
G4int nLV = pLVStore->size();
G4int iLV = 0;
G4LogicalVolume *pLV = nullptr;
}