Hi,
thanks a lot for following up!
- I now defined a volume that is definitely large enough to contain the source:
G4VSolid* sourceBox = new G4Box(“SourceBox”, 10m/2., 10m/2., 10*m/2.);
G4LogicalVolume* sourceLV = new G4LogicalVolume(sourceBox, G4Material::GetMaterial(“Galactic”), “SourceLV”);
//G4LogicalVolume* sourceLV = new G4LogicalVolume(sourceBox, G4Material::GetMaterial(“G4_Pb”), “SourceLV”);
G4VPhysicalVolume* sourcePV = new G4PVPlacement(0, G4ThreeVector(0,0,0), sourceLV, “SourcePV”, worldLV, false, 0, true);
-
I also added "/gps/pos/confine SourcePV” to the run file.
-
With “/gps/ene/mono 10000 MeV” I still see the debug output:
Primary particle (proton) — Transfered with momentum (0,0,10898)
- I also implemented a UserSteppingAction, which however does not contain any steps for material “Galactic” (as expected) but contains steps if I change the material of the SourcePV to G4_Pb (just for testing purposes). This is the output I get:
=====================================
G4EventManager::ProcessOneEvent()
=====================================
1 vertices passed from G4Event.
Primary particle (proton) — Transfered with momentum (0,0,10898)
A new track 0x14c978ac0 (trackID 1, parentID 0) is passed to G4StackManager.
1 primaries are passed from G4EventTransformer.
!!! Now start processing an event !!!
###pop requested out of 1 stacked tracks.
Track 0x14c978ac0 (trackID 1, parentID 0) is passed to G4TrackingManager.
parentID = 0, trackVolume = SourcePV, prePoint x/y/z-momentum: 0/0/10898
parentID = 0, trackVolume = SourcePV, prePoint x/y/z-momentum: 20.2309/8.21415/10889.5
parentID = 0, trackVolume = SourcePV, prePoint x/y/z-momentum: 17.0722/15.7584/10884.5
…
So, it seems that this does not fix the issue, i.e. the z-momentum is still > 10 GeV for the proton. Did I miss something?
Best
Johannes