Aha, I looked at your pdf output files, and was confused not to see fills only at 0 and 1.  Now I realize that you are not clearing those lists with each event, but rather appending to them.  So each event, you append either zero or one gluon pt values to your list, and then fill the length of the list in the histogram, which is either the same as it was last event, or one more, which explains the more or less uniform distribution you got.  Pretty sure now that's not what you intend.