In the algorithm the logic should be "find out if the event has at least one particle". Instead the code was checking for a specific barcode.
The fix probably could fix the problems with particle gun. At least some of them.
Tag @jchapman @christos