Same as bug report #238....relative to /Geant/examples/advanced/brachy the ROGeometry returns the geometrical info relative to the PreStepPoint rather that the PostStepPoint where energy is released causing a shift in the reported volume if the Pre- and Post- steppoints do not belong to the same Read-out volume.... from gdb on Brachy.cc Breakpoint 4, BrachyWaterBoxSD::ProcessHits (this=0xa097538, aStep=0xa042568, ROhist=0xa4fb7a8) at src/BrachyWaterBoxSD.cc:63 63 G4VPhysicalVolume* physVol = ROhist->GetVolume(); (gdb) n 64 G4VPhysicalVolume* mothVol = ROhist->GetVolume(1); (gdb) 67 G4int k = ROhist->GetReplicaNumber(); (gdb) 68 G4int i = ROhist->GetReplicaNumber(1); (gdb) print i $16 = 50 (gdb) print k $17 = 50 (gdb) 70 if(m_pVoxelID[i+k*m_NumVoxelX]==-1) (gdb) 72 BrachyWaterBoxHit* WaterBoxHit = new BrachyWaterBoxHit(physVol- >GetLogicalVolume(),i,k); (gdb) print aStep->GetPreStepPoint()->GetPosition() $18 = (G4ThreeVector &) @0xa042590: {dx = 0.27908829377229649, dy = -0.47393008374576562, dz = -1.1717166850922462} (gdb) print aStep->GetPostStepPoint()->GetPosition() $19 = (G4ThreeVector &) @0xa042630: {dx = 29.583314294516825, dy = -27.361716823044034, dz = -3.9879420118919615} (gdb) print aStep->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName() $20 = ( G4String &) @0xa0a7f88: {<basic_string<char,string_char_traits<char>,__default_alloc_template<false,0> >> = {static npos = <optimized out>, static nilRep = {len = 0, res = 0, ref = 9051, selfish = false}, dat = 0xa094f60 "Transportation"}, _vptr$ = 0x6c3444 <G4String virtual table>} (gdb)
By design, RO geometry is an artificial geometry and thus a step will not be limitted by the boundary of RO geometry. If the user needs to know the energy depositions for two volumes, the geometry must be the "real" geometry.