MCTrack isPrimary behaviour different between AMPT and Pythia

Dear experts,
I have been confused at the behaviour of isPrimary function of MCTracks particularly for AMPT. I ran o2sim with AMPT and noticed that all the MCTracks which have isPrimary() true are the ingoing protons and neutrons. The behaviour is completely different for Pythia, where the isPrimary() true particles have transverse momentum and several different particle species.

I have attached a very brief presentation with the figures showing momentum and particle species for AMPT and Pythia to show the difference.

I think the behaviour should be fixed for the O2 AMPT macro.

Sincerely,
Oskari Saarimäki
Weekly.pdf (172.3 KB)