Hello Eddie,
thank you for your question.
Not knowing the details of your study (in this regard an *.inp
or *.flair
would be useful for next time), I will try to give you a general answer.
Going straight to the conclusion, yes, your idea works and it is actually quite often used (usually it is referred as a 2-steps simulation, you can search it in the forum).
Now, let me expand a bit on this introducing also some technicalities which you could find following this method.
2-steps simulation, simplifying, consists in:
- step-1: simulating a rare event (in your case the production of photon coming from the electron beam interaction) and scoring the results of this rare event once (in your case, scoring the photon spectrum with
USRBDX
or the photon phase space distribution using mgdraw.f
), such that you don’t need to repeat this time-consuming process every time you launch a simulation.
- step-2: using the result of the step-1 as source, to continue the transport focusing on the wished study.
Just for you as a reference, I am attaching an example for a 2-steps simulation:
2-step_simulation_example.zip (118.6 KB)
In the example, at step-1 the simulation uses electron as beam and it scores the photon exiting from the TARGET region. The informations of the photons are saved in *.fort.90
thanks to the mgdraw.f
routine.
The step-2, instead, starts from the phase space distribution scored at step-1. Thanks to the source_newgen.f
routine, the scored distribution is loaded and the primary photon, tracked in the geometry (empty in the example), is selected randomly between one of the multiple lines present in the file.
The difference between the use of USRBDX
or mgdraw.f
is that using the first you have information only related to the energy-intensity of the photon produced. Instead with the latter, you have also the position and direction of the exiting photon.
Regarding the normalization of the results obtained from step-2, I suggest to read some of the threads related to this topic present in the forum (one and two). Keep in mind that applying biasing in the step-1 will require a careful normalization of the results in step-2, since in this case you are modifying the number of photon produced in one event.
I hope this helps you in understanding how a 2-steps simulation works.
Cheers,
Giuseppe