artemis-dev / artemis

A RooT Extension with Modular processors for Instant Switching
2 stars 6 forks source link

TModuleDecoderV1X90 Skips Hits after TDC Error Irrespective of the Error Flag #47

Open rin-yokoyama opened 1 year ago

rin-yokoyama commented 1 year ago

In TModuleDecoderV1290.cc at line L97 (same line in TModuleDecoderV1190.cc too), both ghf (Global Header Flag) and thf (TDC Header Flag) are set to 0, which results in skipping the decoding of the remaining data stored in evtdata. For the TDC error data, error flags are set from bit 0 to 14, depending on the type of error encountered. If the error pertains to a read-out FIFO overflow, trigger FIFO overflow, or a fatal chip error, then skipping the remaining data in the event seems reasonable. However, if the error pertains specifically to one of the groups (each group has 8 channels), users might want the option to continue reading the entire evtsize.

I encountered this issue because one of my data have too many hits per event from just one of the channel in group 0. This led to a TDC error being logged prior to the hits from other groups, resulting in the other channels not being read at all. However, upon commenting out L97, the decoder was able to successfully process the data for channels 8 or greater.

While users must be careful that no TDC error is logged during the data acquisition phase, this module decoder could potentially offer an option to either skip the rest or continue decoding based on the error flag.