Skip to content

Correctly handle guard ring strips in strip map files with only 4 columns #216

Description

@fhagemann

For strip map files with only 4 columns, we infer a lot of information (RTB, DIB, IsPrimary, ASICID, ChannelID) from the ReadOutID:

// Infer the rest of the information from the ReadOutID
SM.m_RTB = (SM.m_ReadOutID >> 8) & 0x01;
SM.m_DRM = (SM.m_ReadOutID >> 7) & 0x01;
SM.m_IsPrimary = (SM.m_ReadOutID >> 6) & 0x01;
SM.m_ASICID = (SM.m_ReadOutID >> 5) & 0x01;
SM.m_ChannelID = SM.m_ReadOutID & 0x1F;

The current implementation is correct for the strip contacts, but not for the guard ring contacts (ReadOutID >= 2048),
which assigns all guard ring contacts to DetectorID 0, which results in an error when running the ASIC polarity update:

// A (detector, side, strip) tuple must map to exactly one read-out channel. Note that the GSE writes
// a default polarity for every ASIC of a detector that was never configured, so the polarity data can
// mark both sides of an unused detector as low voltage - the strip map must therefore only contain
// the detectors the data was actually taken with, or this fires on detectors that were not part of
// the run. See Issue #189.
if (UpdatedDetSideStripToROI.find(Key) != UpdatedDetSideStripToROI.end()) {
if (g_Verbosity >= c_Error) cout << "MStripMap: ASIC polarity update creates a duplicate detector/side/strip tuple for detector " << S.m_DetectorID << " strip " << S.m_StripNumber << endl;
return false;
}
UpdatedDetSideStripToROI[Key] = S.m_ReadOutID;

MStripMap: ASIC polarity update creates a duplicate detector/side/strip tuple for detector 0 strip 64
XmlTagMeasurementLoaderHDF: Unable to update ASIC polarities based on the config JSON.

This was never an issue before because we only looked at data with one detector enabled (and we only consider strips in the strip map file from enabled detectors), but now came up when looking at data files with multiple detector IDs enabled.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions