GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » 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? [message #26150] Tue, 06 December 2022 17:23 Go to previous message
m.steinen is currently offline  m.steinen
Messages: 3
Registered: December 2022
occasional visitor
From: *specf.him.uni-mainz.de
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
 
Read Message
Read Message
Previous Topic: Visualization of trajectories from simulation
Goto Forum:
  


Current Time: Sun May 28 01:02:28 CEST 2023

Total time taken to generate the page: 0.01053 seconds