I had a look at the PYTHIA side of this. It is almost trivial. However, I have no clue how to get PYTHIA to compile in CORSIKA
Also, we will need some kind of global list defining the particles that participate in the tracking, so they can be kept stable in PYTHIA and SIBYLL until their time is up. for now this is hard coded in the SIBYLL decay interface.
We should not compile Pythia inside corsika. We should have a "FindPythia" macro in cmake to find a prviously installed version and use that just by linking. I will look at this cmake part, if you like you can look at the process part.