Event ID always zero

Hi! I am facing an issue related to Event ID. In my PrimaryGenerator class, I am using a for loop to loop over the number of particles to produce multiple primaries from a single run. I have some good reasons to not use General Particle Source or macro, so I want to implement it this way preferably. However, the BeginOfEventAction() in my EventAction class is getting called only once and therefore, my event id is always zero. I want separate event id for each primary particles. Is there a way I can do that? My for loop in primaryGenerator class is given below:

 for(int i = 0; i < radioactiveParticleNum; i++)
            radioactiveParticlePosition = fIsotopePos.at(K40).at(i);
            radioactiveParticleOrientation = radData -> SetupOrientation();
            radioactiveParticleTime = radData -> GetInitialTime() * s;

            fParticleGun -> SetParticlePosition(radioactiveParticlePosition);
            fParticleGun -> SetParticleMomentumDirection(radioactiveParticleOrientation);
            fParticleGun -> SetParticleEnergy(radioactiveParticleEnergy);
            fParticleGun -> SetParticleDefinition(radioactiveParticle);
            fParticleGun -> SetParticleCharge(radioactiveParticleCharge);
            fParticleGun -> SetParticleTime(radioactiveParticleTime);
            fParticleGun -> GeneratePrimaryVertex(fEvent);

The /run/beamOn N macro command does the event loop for N events. As I already wrote in the other post to which you replied, if you want one particle per event, then you should only generate one particle per event.