Clean up Calo decoding configuration
The following discussion from !1828 (merged) should be addressed:
we hardcode the name of the calo raw banks in (too) many places. This means a lot of methods have to be updated when changing the raw bank name or caller. I suggest to have that only in the make_{e,h}cal_digits
instead. Since we have only 2 possible names for the raw banks in Run 3, I'd add a switch there, such that it can be easily changed with a single parameter in any method calling make_{e,h}cal_digits
. It would be something like:
def make_ecal_digits(calo_raw_event=false):
ecalpath = '/world/DownstreamRegion/Ecal:DetElement-Info-IOV' if UseDD4Hep else '/dd/Structure/LHCb/DownstreamRegion/Ecal'
if calo_raw_event:
raw = make_raw("Calo")
rawerror = make_raw("CaloError")
else:
raw = make_raw("EcalPacked")
rawerror = make_raw("EcalPackedError")
adc_alg = CaloFutureRawToDigits(
name='FutureEcalZSup',
RawBanks=raw,
ErrorRawBanks=rawerror,
#need a different property wrt make_hcal_digits and output cannot be set
#so DetectorLocation has to be set here
DetectorLocation=ecalpath)
return adc_alg.OutputDigitData
same for make_hcal_digits
and then every call to these methods only has to say if it wants calo_raw_event
(ie "Calo" raw bank name) or not (ie "{E,H}calPacked" name)