WorldLV is registered to the default region?

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

_Geant4 Version:_11.04
_Operating System:_Ubuntu22.04
_Compiler/Version:_VScode
_CMake Version:_3.21

Hi everyone, I would like to crate a SD and Hit, during the process of generating visual interface appears “WorldLV is registered to the default region?” after complishing the SD and Hit. But when I annotate the SD and Hit file, the process of generating visual interface will be normal.
"
Checking overlaps for volume HighEnergyDetectorPV:125 (G4Box) … OK!
Checking overlaps for volume HighEnergyDetectorPV:126 (G4Box) … OK!
WorldLV is registered to the default region.
"

Hope to get some suggestion.

That output is related to the use of G4Region and simply means that the WorldLV logical volume (which I assume is the world volume for the geometry) is being automatically registered as a region (see Logical Volumes — Book For Application Developers 11.1 documentation for more detail on regions).

I’m not sure if that answers the question or if you’re seeing some other issue.

UI failed information

Checking overlaps for volume HighEnergyDetectorPV:124 (G4Box) … OK!
Checking overlaps for volume HighEnergyDetectorPV:125 (G4Box) … OK!
Checking overlaps for volume HighEnergyDetectorPV:126 (G4Box) … OK!
WorldLV is registered to the default region.

Thread 1 “XMPI_DR” received signal SIGSEGV, Segmentation fault.
0x00007ffff7141270 in G4LogicalVolume::SetSensitiveDetector(G4VSensitiveDetector) () from /home/mapengchun/Geant4/lib/libG4geometry.so*
(gdb)
the above is my result of debugging.

My code:
void XMPI_DR_DetectorConstruction::ConstructSDandField()
{
// sensitive detectors -----------------------------------------------------
auto sdManager = G4SDManager::GetSDMpointer();
G4String SDname;

auto LowEnergyCrystal = new LowEnergyCrystalSD(SDname=“/LowEnergyCrystal”);
sdManager->AddNewDetector(LowEnergyCrystal);
fLogicLowEnergyCrystal->SetSensitiveDetector(LowEnergyCrystal);
}

Description: When I annotate the code of “fLogicLowEnergyCrystal->SetSensitiveDetector(LowEnergyCrystal)” , UI will be generated normal .

Hi, bmorgan.
Thank you so much. I fixed the problem.
I should not relate LogicVolume to the SD, when PhysicsVolumeName should be associated to the SD, the erro"Crash of UI” no happen again.

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