Skip to content
Snippets Groups Projects

Fix for the UT ZS decoder

Merged Wojciech Krupa requested to merge ut/zs_decoder_fix into 2024-patches

This MR concerns fixes in the UT ZS decoder:

  1. UT ZS decoder struggles with decoding the UTError packet whose minimal size is 128b even if empty (to comprise Flag Header). It causes an error because for an empty UT bank 32b are expected. We introduced a condition that skips this checkup for UTError smaller than 128b. pic
  2. It also comprises several minor improvements in decoder printouts, changes in the processing of the input (RawEvent to RawBank::View), and rewriting the options file to adjust to changes introduced in the decoder.

Two fixes to UT decoder from !4559 (merged) :

  1. Suppress UT clusters with 0 ADC charges.
  2. Use integer to calculate LHCbID instead of float to avoid inconsistent result due to floating point rounding. Related MR: Equivalent Allen MR for LHCbID fix (Allen suppresses 0 ADC charge correctly): Allen!1607 (merged) image ** ** patch generated by https://gitlab.cern.ch/lhcb/LHCb/-/jobs/38142817
Edited by Miroslav Saur

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Da Yu Tou mentioned in merge request Allen!1582 (merged)

    mentioned in merge request Allen!1582 (merged)

  • Da Yu Tou mentioned in merge request Allen!1444 (merged)

    mentioned in merge request Allen!1444 (merged)

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • bbed68a6 - Removing unnecessary code from UTADCWord.h

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Da Yu Tou resolved all threads

    resolved all threads

  • Wojciech Krupa added 2 commits

    added 2 commits

    • 58bbd7ca - Fix to UT LHCbID and suppress 0 ADC UT clusters
    • 5a00ab10 - Merge branch 'dtou_target_wojciech' into 'ut/zs_decoder_fix'

    Compare with previous version

  • Merged with !LHCb4559

  • Wojciech Krupa changed the description

    changed the description

  • Wojciech Krupa changed the description

    changed the description

  • added 1 commit

    • a4d26a66 - introducing additional protection against cases when nClusters() == 0

    Compare with previous version

  • Another protection introduced on @hawu and @tskwarni demand.

    pos_range{m_bank.first( ( ( nClusters() + 1 ) / 2 ) * 16 - 4 ), m_nDigits};

    posadc_range{m_bank.first( ( ( nClusters() + 1 ) / 2 ) * 16 - 4 ), m_nDigits, positionMethod, stripMax};

    are not protected against cases when nClusters() == 0. When nClusters() == 0, this essentially becomes m_bank.first(-4). This memory will never get used since in Iterator() in this case will return m_iterDigit.end() (auto PosLane = std::find_if( m_iterDigit.begin(), m_iterDigit.end(), []( unsigned int element ) { return element != 0; } );). However, if LHCb::span() does range checking then this would invoke gsl_assert. The behavior of gsl_assert depends on its configuration, as we have learned from this: link

    This in turn may depend on how code is compiled. Anyway, we protect the decoder to be sure it will not happen by: pos_range{m_bank.first( ( ( (nClusters()?nClusters():1) + 1 ) / 2 ) * 16 - 4 ), m_nDigits}; and similar solution for posadc_range

    Edited by Wojciech Krupa
  • added 1 commit

    Compare with previous version

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading