cms-gem-daq-project / ctp7_modules

0 stars 13 forks source link

[Feature request] Implement a fast Sbits mapping check with the new Sbits hitmap #150

Open lpetre-ulb opened 4 years ago

lpetre-ulb commented 4 years ago

Brief summary of issue

The new OH firmware (3.2.6) adds a full-granularity binary Sbit accumulator. Said otherwise, if a Sbit is seen even once during the acquisition period, the Sbit is set to 1 in the hitmap.

This new feature can be used to implement a new Sbit mapping check functionnality which can run quickly (less than 1 minute) and provide precious debugging information.

Types of issue

Expected Behavior

Leverage the new firmware feature to provide precious Sbits debugging information.

The proposed local function/functor should have the following signature:

std::vector<std::vector<uint32_t>> checkSbitMapping(uint32_t ohN, uint32_t vfatMask, ...usualCalpulseParameters...);

where the external vector is indexed by the pulsed/unmasked Sbit and the internal vector is the Sbit hitmap word is stored in little-endian.

performing the following:

saveState
maskAllChannels
for (channel: channels)
{
    unmask(channel)
    resetHitmap
    pulse(channel)
    readAndStoreHitmap
    mask(channel)
}
restoreState

Current Behavior

The Sbit hitmap is unused.

Context (for feature requests)

The Sbits mapping check currently takes a long time to run. We need a faster Sbit mapping check for debugging and possibly QC.

Moreover it can be the basis of the upcoming Sbits delay scan function.

Also, the Sbit monitor will sooner than later take into account the Sbit mapping while the hitmap will always follow the VFAT channels.

Your Environment