CMS 3D CMS Logo

siPixelClustersPreSplitting_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.Eras.Modifier_run3_common_cff import run3_common
4 
5 # conditions used *only* by the modules running on GPU
6 from CalibTracker.SiPixelESProducers.siPixelROCsStatusAndMappingWrapperESProducer_cfi import siPixelROCsStatusAndMappingWrapperESProducer
7 from CalibTracker.SiPixelESProducers.siPixelGainCalibrationForHLTGPU_cfi import siPixelGainCalibrationForHLTGPU
8 
9 # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
11 
12 siPixelClustersPreSplittingTask = cms.Task(
13  # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
14  siPixelClustersPreSplitting
15 )
16 
17 # reconstruct the pixel digis and clusters on the gpu
18 from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDA_cfi import siPixelRawToClusterCUDA as _siPixelRawToClusterCUDA
19 siPixelClustersPreSplittingCUDA = _siPixelRawToClusterCUDA.clone()
20 
21 run3_common.toModify(siPixelClustersPreSplittingCUDA,
22  # use the pixel channel calibrations scheme for Run 3
23  isRun2 = False,
24  clusterThreshold_layer1 = 4000)
25 
26 # convert the pixel digis (except errors) and clusters to the legacy format
27 from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoA_cfi import siPixelDigisClustersFromSoA as _siPixelDigisClustersFromSoA
28 siPixelDigisClustersPreSplitting = _siPixelDigisClustersFromSoA.clone()
29 
30 run3_common.toModify(siPixelDigisClustersPreSplitting,
31  clusterThreshold_layer1 = 4000)
32 
33 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
34 
35 (gpu & ~phase2_tracker).toReplaceWith(siPixelClustersPreSplittingTask, cms.Task(
36  # conditions used *only* by the modules running on GPU
37  siPixelROCsStatusAndMappingWrapperESProducer,
38  siPixelGainCalibrationForHLTGPU,
39  # reconstruct the pixel digis and clusters on the gpu
40  siPixelClustersPreSplittingCUDA,
41  # convert the pixel digis (except errors) and clusters to the legacy format
42  siPixelDigisClustersPreSplitting,
43  # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
44  siPixelClustersPreSplittingTask.copy()
45 ))
46 
47 from RecoLocalTracker.SiPixelClusterizer.siPixelPhase2DigiToClusterCUDA_cfi import siPixelPhase2DigiToClusterCUDA as _siPixelPhase2DigiToClusterCUDA
48 # for phase2 no pixel raw2digi is available at the moment
49 # so we skip the raw2digi step and run on pixel digis copied to gpu
50 
51 phase2_tracker.toReplaceWith(siPixelClustersPreSplittingCUDA,_siPixelPhase2DigiToClusterCUDA.clone())
52 
53 from EventFilter.SiPixelRawToDigi.siPixelDigisSoAFromCUDA_cfi import siPixelDigisSoAFromCUDA as _siPixelDigisSoAFromCUDA
54 siPixelDigisPhase2SoA = _siPixelDigisSoAFromCUDA.clone(
55  src = "siPixelClustersPreSplittingCUDA"
56 )
57 
58 phase2_tracker.toModify(siPixelDigisClustersPreSplitting,
59  clusterThreshold_layer1 = 4000,
60  clusterThreshold_otherLayers = 4000,
61  src = "siPixelDigisPhase2SoA",
62  #produceDigis = False
63  )
64 (gpu & phase2_tracker).toReplaceWith(siPixelClustersPreSplittingTask, cms.Task(
65  # reconstruct the pixel clusters on the gpu from copied digis
66  siPixelClustersPreSplittingCUDA,
67  # copy from gpu to cpu
68  siPixelDigisPhase2SoA,
69  # convert the pixel digis (except errors) and clusters to the legacy format
70  siPixelDigisClustersPreSplitting,
71  # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
72  siPixelClustersPreSplitting))