In four places barcode < 100000 was used to select only generated particles. However, this should be 200000 which is the barcode threshold for grant4 particles. Also modified the code to use HepMC:SIM_BARCODE_THRESHOLD MagicNumber.
@averbyts @jchapman