Closed jncots closed 1 year ago
To be more generic, I think that there should be a version of the function taking a vector of four-vectors and a vector of PIDs. This is also required for building a replacement for the decay afterburner, since the particles on the event stack have 4-momenta defined with px, py != 0.
Also, there should be a corresponding test ;)
pythia.fill_event
and pythia.event.fill
are addedpythia.event.fill
is a general casepythia.fill_event
is a special case where only energy is required and mass is taken from Pythia itself.I leave only bare minimum fill
function.
@HDembinski, I forgot to mention that Pythia8 fill
function is ready. In tests the library is initialized using Pythia8 object in "decay mode" (without loading tables).
Didn't this became redundant with #167 ?
Didn't this became redundant with #167 ?
No this should be merged first and then #167 should be rebased.
No this should be merged first and then https://github.com/impy-project/chromo/pull/167 should be rebased.
Yes, I was thinking about something like this.
When Pythia8 is used for decay of particles, it is required to put the particle that should be decayed on a
event
stack . Currently it is only possible to do like this:So, to put a lot of particles from vector stack, it is needed to call
append
for every particle. This is time consuming because of Pythonfor
loop and the call toappend
itself. The time of filling loop is the same as the time required for decay in Pythia, which from calculation point of view are not comparable tasks at all.The added function
self._pythia.refill_decay_stack(stack.pid, stack.energy)
accepts 2 numpy arrays with pid and energy, and calls the above loop in C++. These significanly (~40 times for my test cases) reduces the time for filling theevent
array.