def customiseEcalLocalReconstruction(process):

    hasHLTEcalPreshowerSeq = any(seq in process.__dict__ for seq in [
        'HLTDoFullUnpackingEgammaEcalMFSequence',
        'HLTDoFullUnpackingEgammaEcalSequence'
    ])
    if not (hasHLTEcalPreshowerSeq
            or 'HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence'
            in process.__dict__):
        return process

    # FIXME replace the Sequences with empty ones to avoid expanding them during the (re)definition of Modules and EDAliases

    process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence = cms.Sequence(
    )
    if hasHLTEcalPreshowerSeq:
        process.HLTDoFullUnpackingEgammaEcalMFSequence = cms.Sequence()
        process.HLTDoFullUnpackingEgammaEcalSequence = cms.Sequence()

    # Event Setup

    process.load(
        "EventFilter.EcalRawToDigi.ecalElectronicsMappingGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalGainRatiosGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalPedestalsGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalPulseCovariancesGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalPulseShapesGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalSamplesCorrelationGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalTimeBiasCorrectionsGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalTimeCalibConstantsGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalMultifitParametersGPUESProducer_cfi"
    )

    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalRechitADCToGeVConstantGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalRechitChannelStatusGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalIntercalibConstantsGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalLaserAPDPNRatiosGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalLaserAPDPNRatiosRefGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalLaserAlphasGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalLinearCorrectionsGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalRecHitParametersGPUESProducer_cfi")

    # Modules and EDAliases

    # ECAL unpacker running on gpu
    from EventFilter.EcalRawToDigi.ecalRawToDigiGPU_cfi import ecalRawToDigiGPU as _ecalRawToDigiGPU
    process.hltEcalDigisGPU = _ecalRawToDigiGPU.clone()

    # SwitchProducer wrapping the legacy ECAL unpacker or the ECAL digi converter from SoA format on gpu to legacy format on cpu
    process.hltEcalDigisLegacy = process.hltEcalDigis.clone()
    from EventFilter.EcalRawToDigi.ecalCPUDigisProducer_cfi import ecalCPUDigisProducer as _ecalCPUDigisProducer

    process.hltEcalDigis = SwitchProducerCUDA(
        # legacy producer
        cpu=cms.EDAlias(hltEcalDigisLegacy=cms.VPSet(
            cms.PSet(type=cms.string("EBDigiCollection")),
            cms.PSet(type=cms.string("EEDigiCollection")),
            cms.PSet(type=cms.string("EBDetIdedmEDCollection")),
            cms.PSet(type=cms.string("EEDetIdedmEDCollection")),
            cms.PSet(type=cms.string("EBSrFlagsSorted")),
            cms.PSet(type=cms.string("EESrFlagsSorted")),
            cms.PSet(type=cms.string("EcalElectronicsIdedmEDCollection"),
                     fromProductInstance=cms.string(
                         "EcalIntegrityBlockSizeErrors")),
            cms.PSet(type=cms.string("EcalElectronicsIdedmEDCollection"),
                     fromProductInstance=cms.string(
                         "EcalIntegrityTTIdErrors")),
            cms.PSet(type=cms.string("EcalElectronicsIdedmEDCollection"),
                     fromProductInstance=cms.string(
                         "EcalIntegrityZSXtalIdErrors")),
            cms.PSet(type=cms.string("EcalPnDiodeDigisSorted")),
            cms.PSet(type=cms.string("EcalPseudoStripInputDigisSorted"),
                     fromProductInstance=cms.string("EcalPseudoStripInputs")),
            cms.PSet(type=cms.string("EcalTriggerPrimitiveDigisSorted"),
                     fromProductInstance=cms.string("EcalTriggerPrimitives")),
        )),
        # convert ECAL digis from SoA format on gpu to legacy format on cpu
        cuda=_ecalCPUDigisProducer.clone(
            digisInLabelEB=("hltEcalDigisGPU", "ebDigis"),
            digisInLabelEE=("hltEcalDigisGPU", "eeDigis"),
            produceDummyIntegrityCollections=cms.bool(True)))

    # ECAL multifit running on gpu
    from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitProducerGPU_cfi import ecalUncalibRecHitProducerGPU as _ecalUncalibRecHitProducerGPU
    process.hltEcalUncalibRecHitGPU = _ecalUncalibRecHitProducerGPU.clone(
        digisLabelEB=("hltEcalDigisGPU", "ebDigis"),
        digisLabelEE=("hltEcalDigisGPU", "eeDigis"),
        shouldRunTimingComputation=False)

    # copy the ECAL uncalibrated rechits from gpu to cpu in SoA format
    from RecoLocalCalo.EcalRecProducers.ecalCPUUncalibRecHitProducer_cfi import ecalCPUUncalibRecHitProducer as _ecalCPUUncalibRecHitProducer
    process.hltEcalUncalibRecHitSoA = _ecalCPUUncalibRecHitProducer.clone(
        recHitsInLabelEB=("hltEcalUncalibRecHitGPU", "EcalUncalibRecHitsEB"),
        recHitsInLabelEE=("hltEcalUncalibRecHitGPU", "EcalUncalibRecHitsEE"),
    )

    # SwitchProducer wrapping the legacy ECAL uncalibrated rechits producer or a converter from SoA to legacy format
    from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitConvertGPU2CPUFormat_cfi import ecalUncalibRecHitConvertGPU2CPUFormat as _ecalUncalibRecHitConvertGPU2CPUFormat
    process.hltEcalUncalibRecHit = SwitchProducerCUDA(
        # legacy producer
        cpu=process.hltEcalUncalibRecHit,
        # convert the ECAL uncalibrated rechits from SoA to legacy format
        cuda=_ecalUncalibRecHitConvertGPU2CPUFormat.clone(
            recHitsLabelGPUEB=("hltEcalUncalibRecHitSoA",
                               "EcalUncalibRecHitsEB"),
            recHitsLabelGPUEE=("hltEcalUncalibRecHitSoA",
                               "EcalUncalibRecHitsEE"),
        ))

    # Reconstructing the ECAL calibrated rechits on gpu works, but is extremely slow.
    # Disable it for the time being, until the performance has been addressed.
    """
    from RecoLocalCalo.EcalRecProducers.ecalRecHitGPU_cfi import ecalRecHitGPU as _ecalRecHitGPU
    process.hltEcalRecHitGPU = _ecalRecHitGPU.clone(
        uncalibrecHitsInLabelEB = ("hltEcalUncalibRecHitGPU","EcalUncalibRecHitsEB"),
        uncalibrecHitsInLabelEE = ("hltEcalUncalibRecHitGPU","EcalUncalibRecHitsEE"),
    )

    from RecoLocalCalo.EcalRecProducers.ecalCPURecHitProducer_cfi import ecalCPURecHitProducer as _ecalCPURecHitProducer
    process.hltEcalRecHitSoA = _ecalCPURecHitProducer.clone(
        recHitsInLabelEB = ("hltEcalRecHitGPU", "EcalRecHitsEB"),
        recHitsInLabelEE = ("hltEcalRecHitGPU", "EcalRecHitsEE"),
    )

    # SwitchProducer wrapping the legacy ECAL calibrated rechits producer or a converter from SoA to legacy format
    from RecoLocalCalo.EcalRecProducers.ecalRecHitConvertGPU2CPUFormat_cfi import ecalRecHitConvertGPU2CPUFormat as _ecalRecHitConvertGPU2CPUFormat
    process.hltEcalRecHit = SwitchProducerCUDA(
        # legacy producer
        cpu = process.hltEcalRecHit,
        # convert the ECAL calibrated rechits from SoA to legacy format
        cuda = _ecalRecHitConvertGPU2CPUFormat.clone(
            recHitsLabelGPUEB = ("hltEcalRecHitSoA", "EcalRecHitsEB"),
            recHitsLabelGPUEE = ("hltEcalRecHitSoA", "EcalRecHitsEE"),
        )
    )
    """

    # SwitchProducer wrapping the legacy ECAL rechits producer
    # the gpu unpacker does not produce the TPs used for the recovery, so the SwitchProducer alias does not provide them:
    #   - the cpu uncalibrated rechit producer may mark them for recovery, read the TPs explicitly from the legacy unpacker
    #   - the gpu uncalibrated rechit producer does not flag them for recovery, so the TPs are not necessary
    process.hltEcalRecHit = SwitchProducerCUDA(
        cpu=process.hltEcalRecHit.clone(
            triggerPrimitiveDigiCollection=('hltEcalDigisLegacy',
                                            'EcalTriggerPrimitives')),
        cuda=process.hltEcalRecHit.clone(
            triggerPrimitiveDigiCollection='unused'))

    # Tasks and Sequences

    process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask = cms.Task(
        process.hltEcalDigisGPU,  # unpack ECAL digis on gpu
        process.
        hltEcalDigisLegacy,  # legacy producer, referenced in the SwitchProducer
        process.hltEcalDigis,  # SwitchProducer
        process.
        hltEcalUncalibRecHitGPU,  # run ECAL local reconstruction and multifit on gpu
        process.
        hltEcalUncalibRecHitSoA,  # needed by hltEcalPhiSymFilter - copy to host
        process.
        hltEcalUncalibRecHit,  # needed by hltEcalPhiSymFilter - convert to legacy format
        # process.hltEcalRecHitGPU,                           # make ECAL calibrated rechits on gpu
        # process.hltEcalRecHitSoA,                           # copy to host
        process.hltEcalDetIdToBeRecovered,  # legacy producer
        process.hltEcalRecHit)  # legacy producer

    process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence = cms.Sequence(
        process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask)

    if hasHLTEcalPreshowerSeq:
        process.HLTPreshowerTask = cms.Task(
            process.
            hltEcalPreshowerDigis,  # unpack ECAL preshower digis on the host
            process.hltEcalPreshowerRecHit
        )  # build ECAL preshower rechits on the host

        process.HLTPreshowerSequence = cms.Sequence(process.HLTPreshowerTask)

        process.HLTDoFullUnpackingEgammaEcalTask = cms.Task(
            process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask,
            process.HLTPreshowerTask)

        process.HLTDoFullUnpackingEgammaEcalSequence = cms.Sequence(
            process.HLTDoFullUnpackingEgammaEcalTask)

        process.HLTDoFullUnpackingEgammaEcalMFSequence = cms.Sequence(
            process.HLTDoFullUnpackingEgammaEcalTask)

    # done
    return process
Exemple #2
0
def customiseEcalLocalReconstruction(process):

    if not 'HLTDoFullUnpackingEgammaEcalSequence' in process.__dict__:
        return process

    # FIXME replace the Sequences with empty ones to avoid exanding them during the (re)definition of Modules and EDAliases

    process.HLTDoFullUnpackingEgammaEcalMFSequence = cms.Sequence()
    process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence = cms.Sequence(
    )
    process.HLTDoFullUnpackingEgammaEcalSequence = cms.Sequence()

    # Event Setup

    process.load(
        "EventFilter.EcalRawToDigi.ecalElectronicsMappingGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalGainRatiosGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalPedestalsGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalPulseCovariancesGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalPulseShapesGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalSamplesCorrelationGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalTimeBiasCorrectionsGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalTimeCalibConstantsGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalMultifitParametersGPUESProducer_cfi"
    )

    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalRechitADCToGeVConstantGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalRechitChannelStatusGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalIntercalibConstantsGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalLaserAPDPNRatiosGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalLaserAPDPNRatiosRefGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalLaserAlphasGPUESProducer_cfi")
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalLinearCorrectionsGPUESProducer_cfi"
    )
    process.load(
        "RecoLocalCalo.EcalRecProducers.ecalRecHitParametersGPUESProducer_cfi")

    # Modules and EDAliases

    # ECAL unpacker running on gpu
    process.hltEcalDigisGPU = cms.EDProducer(
        "EcalRawToDigiGPU",
        InputLabel=cms.InputTag("rawDataCollector"),
        FEDs=cms.vint32(601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611,
                        612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622,
                        623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
                        634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644,
                        645, 646, 647, 648, 649, 650, 651, 652, 653, 654),
        digisLabelEB=cms.string("ebDigis"),
        digisLabelEE=cms.string("eeDigis"),
        maxChannelsEB=cms.uint32(61200),
        maxChannelsEE=cms.uint32(14648),
    )

    # SwitchProducer wrapping the legacy ECAL unpacker or the ECAL digi converter from SoA format on gpu to legacy format on cpu
    process.hltEcalDigisLegacy = process.hltEcalDigis.clone()

    process.hltEcalDigis = SwitchProducerCUDA(
        # legacy producer
        cpu=cms.EDAlias(hltEcalDigisLegacy=cms.VPSet(
            cms.PSet(type=cms.string("EBDigiCollection")),
            cms.PSet(type=cms.string("EEDigiCollection")),
            cms.PSet(type=cms.string("EBDetIdedmEDCollection")),
            cms.PSet(type=cms.string("EEDetIdedmEDCollection")),
            cms.PSet(type=cms.string("EBSrFlagsSorted")),
            cms.PSet(type=cms.string("EESrFlagsSorted")),
            cms.PSet(type=cms.string("EcalElectronicsIdedmEDCollection"),
                     fromProductInstance=cms.string(
                         "EcalIntegrityBlockSizeErrors")),
            cms.PSet(type=cms.string("EcalElectronicsIdedmEDCollection"),
                     fromProductInstance=cms.string(
                         "EcalIntegrityTTIdErrors")))),
        # convert ECAL digis from SoA format on gpu to legacy format on cpu
        cuda=cms.EDProducer(
            "EcalCPUDigisProducer",
            digisInLabelEB=cms.InputTag("hltEcalDigisGPU", "ebDigis"),
            digisInLabelEE=cms.InputTag("hltEcalDigisGPU", "eeDigis"),
            digisOutLabelEB=cms.string("ebDigis"),
            digisOutLabelEE=cms.string("eeDigis"),
            produceDummyIntegrityCollections=cms.bool(True)))

    # ECAL multifit running on gpu
    from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitProducerGPU_cfi import ecalUncalibRecHitProducerGPU as _ecalUncalibRecHitProducerGPU
    process.hltEcalUncalibRecHitGPU = _ecalUncalibRecHitProducerGPU.clone(
        digisLabelEB=("hltEcalDigisGPU", "ebDigis"),
        digisLabelEE=("hltEcalDigisGPU", "eeDigis"),
        shouldRunTimingComputation=False)

    # copy the ECAL uncalibrated rechits from gpu to cpu in SoA format
    process.hltEcalUncalibRecHitSoA = cms.EDProducer(
        "EcalCPUUncalibRecHitProducer",
        containsTimingInformation=cms.bool(False),
        recHitsInLabelEB=cms.InputTag("hltEcalUncalibRecHitGPU",
                                      "EcalUncalibRecHitsEB"),
        recHitsInLabelEE=cms.InputTag("hltEcalUncalibRecHitGPU",
                                      "EcalUncalibRecHitsEE"),
        recHitsOutLabelEB=cms.string("EcalUncalibRecHitsEB"),
        recHitsOutLabelEE=cms.string("EcalUncalibRecHitsEE"))

    # SwitchProducer wrapping the legacy ECAL uncalibrated rechits producer or a converter from SoA to legacy format
    process.hltEcalUncalibRecHit = SwitchProducerCUDA(
        # legacy producer
        cpu=process.hltEcalUncalibRecHit,
        # convert the ECAL uncalibrated rechits from SoA to legacy format
        cuda=cms.EDProducer(
            "EcalUncalibRecHitConvertGPU2CPUFormat",
            recHitsLabelGPUEB=cms.InputTag("hltEcalUncalibRecHitSoA",
                                           "EcalUncalibRecHitsEB"),
            recHitsLabelGPUEE=cms.InputTag("hltEcalUncalibRecHitSoA",
                                           "EcalUncalibRecHitsEE"),
            recHitsLabelCPUEB=cms.string("EcalUncalibRecHitsEB"),
            recHitsLabelCPUEE=cms.string("EcalUncalibRecHitsEE")))

    # Reconstructing the ECAL calibrated rechits on gpu works, but is extremely slow.
    # Disable it for the time being, until the performance has been addressed.
    """
    process.hltEcalRecHitGPU = cms.EDProducer("EcalRecHitProducerGPU",
        uncalibrecHitsInLabelEB = cms.InputTag("hltEcalUncalibRecHitGPU","EcalUncalibRecHitsEB"),
        uncalibrecHitsInLabelEE = cms.InputTag("hltEcalUncalibRecHitGPU","EcalUncalibRecHitsEE"),
        recHitsLabelEB = cms.string("EcalRecHitsEB"),
        recHitsLabelEE = cms.string("EcalRecHitsEE"),
        maxNumberHitsEB = cms.uint32(61200),
        maxNumberHitsEE = cms.uint32(14648),
        ChannelStatusToBeExcluded = cms.vstring(
            "kDAC",
            "kNoisy",
            "kNNoisy",
            "kFixedG6",
            "kFixedG1",
            "kFixedG0",
            "kNonRespondingIsolated",
            "kDeadVFE",
            "kDeadFE",
            "kNoDataNoTP"),
        killDeadChannels = cms.bool(True),
        EBLaserMIN = cms.double(0.01),
        EELaserMIN = cms.double(0.01),
        EBLaserMAX = cms.double(30.0),
        EELaserMAX = cms.double(30.0),
        flagsMapDBReco = cms.PSet(
            kGood = cms.vstring("kOk","kDAC","kNoLaser","kNoisy"),
            kNoisy = cms.vstring("kNNoisy","kFixedG6","kFixedG1"),
            kNeighboursRecovered = cms.vstring("kFixedG0", "kNonRespondingIsolated", "kDeadVFE"),
            kTowerRecovered = cms.vstring("kDeadFE"),
            kDead = cms.vstring("kNoDataNoTP")
        ),
        recoverEBIsolatedChannels = cms.bool(False),
        recoverEEIsolatedChannels = cms.bool(False),
        recoverEBVFE = cms.bool(False),
        recoverEEVFE = cms.bool(False),
        recoverEBFE = cms.bool(True),
        recoverEEFE = cms.bool(True),
    )

    process.hltEcalRecHitSoA = cms.EDProducer("EcalCPURecHitProducer",
        recHitsInLabelEB = cms.InputTag("hltEcalRecHitGPU", "EcalRecHitsEB"),
        recHitsInLabelEE = cms.InputTag("hltEcalRecHitGPU", "EcalRecHitsEE"),
        recHitsOutLabelEB = cms.string("EcalRecHitsEB"),
        recHitsOutLabelEE = cms.string("EcalRecHitsEE"),
        containsTimingInformation = cms.bool(False),
    )

    # SwitchProducer wrapping the legacy ECAL calibrated rechits producer or a converter from SoA to legacy format
    process.hltEcalRecHit = SwitchProducerCUDA(
        # legacy producer
        cpu = process.hltEcalRecHit,
        # convert the ECAL calibrated rechits from SoA to legacy format
        cuda = cms.EDProducer("EcalRecHitConvertGPU2CPUFormat",
            recHitsLabelGPUEB = cms.InputTag("hltEcalRecHitSoA", "EcalRecHitsEB"),
            recHitsLabelGPUEE = cms.InputTag("hltEcalRecHitSoA", "EcalRecHitsEE"),
            recHitsLabelCPUEB = cms.string("EcalRecHitsEB"),
            recHitsLabelCPUEE = cms.string("EcalRecHitsEE"),
        )
    """

    # SwitchProducer wrapping the legacy ECAL rechits producer
    # the gpu unpacker does not produce the TPs used for the recovery, so the SwitchProducer alias does not provide them:
    #   - the cpu uncalibrated rechit producer may mark them for recovery, read the TPs explicitly from the legacy unpacker
    #   - the gpu uncalibrated rechit producer does not flag them for recovery, so the TPs are not necessary
    process.hltEcalRecHit = SwitchProducerCUDA(
        cpu=process.hltEcalRecHit.clone(
            triggerPrimitiveDigiCollection=cms.InputTag(
                'hltEcalDigisLegacy', 'EcalTriggerPrimitives')),
        cuda=process.hltEcalRecHit.clone(
            triggerPrimitiveDigiCollection=cms.InputTag('unused')))

    # Tasks and Sequences

    process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask = cms.Task(
        process.hltEcalDigisGPU,  # unpack ECAL digis on gpu
        process.
        hltEcalDigisLegacy,  # legacy producer, referenced in the SwitchProducer
        process.hltEcalDigis,  # SwitchProducer
        process.
        hltEcalUncalibRecHitGPU,  # run ECAL local reconstruction and multifit on gpu
        process.
        hltEcalUncalibRecHitSoA,  # needed by hltEcalPhiSymFilter - copy to host
        process.
        hltEcalUncalibRecHit,  # needed by hltEcalPhiSymFilter - convert to legacy format
        # process.hltEcalRecHitGPU,                           # make ECAL calibrated rechits on gpu
        # process.hltEcalRecHitSoA,                           # copy to host
        process.hltEcalDetIdToBeRecovered,  # legacy producer
        process.hltEcalRecHit)  # legacy producer

    process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence = cms.Sequence(
        process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask)

    process.HLTPreshowerTask = cms.Task(
        process.
        hltEcalPreshowerDigis,  # unpack ECAL preshower digis on the host
        process.hltEcalPreshowerRecHit
    )  # build ECAL preshower rechits on the host

    process.HLTPreshowerSequence = cms.Sequence(process.HLTPreshowerTask)

    process.HLTDoFullUnpackingEgammaEcalTask = cms.Task(
        process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask,
        process.HLTPreshowerTask)

    process.HLTDoFullUnpackingEgammaEcalSequence = cms.Sequence(
        process.HLTDoFullUnpackingEgammaEcalTask)

    process.HLTDoFullUnpackingEgammaEcalMFSequence = cms.Sequence(
        process.HLTDoFullUnpackingEgammaEcalTask)

    # done
    return process
Exemple #3
0
)

# ECAL conditions used by the multifit running on GPU
from RecoLocalCalo.EcalRecProducers.ecalPedestalsGPUESProducer_cfi import ecalPedestalsGPUESProducer
from RecoLocalCalo.EcalRecProducers.ecalGainRatiosGPUESProducer_cfi import ecalGainRatiosGPUESProducer
from RecoLocalCalo.EcalRecProducers.ecalPulseShapesGPUESProducer_cfi import ecalPulseShapesGPUESProducer
from RecoLocalCalo.EcalRecProducers.ecalPulseCovariancesGPUESProducer_cfi import ecalPulseCovariancesGPUESProducer
from RecoLocalCalo.EcalRecProducers.ecalSamplesCorrelationGPUESProducer_cfi import ecalSamplesCorrelationGPUESProducer
from RecoLocalCalo.EcalRecProducers.ecalTimeBiasCorrectionsGPUESProducer_cfi import ecalTimeBiasCorrectionsGPUESProducer
from RecoLocalCalo.EcalRecProducers.ecalTimeCalibConstantsGPUESProducer_cfi import ecalTimeCalibConstantsGPUESProducer
from RecoLocalCalo.EcalRecProducers.ecalMultifitParametersGPUESProducer_cfi import ecalMultifitParametersGPUESProducer

# ECAL multifit running on GPU
from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitProducerGPU_cfi import ecalUncalibRecHitProducerGPU as _ecalUncalibRecHitProducerGPU
ecalMultiFitUncalibRecHitGPU = _ecalUncalibRecHitProducerGPU.clone(
  digisLabelEB = cms.InputTag('ecalDigisGPU', 'ebDigis'),
  digisLabelEE = cms.InputTag('ecalDigisGPU', 'eeDigis'),
)

# copy the uncalibrated rechits from GPU to CPU
from RecoLocalCalo.EcalRecProducers.ecalCPUUncalibRecHitProducer_cfi import ecalCPUUncalibRecHitProducer as _ecalCPUUncalibRecHitProducer
ecalMultiFitUncalibRecHitSoA = _ecalCPUUncalibRecHitProducer.clone(
  recHitsInLabelEB = cms.InputTag('ecalMultiFitUncalibRecHitGPU', 'EcalUncalibRecHitsEB'),
  recHitsInLabelEE = cms.InputTag('ecalMultiFitUncalibRecHitGPU', 'EcalUncalibRecHitsEE'),
)

# convert the uncalibrated rechits from SoA to legacy format
from RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitConvertGPU2CPUFormat_cfi import ecalUncalibRecHitConvertGPU2CPUFormat as _ecalUncalibRecHitConvertGPU2CPUFormat
gpu.toModify(ecalMultiFitUncalibRecHit,
  cuda = _ecalUncalibRecHitConvertGPU2CPUFormat.clone(
    recHitsLabelGPUEB = cms.InputTag('ecalMultiFitUncalibRecHitSoA', 'EcalUncalibRecHitsEB'),
    recHitsLabelGPUEE = cms.InputTag('ecalMultiFitUncalibRecHitSoA', 'EcalUncalibRecHitsEE'),