DDSimpleMuonDigi: build the cellID decoder once in initialize() - #48
Conversation
|
I think that regardless of where the digitisers get moved to, we can still fix this one centrally here before it gets moved. |
|
I'm checking why it fails for some stacks but not for others |
This change may be necessary (but insufficient) to make muon digitization work with the beam induced background overlay for muon collider; as the overlay collections don't exist at initialize time the cell ID parsing won't work.
4f6c672 to
8588874
Compare
|
Alternatively the encoding can be set in |
Thanks @jmcarcell, this sounds like a better fix. We'll go make the move from finalise to initialise in the overlay. |
BEGINRELEASENOTES
BitFieldCoderused to decode the layer out of the event loop: it is now built once ininitialize()and held as a member. Suggested by @jmcarcell in review.caloLayoutis constENDRELEASENOTES
This PR originally replaced the collection-metadata lookup of the cellID encoding with a lookup of the
GlobalCalorimeterReadoutIDDD4hep constant, so that overlaid beam-induced background in the muon system, whose collections are created at runtime and so carry no encoding in the metadata, could be digitised.That has been dropped, for two reasons:
CLD_o2_v07does not defineGlobalCalorimeterReadoutID(onlyGlobalTrackerReadoutID), soconstantAsStringthrew andrun_DDSimpleMuonDigifailed. Not every detector defines these fallback constants.As a result this PR no longer fixes the overlay digitisation problem — it is now just the cleanup. The intended fix belongs at the producer:
OverlayTimingandOverlayTimingRandomMixand will be followed up there.Given #42 it's possible this shouldn't be merged here; if the desire is for digitizers to live in experiment-specific repositories we could instead make a copy of DDSimpleMuonDigi with these modifications in our fork of k4reco (at least for the time being).