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

Light backtracking segments fix #222

Merged
merged 4 commits into from
May 7, 2024
Merged

Conversation

marjoleinvannuland
Copy link
Contributor

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.
unique_evid_per_seg_heatmap
unique_evid_per_seg_count
larndsim validation

Marjolein van Nuland - Troost added 2 commits May 3, 2024 11:57
…ssue with light backtracking segments appearing in multiple events
Copy link
Member

@krwood krwood left a 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!

@@ -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"])
Copy link
Collaborator

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"])

Copy link
Collaborator

@YifanC YifanC May 7, 2024

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.

Copy link
Collaborator

@YifanC YifanC May 7, 2024

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 (

track_ids = cp.asarray(np.arange(segment_ids.shape[0], dtype=int))
) in the same PR

Copy link
Contributor Author

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.
unique_evid_per_seg_count
unique_evid_per_seg_heatmap
larndsim validation plots

@YifanC YifanC merged commit 787a274 into develop May 7, 2024
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

Successfully merging this pull request may close these issues.

4 participants