pyInterface: handling of number of attempts in genpw

First test whether the number of attempts was already exceeded before
writing the generated event to an output file.

Also improved the format of the efficiency output.
generators: Fix issues with plotting weighted events for pi- pi0 pi0

Use the correct index for the particle name, when printing the error
message that a particle from the file is not found in the particle data
table.

Reduce scope of the variable used to keep track of the maximal and
average weight, the average weight is now calculated correctly and no
longer off by 1/nrEvents.