Message: Re: killing a G4Track and recording the energy Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: killing a G4Track and recording the energy 

Forum: Event and Track Management
Re: Question killing a G4Track and recording the energy (Jeremy McCormick)
Re: Feedback Re: killing a G4Track and recording the energy (Gumplinger Peter)
Date: 29 Apr, 2013
From: Jeremy McCormick <Jeremy McCormick>

> But since you know what you are doing, you can code to ALWAYS:
> 
> G4double energy = PreStepPoint->GetTotalEnergy();
> 
> (you use the PreStepPoint because you want the energy when the particle
> enters)

I currently record the energy in my SD using:

G4Step->GetTotalEnergyDeposit();

I believe what you listed would get the total energy of the track associated with the preStepPoint.

So in order to know what should be recorded, I think that I'd need to have the processHits() method check whether it is in a volume with a region that has this track killing behavior enabled. If so then it would get the preStepPoint energy, and if not, the default behavior of using GetTotalEnergyDeposit() from G4Step would be used.

Does that seem like a reasonable way to do this?

--Jeremy

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

1 Feedback: Re: killing a G4Track and recording the energy   (Gumplinger Peter - 29 Apr, 2013)
 Add Message Add Message
to: "Re: killing a G4Track and recording the energy"

 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 ]