Skip to content

FPGATrackSim: cache decision to select event in the event selection service

Previously, the main algorithm would use the event selection service to decide whether or not an event had a truth track passing selection criteria; if it didn't the event would be silently skipped. When we split up the algorithm into two, that logic got moved into the DataPrepAlg-- but the check was no longer applied in the other algorithm.

That means that at the moment, the output TTree from the DataPrepAlg has fewer entries than the output TTree from the LogicalHitsProcessAlg, because the DataPrepAlg only writes out events that pass the selection criteria and the LogicalHitsProcessAlg writes out all events. This is a problem for making FPGA test vectors from the output.

An easy way to fix this is to connect the event selection service back to LogicalHitsProcessAlg and cache the result of the "should this event be used" decision there-- then the second algorithm can simply query this to see whether or not the first algorithm actually accepted the event. Since the algorithms have to be scheduled in sequence (hits get passed from one to the other) this should be safe to do.

Tagging @jahreda for review.

Merge request reports