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 reshape #201

Merged
merged 5 commits into from
Feb 16, 2024
Merged

Light backtracking reshape #201

merged 5 commits into from
Feb 16, 2024

Conversation

YifanC
Copy link
Collaborator

@YifanC YifanC commented Feb 15, 2024

Based on feature branch brussell_light_backtrack.

This change stores truth information in such format, [('trigger_id', 'i4'), ('op_channel_id','i4'), ('tick','i4'), ('event_id','i4'), ('segment_id','i8'), ('pe_current','f8')], where trigger_id, op_channel_id and tick correspond to the index of the light_wvfm dataset which takes the shape of (#light triggers, #light readout channels, #light samples).

It has been tested on one file, MiniRun5_1E19_RHC.convert2h5.00666.EDEPSIM.hdf5, with modular variation activated and deactivated. This test used configuration of setting MAX_MC_TRUTH_IDS to 0, 20, 50, 100, 200 and MC_TRUTH_THRESHOLD to 1. When MAX_MC_TRUTH_IDS = 0, the output file size is about 1GB. With other settings, the output file size is about 1.1GB.

The run time with respect to the setting MAX_MC_TRUTH_IDS can be found in the following graph. Note that the default larndsim/bin/lightLUT.npz is used for this test. Using the light LUT's with finer granularity will increase the run time by a few minutes.
run_time_vs_max_track

The plot below shows how many segments contribute to a light waveform per optical channel per trigger. The file size with the different settings indicate that MAX_MC_TRUTH_IDS = 20 may be sufficient, but on the conservative side, I suggest to set it to 50. The detector property yaml files are adjust accordingly.
max_track_ids_guide

In addition, I'm showing the negative sum of the truth contribution in pe and ADC/4 in trigger 0 channel 16 as an example. The amplitudes do not match. Perhaps I'm comparing the wrong quantity. It needs to be looked into further. Other than that I think this branch is ready to be merged.
MR5_666_tirg0_opchannel16

@YifanC YifanC requested review from krwood, mjkramer, russellphysics and marjoleinvannuland and removed request for mjkramer February 15, 2024 00:45
@marjoleinvannuland
Copy link
Contributor

I think the missing amplitude can be explained by the MC_TRUTH_THRESHOLD value

Filter empty light waveform backtracking which is filled with the default value '-1', and flatten the backtracking info to 1D array.

Args:
i_evt(int): event id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which event_id is this? The spill id?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The event_id refers to a true event. To be inclusive, it could be a spill, a cosmic event or a particle bomb/gun event. The use of event seem to be consistent from larnd-sim and onwards.

@YifanC
Copy link
Collaborator Author

YifanC commented Feb 16, 2024

@marjoleinvannuland This is the same channel same trigger setting the pe threshold to 0. I think it still doesn't match.
MR5_666_tirg0_opchannel16_0pe

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.

3 participants