Problem 676

Summary: Getting Null Pointer when trying to get the Logical Volume in MyStackingAction
Product: Geant4 Reporter: jmunoz
Component: trackAssignee: Makoto.Asai
Status: RESOLVED INVALID    
Severity: normal    
Priority: P5    
Version: 6.2   
Hardware: PC   
OS: Linux   

Description jmunoz 2004-10-05 04:58:25 CEST
I´m trying to expedite my simulations by discarding particles generated on
unrelevant volumes for results.

Ir order to get this, I include in myStackingACtion class, inside the function
ClassifyNewTrack(aTrack), the next instruction:
const G4LogicalVolume* logVolume = aTrack->GetLogicalVolumeAtVertex();
in order to get the logical volume and then its name. But when I make this I
get a Null Pointer, and when trying to access the name, then program aborts
with a segmentation violation.
Comment 1 asai 2004-10-22 15:22:59 CEST
Most likely the user uses the LogicalVolume pointer even for the primary
particles.