DUNE / larnd-sim

Simulation framework for a pixelated Liquid Argon TPC
Apache License 2.0
10 stars 26 forks source link

larndsim truth information not updated #216

Open YifanC opened 4 months ago

YifanC commented 4 months ago

Brooke reported that in segments dataset, pixel_plane, n_electrons, n_photons are not updated. This is due to a mistake that when we filled the truth information, we didn't use the dataset passed to the simulation with the updated information. This should be fixed in the next iteration of MR5.

YifanC commented 2 months ago

If we only pass a subset of the segments, ndlar_flow will complain here: https://github.com/DUNE/ndlar_flow/blob/18a2e26f67cbfc8e00898ec99eb0a5bd3476044a/src/proto_nd_flow/reco/charge/raw_event_generator.py#L470 The fix should be updated along side with the flow fix.

YifanC commented 2 months ago

We should also understand why 2x2 active volume selection removes segments and why module active volume selection further removes segments.

YifanC commented 1 month ago

Using the first 50events of MR5 00999 file for a test: In total there are 44873 segments, and 44863 of these are in the larnd defined active volume. with larndsim commit ebaa36c and ndlar_flow commit 909fbe6, the total number of segments is consistent in larndsim and flow. The maximum of the prompt hit backtracked segment_id in flow is 44833 and in larndsim is 44833. The numbers match, and the hotfix is okay. Attempting to remove the hotfix with larndsim commit d28f888 and ndlar_flow commit 909fbe6. The number of segments in both larndsim and flow are 44863. Flow didn't trip at the place where I stated above in raw_event_generator. However, if you look at packet/ prompt hit backtracked segment_id, the maximum from larndsim is 44778, while the maximum from flow is 44833. Clearly there's a problem even flow doesn't complain...

YifanC commented 1 month ago

https://github.com/DUNE/ndlar_flow/blob/1ff5456cb04d3b2e4ced50dacc358310f9f31191/src/proto_nd_flow/reco/charge/raw_event_generator.py#L456 This shows we use the segment id in packet assn as indices for the reference between packets and segments