LDMX-Software / ldmx-sw

The Light Dark Matter eXperiment simulation and reconstruction framework.
https://ldmx-software.github.io
GNU General Public License v3.0
22 stars 20 forks source link

Testbeam reconstruction wrong barID assignment #1067

Open PeterGy opened 2 years ago

PeterGy commented 2 years ago

Describe the bug During reconstruction, each pair of bars is assigned the same ID, one of them being correct and the other wrong.

To Reproduce Steps to reproduce the behavior:

  1. Decode a testbeam run, in this case run 287 fpga0, using decode.py found in ldmx-tb-online
  2. List every reconstructed barID in an event. You will find that half are missing while the others are duplicates.

Desired behavior Bars recieving their correct IDs.

Screenshots One image shows the mapping of hits. Mapped distribution of number of hits of each bar___fpga0_287 Here is a full list of the present reco and digi IDs in an event. The true or false refers to whether the recoID translated from the digiID is in the event or not. Debug.txt As produced by the code snippet image (1)

Environment:

Additional context Clearly ldmx-sw correctly converts digiIDs to recoIDs in general, but fails to do so somewhere along the testbeam reco. The simulation reco works as intended.

cmantill commented 2 years ago

Was able to reproduce this issue. It is a bug on the HcalRecProducer, fixed with this commit. Should be integrated when issue 40 is fully tested.

tvami commented 1 month ago

@cmantill given your commit above, is this issue fixed and ready to be closed?

cmantill commented 1 month ago

It looks like this branch was never integrated. But the reconstruction got split into two different files: https://github.com/LDMX-Software/ldmx-sw/blob/trunk/Hcal/src/Hcal/HcalDoubleEndRecProducer.cxx https://github.com/LDMX-Software/ldmx-sw/blob/trunk/Hcal/src/Hcal/HcalSingleEndRecProducer.cxx

and the first file contains this fix. I am not sure if this needs to be propagated to HcalRecProducer.