GSI Forum - RDF feed
type: channel
description: GSI Helmholtzzentrum für Schwerionenforschung
items: How can I add particles to the simulation after a particle was stopped?
items: Re: How can I add particles to the simulation after a particle was stopped?

How can I add particles to the simulation after a particle was stopped?
type: item
description: Hi all, I have a question about adding particles during the simulation in PandaRoot (Geant4) and maybe someone can help me because I'm trying this for a few days without success. Let my describe the situation first: For the simulations of the hyperatom experiment we first create the \Xi^- in our primary target (in the simulation these are created by a generator) and stop the \Xi^- in an absorber. At this point the hyperatom might then be formed in an exited state and we will study it decaying to its atomic "ground state" (mostly emitting X-rays). In the past we did this simulations in 2 steps: 1) Simulate the \Xi^- and store the stopping point. 2) Use the stopping point as start vertex for a second simulation and create the X-rays and stuff in here. This was feaseable for all the studies I did in the past but now we want to combine both steps into a single simulation and this is the point of my problem. How can I add new particles during a "running" event to the stack of particles that need to be tracked? I don't think that I can use/create a new primary generator due to the restriction that these "secondaries" should only appear for stopped \Xi^-. I tried multiple options until now but none of them seemed to work: 1) FairPrimaryGenerator::AddTrack(...) <--- as far as I understood this only works during the initialization phase of a new event when the primary particles are generated 2) PndStack::PushTrack(....) <-- This should add a particle to the stacked of particles that should be tracked (AddTrack(...) also calls this function) It seems to me that the stacksize of particles to be tracked does not increase in both ways (I also tried to add PndStack::PopNextTrack(...) without success). Does anyone know how to do this properly or is there another way? Greetings, Marcell
creator: m.steinen
date: 2022-12-06T16:23:33-00:00

Re: How can I add particles to the simulation after a particle was stopped?
type: item
description: Solved the problem (hopefully). Had to set the "stackPopper" special process in g4config.C. Found this here: https://root-forum.cern.ch/t/stack-pushtrack-in-vmc/20986
creator: m.steinen
date: 2022-12-08T17:03:44-00:00