I want to define manually a neutron source, in this case a cylinder, with particle directions and spectrum obtained by tallying the neutrons in a previous simulation.
-in simulation 1, I simulate the spallation process in a complex geometry. Here, I define a logical volume, i.e. a cylinder, to tally neutrons crossing the surface (energy, position, direction) with the Hit class and Sensitive detector.
-in simulation 2, I want to take the output from simulation 1, in order to generate neutrons from a 3D surface, corresponding to that of the logical volume used previously.
Which can be the best way to implement it? I saw that it is possible to use G4GeneralParticleSource. I think that for this case, it is better not to use a macro but to define the source from the classes. Any suggestion (slides, documentation, examples) and recommendations on how to do that?
Thanks in advance for your time.