In the real world, I had a box as my fScoringVolume. I knew if a particle reached its surfaces using the following code within the UserSteppingAction:
if(step->GetPostStepPoint()->GetStepStatus()==fGeomBoundary){ if(step->GetPostStepPoint()->GetPhysicalVolume()->GetLogicalVolume()==fScoringVolume){ DetectThisParticle(step); } }
Now I have a complex geometry and had to move the detector in the parallel world. How do I do the same as above but in the parallel geometry?
Failed effort:
Following example RE04, in the Construct() method of the concrete parallel world construction class I designed the detector volume(box) as usual:
G4VPhysicalVolume* ghostWorld = GetWorld();
G4LogicalVolume* worldLogical = ghostWorld->GetLogicalVolume();G4VSolid* solidbox = new G4Box(…)
G4LogicalVolume* logicbox = new G4LogicalVolume(…, solidbox, …)
new G4PVPlacement(…, worldLogical, …)fScoringVolume = logicbox;
I tested this without any geometry other than the world volumes(real+parallel) and the parallel box. But in the UserSteppingAction, the G4StepStatus does not return fgeomboundary anymore. If I try to use the step-limiting-process to do my job
step->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName()==“CoupledTransportation”
this is true only at the margins of the parallel world. Never on the parallel detector. Is this a limitation of the UserSteppingAction?