Message: Getting the energy of neutrons goes to nCapture processs Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Getting the energy of neutrons goes to nCapture processs 

Forum: Hadronic Processes
Date: 28 Mar, 2018
From: David Sangcheol Lee <David Sangcheol Lee>

Dear Geant4 experts

Hello I am trying to get the energy spectrum of the captured neutron so I did following codes in the stepping action

if(theStep->GetPostStepPoint()->GetPhysicalVolume()) {
    G4StepPoint * thePrePoint = theStep->GetPreStepPoint();
    G4VPhysicalVolume * thePrePV = thePrePoint->GetPhysicalVolume();
    G4String thePrePVname = thePrePV->GetName();
    G4StepPoint * thePostPoint = theStep->GetPostStepPoint();
    G4VPhysicalVolume * thePostPV = thePostPoint->GetPhysicalVolume();
    G4String thePostPVname = thePostPV->GetName();
    G4ParticleDefinition * particleType = theTrack->GetDefinition();
    processName = theStep->GetPostStepPoint()->GetProcessDefinedStep()->GetProcessName();
    G4String particleName = particleType->GetParticleName();

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

 if(particleName =="neutron"&&processName=="nCapture"){ 

#ifdef G4MULTITHREADED
	G4AutoLock lock(&GenNeutronFileLock);
#endif
	myrun->GetSourceFile2() << capEnergy << G4endl;
#ifdef G4MULTITHREADED
	lock.unlock();
#endif
      }

However, it comes out as 0

I do not understand why it is. I have obtained the coordinates of the captured neutrons (i.e. it works with the pulling coordinates) but I cannot pull the energy accordingly.

Could anyone tell me how to get the captured neutron energy?

Thank you

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

1 Idea: Re: Getting the energy of neutrons goes to nCapture processs   (Vladimir Ivanchenko - 28 Mar, 2018)
1 More: Re: Getting the energy of neutrons goes to nCapture processs   (David Sangcheol Lee - 03 Apr, 2018)
2 Question: Re: Getting the energy of neutrons goes to nCapture processs   (David Sangcheol Lee - 04 Apr, 2018)
 Add Message Add Message
to: "Getting the energy of neutrons goes to nCapture processs"

 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 ]