Message: Re: Generating a secondary particle during an event Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: Generating a secondary particle during an event 

Forum: Event and Track Management
Re: Question Generating a secondary particle during an event
Date: 04 Apr, 2013
From: Gumplinger Peter <Gumplinger Peter>

Hello Tobias,

Geant4 does not allow you to add 'new primary particles' from G4UserSteppingAction. You may argue, why, but this was a design decision we took early on. The only way that you can add extra particles to your event simulation is through a G4VProcess. You have to write a 'physics process' that kicks in and produces secondaries when and where you want. How to write such a process is explained at:

http://geant4.slac.stanford.edu/UsersWorkshop/G4Lectures/Marc/

AddingNewProcess.PPT

There have been some design changes since with the G4ParticleChange class and some method names have changed. Therefore, its a good idea to crosscheck with current code.

Peter

 Add Message Add Message
to: "Re: Generating a secondary particle during an event"

 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 ]