Filling an histogram

hi to everybody, I have been using ROOT for just some days and I have to face this problem: I have a TH2D filled with random numbers. I wanted them to generate a full circle of certain radius r. Some of the bins inside the circle are empty (this is my choice).
Now I want these empty bins to fill, (e.g.with 500 events) but I write

for(i=0;i<nbins; i++)

so all the empty bins are filled. how can I fill the bins inside the circle only? (maybe it’s not properly a ROOT problem…!)
thank you very much

It is up to you to find out if the bin is inside the circle or not, that is simple geometry.