 More runs of the same beam

Hello,
running the simulation, the beam hits the target, then it stops when alla events (ie. number of particle) have been simulated.

Should it be possible to run the beam more times?

I mean…I simulate, for example 1000 primary positrons and I see that after a run there are still 990 primary positrons
Then I would make a second run using the 990 primary positrons to see how many positrons there are at the end of the second run (lets say 950 for example)…
Then I would make a third run using the 950 positrons to see how many positrons there are at the end of the third run

etc…

Should it be possible to make a series of runs?
Thank you

Hello, I try to repropose this question

The probabilities aren’t going to change, obviously, and your geometry (in the simulation) isn’t affected by having gone through a run. So in your example, if you only had 10/1000 interactions, then if you do a second run of 950 events, then you’ll only have 9.5 (so either 9 or 10) interactions. It’s simple arithmetic.

If you’re asking the general question of whether you can do multiple runs in a single job, the answer is yes. You can have multiple /run/beamOn N lines in a single macro file. Each successive beamOn will be assigned a new run number, starting at 0. So if you want to do this, you can include the run number in your output N-tuple to help you keep track.

Hello,
What is your goal? Why do you want to do this?
To take the outcome of one simulation and use it as input for a new one sounds complicated.

Can you make a copy of the target behind your first target and put everything in one simulation?
Like:
BEAM → TARGET1 → REST OF BEAM → TARGET2 → REST OF BEAM → TARGET3 ->…

This way your problem is solved in one simulation

Regards

Thanks the both @mkelsey and @MaxLoep

Yes, I did it by arithmetic…I wanted to compare the calculated with the simulated if it was possible …but I see it isn’t!

Yes, it is a way but not easily for hundreds of run…in addition, in my simulation I’ve a multi-target, so it would be redondant to multiply the mulit-target.
I wil just keep the calculated values by ratio from the first run.

Thank you