Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-24 02:22:16

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0003 from Configuration.ProcessModifiers.gpu_cff import gpu
0004 
0005 # conditions used *only* by the modules running on GPU
0006 from CalibTracker.SiPixelESProducers.siPixelROCsStatusAndMappingWrapperESProducer_cfi import siPixelROCsStatusAndMappingWrapperESProducer
0007 from CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi import siPixelGainCalibrationForHLTGPU
0008 
0009 # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
0010 from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizerPreSplitting_cfi import siPixelClustersPreSplitting
0011 
0012 siPixelClustersPreSplittingTask = cms.Task(
0013     # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
0014     siPixelClustersPreSplitting
0015 )
0016 
0017 # reconstruct the pixel digis and clusters on the gpu
0018 from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDA_cfi import siPixelRawToClusterCUDA as _siPixelRawToClusterCUDA
0019 siPixelClustersPreSplittingCUDA = _siPixelRawToClusterCUDA.clone()
0020 
0021 run3_common.toModify(siPixelClustersPreSplittingCUDA,
0022                      # use the pixel channel calibrations scheme for Run 3
0023                      isRun2 = False,
0024                      clusterThreshold_layer1 = 4000)
0025 
0026 # convert the pixel digis (except errors) and clusters to the legacy format
0027 from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoA_cfi import siPixelDigisClustersFromSoA as _siPixelDigisClustersFromSoA
0028 siPixelDigisClustersPreSplitting = _siPixelDigisClustersFromSoA.clone()
0029 
0030 run3_common.toModify(siPixelDigisClustersPreSplitting,
0031                      clusterThreshold_layer1 = 4000)
0032 
0033 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0034 
0035 (gpu & ~phase2_tracker).toReplaceWith(siPixelClustersPreSplittingTask, cms.Task(
0036     # conditions used *only* by the modules running on GPU
0037     siPixelROCsStatusAndMappingWrapperESProducer,
0038     siPixelGainCalibrationForHLTGPU,
0039     # reconstruct the pixel digis and clusters on the gpu
0040     siPixelClustersPreSplittingCUDA,
0041     # convert the pixel digis (except errors) and clusters to the legacy format
0042     siPixelDigisClustersPreSplitting,
0043     # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
0044     siPixelClustersPreSplittingTask.copy()
0045 ))
0046 
0047 from RecoLocalTracker.SiPixelClusterizer.siPixelPhase2DigiToClusterCUDA_cfi import siPixelPhase2DigiToClusterCUDA as _siPixelPhase2DigiToClusterCUDA
0048 # for phase2 no pixel raw2digi is available at the moment
0049 # so we skip the raw2digi step and run on pixel digis copied to gpu
0050 
0051 phase2_tracker.toReplaceWith(siPixelClustersPreSplittingCUDA,_siPixelPhase2DigiToClusterCUDA.clone())
0052 
0053 from EventFilter.SiPixelRawToDigi.siPixelDigisSoAFromCUDA_cfi import siPixelDigisSoAFromCUDA as _siPixelDigisSoAFromCUDA
0054 siPixelDigisPhase2SoA = _siPixelDigisSoAFromCUDA.clone(
0055     src = "siPixelClustersPreSplittingCUDA"
0056 )
0057 
0058 phase2_tracker.toModify(siPixelDigisClustersPreSplitting,
0059                         clusterThreshold_layer1 = 4000,
0060                         clusterThreshold_otherLayers = 4000,
0061                         src = "siPixelDigisPhase2SoA",
0062                         #produceDigis = False
0063                         )
0064 (gpu & phase2_tracker).toReplaceWith(siPixelClustersPreSplittingTask, cms.Task(
0065                             # reconstruct the pixel clusters on the gpu from copied digis
0066                             siPixelClustersPreSplittingCUDA,
0067                             # copy from gpu to cpu
0068                             siPixelDigisPhase2SoA,
0069                             # convert the pixel digis (except errors) and clusters to the legacy format
0070                             siPixelDigisClustersPreSplitting,
0071                             # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
0072                             siPixelClustersPreSplitting))