Hello, I’m trying to simulate 10^8 events. The run started at 3 pm and it is still running…unfortunately due the low cross section value of the interaction e+e- -> mu+ mu- I need many events to hope to produce muons (maybe also more than 10^8), but I can’t wait days to get a simulation! I know that Geant allows to do a bias, i.e. I simulate n events, but I can set to show results as if I simulate m>>m events. How can I do it? for example, how can I set to simulate 10^5 events, but show results as if I simulated 10^10?
10^8 events require so much time without biasing. I tried to simulate 10^6 but I didn’t get secondary mu+/-. I do the selection of secondary mu+/- in this way in the stepping action
I was noticing that there are some examples in which there is the Physics List.cc and there are included some G4 files regarding the physics process…so…maybe, didn’t I get e-e+ ->mu+mu- events, because I need to add the physicslist.cc files and to call the class e G4AnnihiToMuPair or to call this process in other file (stepping action, etc.)???
Edit: Do I’ve just to copy the files
Physicslist.cc
-Physicslistmessenger.cc
StepMax.cc
-StepMaxMessenger.cc
Physicslist.hh
-Physicslistmessenger.hh
StepMax.hh
-StepMaxMessenger.hh
from the \geant4_10_06\examples\extended\electromagnetic\TestEm6\ to my program and to add #include "PhysicsList.hh" in exampleB1.cc or what should I do to simulate the interaction e+e- ->mu+mu-?
The long output that you get for each Geant4 simulation summarises at the top what you have included, for instance, it tells you which processes are defined. Indeed, it probably lacks AnnihiToMuPair.
You can activate it directly in your UI macro (before run initialization):
/physics_lists/em/PositronToMuons true
To bias the cross section you can use another command:
Thank you @anna it worked and biasing the cross section, I also get the muons!
Last question please,
I copied the PrimaryGeneratorAction.cc and the PrimaryGeneratorAction.hh from examples\extended\common\
to use the G4GeneralParticleSource. I tried it and it worked. I’ve just a problem.
but the first one (to set the beam momentum) doesn’t work. It says that SetParticleMomentumDirection isn’t a memember of the GeneralParticleSource, so what shoul I use to set the particle momentum along the z axis?
You can consult the list of available UI commands for GPS in the user guide. To set up the direction and position:
/gps/direction Px Py Pz
Set the momentum direction [default (1,0,0)] of generated particles using (1)
/gps/position X Y Z unit
Sets the centre co-ordinates (X,Y,Z) of the source [default (0,0,0) cm]. The units can be micron, mm, cm, m or km. (NB: it is recommended to use /gps/pos/centre instead.)