From the discussion on the FEST week (2 Feb 2022), setting of the Source ID of each individual subdetector at the encoding level is (1) necessary for each subdetector and (2) necessary for any future FEST. Will require dedicated MR for each subdetector.
This means I also have to adapt the MEP encoding accordingly.
It also means that only MEPs can be encoded, which have the correct source ID, because
there deducing the detector id from the bank type is ambiguous.
Looking at the EDMS document, the top5 bits of the source ID should map to the bit used for the partition in the table. Some subdetectors have 2 bits, one for A-side and one for C-side.
It is therefore indeed ambiguous to deduce the top5 bits from the bank type alone. I see three options that could be used until all encoders have been fixed to properly set the sourceID:
In principle the detector geometry can be used to find if a source ID is either A or C side. For example for the Velo (unchecked if right/left really corresponds to A/C side) :
The A-side is set for all subdetectors, and the top5 bits are ignored in the decoders. This will work for Allen as it doesn't distinguish between A and C sides.
Reintroduce a mode to Allen where the bank type can be used to map MFPs to subdetectors
Indeed, apologies for the confusion. The table Markus mentioned contains bit, but as far as I can see the number of the bits in the table is used as a number in the sourceID.
Not sure to which EDMS note you are referring. The definition is in https://edms.cern.ch/document/2100937 Table 5 (and Table 3) define SRCID to be 16 bit
(would be nice in that case if the FTSourceID would use an unsigned 16 bit type internally instead of using unsigned int -- which is probably the source of my confusion -- so now fixed that as well in Detector!186 (merged): the masks are now enforced by the compiler to explicitly fit in 16 bits)
From the Muon: LHCb!3133 (merged) which includes !377 (merged) . The update to the source ID is to be added. @satta Please correct this info if incorrect