Define primary Particle

Hi Dear Geant4 member user !
I have some problem to define my soil sample source at a primary particle.
I already construct it like a geometry, and now I want to define it at the primary particle.
can someone have any idea ?

Check Check examples/basic/B1/include B1PrimaryGeneratorAction.hh