Message: Segmentation error for get process name Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Segmentation error for get process name 

Forum: Event and Track Management
Date: 04 Apr, 2018
From: David Sangcheol Lee <David Sangcheol Lee>

Dear GEANT4 experts

Hello, I am trying to get the energy spectra of neutrons undergo capture process so I implemented this line of the code

G4Track * theTrack = theStep->GetTrack(); . . . processName = theStep->GetPreStepPoint()->GetProcessDefinedStep()->GetProcessName();

G4double capEnergy = theTrack->GetKineticEnergy()/MeV;

if(particleName =="neutron"&&processName=="nCapture"){
	G4AutoLock lock(&GenNeutronFileLock);
       	myrun->GetSourceFile2()<< capEnergy << G4endl;

so I basically get the energy from the nCapture process but I get the segmentation error. I cannot understand where it got wrong.

Could anyone help me with this?

Thank you

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: Segmentation error for get process name   (Michael H. Kelsey - 06 Apr, 2018)
(_ More: Re: Segmentation error for get process name   (David Sangcheol Lee - 07 Apr, 2018)
 Add Message Add Message
to: "Segmentation error for get process name"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]