Closed YifanC closed 2 months ago
@krwood Before this fix, the sync packets backtracking information comes with a length of 2* ASSOCIATION_COUNT_TO_STORE
while we want it to be MAX_TRACKS_PER_PIXEL
. (In Git Issue #227 I've complained that we should modify how we make these arrays, so it would be clearer what it represents.) It worked only because we happen to set ASSOCIATION_COUNT_TO_STORE=10
and MAX_TRACKS_PER_PIXEL=20
. It will not cast a non-regular shaped list to array unless its datatype is object (https://github.com/DUNE/larnd-sim/blob/40395800933ec9284a0604eba710ad4e2e13f725/larndsim/fee.py#L346-L348). larndsim would not run without a fix like this if ASSOCIATION_COUNT_TO_STORE
and MAX_TRACKS_PER_PIXEL
are varied.
It is verified after this, ASSOCIATION_COUNT_TO_STORE
and MAX_TRACKS_PER_PIXEL
behave as expected. The current suite of validation plots would not reflect that.
This PR mainly tackles that the sync packets backtracking info has "wrong" shape, which breaks the functions of variable
ASSOCIATION_COUNT_TO_STORE
andMAX_TRACKS_PER_PIXEL
. The next thing is that I notice we append a mix of array and list for backtracking information since theresults
are casted into np.array's at the beginning ofsave_results
, but this change is not essential.