Message: Re: How to not track particles below a specified energy or of a specified particle species Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: How to not track particles below a specified energy or of a specified particle species 

Forum: Fast Simulation, Transportation & Others
Re: Question How to not track particles below a specified energy or of a specified particle species
Date: 19 Jan, 2017
From: Michael H. Kelsey <Michael H. Kelsey>

On Thu, 19 Jan 2017 17:21:32 GMT, adamrouh wrote:
> I need to know a way to have my simulation not track particles below
> some energy threshold.

The most generic way to do this would be for you to implement a stepping action. In that action you can write whatever code you want to kill tracks by your desired criteria.

You may also choose to add StepLimiterPhysics to your physics list. You can then instantiate a G4UserLimits object and attach it to the world volume, setting a non-zero "ekinMin" value. This method is limited to the specific cuts available in G4UserLimits, but it does mean less coding.

> I would also like to somehow ignore particles of some specified species.
> Sometimes a neutron at a high enough energy will produce photons
> somewhere in my simulation. I do not care about these photons and would
> like to somehow ignore them as well.

You can turn off photon production by setting the photon "production cut" in your physics list to a very large value (larger than your beam energy). In that case, instead of creating photons that get tracked, Geant4 will assign their energy to the "energy deposit" value for the step.

If you want to do something more general (where you can specify other particle species than photons, for example), you should write a stacking action.

  -- Michael Kelsey

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

1 Question: Re: How to not track particles below a specified energy or of a specified particle species   (Beatriz Tapia - 31 Jan, 2017)
(_ Disagree: Re: How to not track particles below a specified energy or of a specified particle species   (Michael H. Kelsey - 31 Jan, 2017)
 Add Message Add Message
to: "Re: How to not track particles below a specified energy or of a specified particle species"

 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 ]