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.

(cherry picked from commit 4fb941e2c58849350cc7c2f776c2c85cd86b4466)
evtweight: Remove NParticleEvent in weighted 3pin plots

Remove the dependency on NParticleEvent in the script for plotting the
weighted MC for the pi- pi0 pi0 channel.

(cherry picked from commit 40a5ebfa9737fb9aad2bf64038de7af39b1e8d92)
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.

(cherry picked from commit d9a2ada4a1a020bf4162b82d09c210a1c68ebcf2)