Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly implement the trigger condition in the readout #49

Open
lucabaldini opened this issue Apr 19, 2024 · 1 comment
Open

Properly implement the trigger condition in the readout #49

lucabaldini opened this issue Apr 19, 2024 · 1 comment

Comments

@lucabaldini
Copy link
Owner

At this point we do have a concept of trigger threshold, but most likely we are not doing the right thing when an event should not actually cause a trigger.

In readout.py all the read() functions should handle the condition where a given event is not causing a trigger.

@lucabaldini
Copy link
Owner Author

This might be not trivial, as the event loop, in the current implementation, looks like

for mc_event in tqdm(photon_list):
        x, y = mc_event.propagate(sensor.trans_diffusion_sigma)
        digi_event = readout.read(mc_event.timestamp, x, y, *readout_args)
        output_file.add_row(digi_event, mc_event)

i.e., we pre-compile a list of mc events, and then we process them, under the assumption that they all trigger.

We have two choices

  • accept that the numevents command-line switch is the number of generated (as opposed to triggered) events;
  • bring the MC generation into the event loop and go for a while on the trigger_id.

I vote for the second, provided that we do not incur into a too high of a performance hit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant