455 hasHLTEcalPreshowerSeq =
any(seq
in process.__dict__
for seq
in [
'HLTDoFullUnpackingEgammaEcalMFSequence',
'HLTDoFullUnpackingEgammaEcalSequence'])
456 if not (hasHLTEcalPreshowerSeq
or 'HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence' in process.__dict__):
460 process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence = cms.Sequence()
461 if hasHLTEcalPreshowerSeq:
462 process.HLTDoFullUnpackingEgammaEcalMFSequence = cms.Sequence()
463 process.HLTDoFullUnpackingEgammaEcalSequence = cms.Sequence()
468 _load_if_missing(process,
'ecalElectronicsMappingGPUESProducer',
'EventFilter.EcalRawToDigi.ecalElectronicsMappingGPUESProducer_cfi')
469 _load_if_missing(process,
'ecalGainRatiosGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalGainRatiosGPUESProducer_cfi')
470 _load_if_missing(process,
'ecalPedestalsGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalPedestalsGPUESProducer_cfi')
471 _load_if_missing(process,
'ecalPulseCovariancesGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalPulseCovariancesGPUESProducer_cfi')
472 _load_if_missing(process,
'ecalPulseShapesGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalPulseShapesGPUESProducer_cfi')
473 _load_if_missing(process,
'ecalSamplesCorrelationGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalSamplesCorrelationGPUESProducer_cfi')
474 _load_if_missing(process,
'ecalTimeBiasCorrectionsGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalTimeBiasCorrectionsGPUESProducer_cfi')
475 _load_if_missing(process,
'ecalTimeCalibConstantsGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalTimeCalibConstantsGPUESProducer_cfi')
476 _load_if_missing(process,
'ecalMultifitParametersGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalMultifitParametersGPUESProducer_cfi')
477 _load_if_missing(process,
'ecalRechitADCToGeVConstantGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalRechitADCToGeVConstantGPUESProducer_cfi')
478 _load_if_missing(process,
'ecalRechitChannelStatusGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalRechitChannelStatusGPUESProducer_cfi')
479 _load_if_missing(process,
'ecalIntercalibConstantsGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalIntercalibConstantsGPUESProducer_cfi')
480 _load_if_missing(process,
'ecalLaserAPDPNRatiosGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalLaserAPDPNRatiosGPUESProducer_cfi')
481 _load_if_missing(process,
'ecalLaserAPDPNRatiosRefGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalLaserAPDPNRatiosRefGPUESProducer_cfi')
482 _load_if_missing(process,
'ecalLaserAlphasGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalLaserAlphasGPUESProducer_cfi')
483 _load_if_missing(process,
'ecalLinearCorrectionsGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalLinearCorrectionsGPUESProducer_cfi')
484 _load_if_missing(process,
'ecalRecHitParametersGPUESProducer',
'RecoLocalCalo.EcalRecProducers.ecalRecHitParametersGPUESProducer_cfi')
490 _clone_if_missing(process,
'hltEcalDigisGPU',
'EventFilter.EcalRawToDigi.ecalRawToDigiGPU_cfi',
'ecalRawToDigiGPU')
493 if not isinstance(process.hltEcalDigis, SwitchProducerCUDA):
495 if 'hltEcalDigisLegacy' not in process.__dict__:
496 process.hltEcalDigisLegacy = process.hltEcalDigis.clone()
498 raise Exception(
'unsupported configuration: "process.hltEcalDigis" is not a SwitchProducerCUDA, but "process.hltEcalDigisLegacy" already exists')
504 hltEcalDigisLegacy = cms.VPSet(
505 cms.PSet(type = cms.string(
"EBDigiCollection")),
506 cms.PSet(type = cms.string(
"EEDigiCollection")),
507 cms.PSet(type = cms.string(
"EBDetIdedmEDCollection")),
508 cms.PSet(type = cms.string(
"EEDetIdedmEDCollection")),
509 cms.PSet(type = cms.string(
"EBSrFlagsSorted")),
510 cms.PSet(type = cms.string(
"EESrFlagsSorted")),
511 cms.PSet(type = cms.string(
"EcalElectronicsIdedmEDCollection"), fromProductInstance = cms.string(
"EcalIntegrityBlockSizeErrors")),
512 cms.PSet(type = cms.string(
"EcalElectronicsIdedmEDCollection"), fromProductInstance = cms.string(
"EcalIntegrityTTIdErrors")),
513 cms.PSet(type = cms.string(
"EcalElectronicsIdedmEDCollection"), fromProductInstance = cms.string(
"EcalIntegrityZSXtalIdErrors")),
514 cms.PSet(type = cms.string(
"EcalPnDiodeDigisSorted")),
515 cms.PSet(type = cms.string(
"EcalPseudoStripInputDigisSorted"), fromProductInstance = cms.string(
"EcalPseudoStripInputs")),
516 cms.PSet(type = cms.string(
"EcalTriggerPrimitiveDigisSorted"), fromProductInstance = cms.string(
"EcalTriggerPrimitives")),
522 _clone_if_missing(process.hltEcalDigis,
'cuda',
'EventFilter.EcalRawToDigi.ecalCPUDigisProducer_cfi',
'ecalCPUDigisProducer',
523 digisInLabelEB = (
'hltEcalDigisGPU',
'ebDigis'),
524 digisInLabelEE = (
'hltEcalDigisGPU',
'eeDigis'),
525 produceDummyIntegrityCollections =
True
529 _clone_if_missing(process,
'hltEcalUncalibRecHitGPU',
'RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitProducerGPU_cfi',
'ecalUncalibRecHitProducerGPU',
530 digisLabelEB = (
'hltEcalDigisGPU',
'ebDigis'),
531 digisLabelEE = (
'hltEcalDigisGPU',
'eeDigis'),
532 shouldRunTimingComputation =
False
536 _clone_if_missing(process,
'hltEcalUncalibRecHitSoA',
'RecoLocalCalo.EcalRecProducers.ecalCPUUncalibRecHitProducer_cfi',
'ecalCPUUncalibRecHitProducer',
537 recHitsInLabelEB = (
'hltEcalUncalibRecHitGPU',
'EcalUncalibRecHitsEB'),
538 recHitsInLabelEE = (
'hltEcalUncalibRecHitGPU',
'EcalUncalibRecHitsEE'),
542 if not isinstance(process.hltEcalUncalibRecHit, SwitchProducerCUDA):
546 cpu = process.hltEcalUncalibRecHit
550 _clone_if_missing(process.hltEcalUncalibRecHit,
'cuda',
'RecoLocalCalo.EcalRecProducers.ecalUncalibRecHitConvertGPU2CPUFormat_cfi',
'ecalUncalibRecHitConvertGPU2CPUFormat',
551 recHitsLabelGPUEB = (
'hltEcalUncalibRecHitSoA',
'EcalUncalibRecHitsEB'),
552 recHitsLabelGPUEE = (
'hltEcalUncalibRecHitSoA',
'EcalUncalibRecHitsEE'),
558 _clone_if_missing(process, 'hltEcalRecHitGPU', 'RecoLocalCalo.EcalRecProducers.ecalRecHitGPU_cfi', 'ecalRecHitGPU',
559 uncalibrecHitsInLabelEB = ("hltEcalUncalibRecHitGPU","EcalUncalibRecHitsEB"),
560 uncalibrecHitsInLabelEE = ("hltEcalUncalibRecHitGPU","EcalUncalibRecHitsEE"),
563 _clone_if_missing(process, 'hltEcalRecHitSoA', 'RecoLocalCalo.EcalRecProducers.ecalCPURecHitProducer_cfi', 'ecalCPURecHitProducer',
564 recHitsInLabelEB = ("hltEcalRecHitGPU", "EcalRecHitsEB"),
565 recHitsInLabelEE = ("hltEcalRecHitGPU", "EcalRecHitsEE"),
568 # SwitchProducer wrapping the legacy ECAL calibrated rechits producer or a converter from SoA to legacy format
569 if not isinstance(process.hltEcalRecHit, SwitchProducerCUDA):
570 process.hltEcalRecHit = SwitchProducerCUDA(
572 cpu = process.hltEcalRecHit,
575 # convert the ECAL calibrated rechits from SoA to legacy format
576 _clone_if_missing(process.hltEcalRecHit, 'cuda', 'RecoLocalCalo.EcalRecProducers.ecalRecHitConvertGPU2CPUFormat_cfi', 'ecalRecHitConvertGPU2CPUFormat',
577 recHitsLabelGPUEB = ("hltEcalRecHitSoA", "EcalRecHitsEB"),
578 recHitsLabelGPUEE = ("hltEcalRecHitSoA", "EcalRecHitsEE"),
586 if not isinstance(process.hltEcalRecHit, SwitchProducerCUDA):
588 cpu = process.hltEcalRecHit.clone(
589 triggerPrimitiveDigiCollection = (
'hltEcalDigisLegacy',
'EcalTriggerPrimitives')
593 elif not hasattr(process.hltEcalRecHit,
'cpu'):
594 raise Exception(
'unsupported configuration: "process.hltEcalRecHit" is a SwitchProducerCUDA, but does not have a "cpu" branch')
596 if not hasattr(process.hltEcalRecHit,
'cuda'):
597 process.hltEcalRecHit.cuda = process.hltEcalRecHit.cpu.clone(
598 triggerPrimitiveDigiCollection =
'unused'
603 if process.hltEcalUncalibRecHit.cpu.algoPSet.timealgo ==
'RatioMethod':
604 process.hltEcalUncalibRecHitGPU.shouldRunTimingComputation =
True
605 process.hltEcalUncalibRecHitSoA.containsTimingInformation =
True
607 'EBtimeFitLimits_Lower',
608 'EBtimeFitLimits_Upper',
609 'EEtimeFitLimits_Lower',
610 'EEtimeFitLimits_Upper',
611 'EBtimeConstantTerm',
612 'EEtimeConstantTerm',
615 'outOfTimeThresholdGain12pEB',
616 'outOfTimeThresholdGain12pEE',
617 'outOfTimeThresholdGain12mEB',
618 'outOfTimeThresholdGain12mEE',
619 'outOfTimeThresholdGain61pEB',
620 'outOfTimeThresholdGain61pEE',
621 'outOfTimeThresholdGain61mEB',
622 'outOfTimeThresholdGain61mEE',
624 setattr(process.hltEcalUncalibRecHitGPU, _parName, getattr(process.hltEcalUncalibRecHit.cpu.algoPSet, _parName))
626 elif process.hltEcalUncalibRecHit.cpu.algoPSet.timealgo !=
'None':
627 _logMsg =
'"process.hltEcalUncalibRecHit.cpu.algoPSet.timealgo = \''+process.hltEcalUncalibRecHit.cpu.algoPSet.timealgo+
'\'"'
628 _logMsg +=
' has no counterpart in the GPU implementation of the ECAL local reconstruction (use "None" or "RatioMethod")'
629 raise Exception(
'unsupported configuration: '+_logMsg)
634 if 'HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask' not in process.__dict__:
635 process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask = cms.Task(
636 process.hltEcalDigisGPU,
637 process.hltEcalDigisLegacy,
638 process.hltEcalDigis,
639 process.hltEcalUncalibRecHitGPU,
640 process.hltEcalUncalibRecHitSoA,
641 process.hltEcalUncalibRecHit,
644 process.hltEcalDetIdToBeRecovered,
645 process.hltEcalRecHit,
648 elif not isinstance(process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask, cms.Task):
649 raise Exception(
'unsupported configuration: "process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask" already exists, but it is not a Task')
652 process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerSequence = cms.Sequence(
653 process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask
656 if hasHLTEcalPreshowerSeq:
658 if 'HLTPreshowerTask' not in process.__dict__:
659 process.HLTPreshowerTask = cms.Task(
660 process.hltEcalPreshowerDigis,
661 process.hltEcalPreshowerRecHit,
664 elif not isinstance(process.HLTPreshowerTask, cms.Task):
665 raise Exception(
'unsupported configuration: "process.HLTPreshowerTask" already exists, but it is not a Task')
668 process.HLTPreshowerSequence = cms.Sequence(process.HLTPreshowerTask)
670 if 'HLTDoFullUnpackingEgammaEcalTask' not in process.__dict__:
671 process.HLTDoFullUnpackingEgammaEcalTask = cms.Task(
672 process.HLTDoFullUnpackingEgammaEcalWithoutPreshowerTask,
673 process.HLTPreshowerTask,
676 elif not isinstance(process.HLTDoFullUnpackingEgammaEcalTask, cms.Task):
677 raise Exception(
'unsupported configuration: "process.HLTDoFullUnpackingEgammaEcalTask" already exists, but it is not a Task')
680 process.HLTDoFullUnpackingEgammaEcalSequence = cms.Sequence(process.HLTDoFullUnpackingEgammaEcalTask)
681 process.HLTDoFullUnpackingEgammaEcalMFSequence = cms.Sequence(process.HLTDoFullUnpackingEgammaEcalTask)