Dear Geant4 users,
I am trying to simulate optical photons and I would like that each particle generated was in a random position inside my box volume. I am currently using G4GeneralParticleSource instead of G4ParticleGun and I have the following configuration in my macro:
/gps/ene/mono 2.883 eV
/gps/polarization 1 1 1
/gps/pos/centre 0 0 0 cm
/gps/pos/halfx 5 cm
/gps/pos/halfy 5 cm
So what I get is that in every single run all of my photons are generated in a random position together, but I need that all of them were generated in separately positions. Does anyone know how to do that?
Also, I was wondering about the physics list for this case, I am only interested in physical process for optical photons, so using G4OpticalPhysics is enough, or is it necessary to activate something else? Because I was currently using like this:
auto *factory = new G4PhysListFactory(); auto *physicsList = factory->GetReferencePhysList("FTFP_BERT"); physicsList->RegisterPhysics( new G4OpticalPhysics() ); runManager->SetUserInitialization( physicsList );
Any help would be very appreciated! Thanks in advance!