Hi,
I struggle with the nOfCollision scorer attached to a realWorldLogVol, reproducibly giving me a SegFault:
Thread 2 "XYZ" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff4741700 (LWP 396225)]
0x00007ffff5819297 in G4TouchableHistory::GetReplicaNumber(int) const () from /.../geant4_10_07_p03/geant4_10_07_p03-install/lib/libG4digits_hits.so
Same with version 11.0.0.
macro:
/score/create/realWorldLogVol sensorchip
/score/quantity/volumeFlux volumeFlux
/score/filter/particle gammaFilter gamma
/score/quantity/nOfCollision nOfCollision
/score/filter/particle gammaFilter gamma
/score/close
Detector construction:
G4Box* sensor = new G4Box( "sensorchip", (pixelSize * Nx) / 2.0, (pixelSize * Ny) / 2.0, pixelThickness/ 2.0);
G4LogicalVolume* sensorLV = new G4LogicalVolume(sensor, Silizium, sensor->GetName());
...
new G4PVPlacement( sensorRotation1, sensorPosition1, sensorLV, sensor->GetName(), fWorldVolume, false, 0, checkOverlap);
new G4PVPlacement( sensorRotation2, sensorPosition2, sensorLV, sensor->GetName(), fWorldVolume, false, 1, checkOverlap);
Commenting out the #/score/quantity/nOfCollision nOfCollision
makes it run just fine.
Any ideas what I do wrong here? i think realWorldLogVols should work in principle: geant4/G4ScoreQuantityMessenger.cc at geant4-11.0-release · Geant4/geant4 · GitHub