-
Notifications
You must be signed in to change notification settings - Fork 29
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
Light backtracking segments fix #222
Conversation
…ssue with light backtracking segments appearing in multiple events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the detailed validations!
cli/simulate_pixels.py
Outdated
@@ -973,7 +972,7 @@ def save_results(event_times, is_first_batch, results, i_trig, i_mod=-1, light_o | |||
if light.LIGHT_SIMULATED: | |||
RangePush("sum_light_signals") | |||
light_inc = light_sim_dat[batch_mask][itrk:itrk+sim.BATCH_SIZE] | |||
selected_track_id = track_ids[batch_mask][itrk:itrk+sim.BATCH_SIZE] | |||
selected_track_id = np.ascontiguousarray(selected_tracks["segment_id"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps it makes more sense to cast it into a cupy array here selected_track_id = cp.asarray(selected_tracks["segment_id"])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marjoleinvannuland I'm really sorry... Actually it's better to change track_ids[batch_mask][itrk:itrk+sim.BATCH_SIZE]
now cp.array(selected_tracks["segment_id"])
to segment_ids_arr[batch_mask][itrk:itrk+sim.BATCH_SIZE]
to make it consistent between charge and light.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marjoleinvannuland Meanwhile, I think we can also remove this line (
larnd-sim/cli/simulate_pixels.py
Line 764 in e9fdcc0
track_ids = cp.asarray(np.arange(segment_ids.shape[0], dtype=int)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I updated the PR with the requested changes. The validation plots still look good.
larndsim validation plots
Use segment_id field of selected_tracks instead of track_ids to fix issue with light backtracking segments appearing in multiple events. I removed the line defining track_ids since they are no longer used anywhere and their definition is misleading.
larndsim validation