Events re-trial
We had some discussions on the option to re-shift and re-try events in the past and these options are present in the public gSeaGen version and are mentioned in the paper. So I would like to come back to this topic.
If we don't consider any re-trying or re-shifting then we need to divide the event weight by the number of generated CORSIKA showers.
Suppose that initially there are 10 showers in the CORSIKA file and one of these showers was repropagated 5 times. So it is the same as if there were 9+5=14 showers in the original file. So the weight must be modified accordingly for all events, not only for the re-propagated ones as suggested in the weighting scheme:
w_{event} = w_3/((1+n_{retries})*n_{generated_showers}
Also, only those events that have at least one muon on the can are saved. But the events which are not saved could also be re-propagated several times. Now again let's say we have 10 events and we choose the option -chances 100. Suppose that only 5 of the events have muons on the can, one of these events was re-propagated 5 times. So the number of generated events that resulted in muons at the can is 4+1*5=9. But also the non-saved events must be taken into account in the weight calculation. There are 5 events without muons at the can in this example. So in principle, we need to add 5 more events to the weight. But these events could have been re-propagated 100 times each so we need to add 500 events more to the weight.
However, the situation is more tricky since some events were not propagated at all because they don't have any muon which satisfies the energy range tolerance condition. And we don't know how many of these events we have in the output file. So we can't simply multiply all the missing events by the number of chances and add them to the weight, we need to multiply only those which were tried to be propagated.
Let me know your thoughts on this.
I would say that the safest option is to remove any re-shifting and re-trying from the code for public release.
Here is the comparison for the muon rate from one TeV_low proton CORSIKA file for two gSeaGen options, -chances 0 and -chances 5. The weight was calculated as written in the propagation of CORSIKA muons with gSeaGen documentation. The plot is for the ORCA6 can.
