Currently, the way we are using the GRL is by generating a trial assuming only the time profiles for time distribution, and then removing events not in good runs. This causes a bit of a headache when trying to inject a set number of signal events.
@mjlarson uses a different method in his package that I would like to implement here. The new process would be as follows:
generate background events
treat the good run list as a set of uniform distributions with different start and stop times, weighted relative to each other based on the event rates in each run.
multiply the the integrals of the good run list distributions and the background time profile distribution together to get probabilities for each run
for each event, randomly choose a run based on those probabilities to put the event into
then, for each run, use inverse transform sampling to randomly distribute the events in the run
This way, the injected signal is exactly what we expect, and this gives a coarse-grained accounting for the seasonal variation.
Currently, the way we are using the GRL is by generating a trial assuming only the time profiles for time distribution, and then removing events not in good runs. This causes a bit of a headache when trying to inject a set number of signal events.
@mjlarson uses a different method in his package that I would like to implement here. The new process would be as follows:
This way, the injected signal is exactly what we expect, and this gives a coarse-grained accounting for the seasonal variation.