CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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.siPixelDigisClustersFromSoAPhase1_cfi import siPixelDigisClustersFromSoAPhase1 as _siPixelDigisClustersFromSoAPhase1
28 from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoAPhase2_cfi import siPixelDigisClustersFromSoAPhase2 as _siPixelDigisClustersFromSoAPhase2
29 
30 siPixelDigisClustersPreSplitting = _siPixelDigisClustersFromSoAPhase1.clone()
31 
32 run3_common.toModify(siPixelDigisClustersPreSplitting,
33  clusterThreshold_layer1 = 4000)
34 
35 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
36 
37 gpu.toReplaceWith(siPixelClustersPreSplittingTask, cms.Task(
38  # conditions used *only* by the modules running on GPU
39  siPixelROCsStatusAndMappingWrapperESProducer,
40  siPixelGainCalibrationForHLTGPU,
41  # reconstruct the pixel digis and clusters on the gpu
42  siPixelClustersPreSplittingCUDA,
43  # convert the pixel digis (except errors) and clusters to the legacy format
44  siPixelDigisClustersPreSplitting,
45  # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
46  siPixelClustersPreSplittingTask.copy()
47 ))
48 
49 from RecoLocalTracker.SiPixelClusterizer.siPixelPhase2DigiToClusterCUDA_cfi import siPixelPhase2DigiToClusterCUDA as _siPixelPhase2DigiToClusterCUDA
50 # for phase2 no pixel raw2digi is available at the moment
51 # so we skip the raw2digi step and run on pixel digis copied to gpu
52 
53 phase2_tracker.toReplaceWith(siPixelClustersPreSplittingCUDA,_siPixelPhase2DigiToClusterCUDA.clone())
54 
55 from EventFilter.SiPixelRawToDigi.siPixelDigisSoAFromCUDA_cfi import siPixelDigisSoAFromCUDA as _siPixelDigisSoAFromCUDA
56 siPixelDigisPhase2SoA = _siPixelDigisSoAFromCUDA.clone(
57  src = "siPixelClustersPreSplittingCUDA"
58 )
59 
60 phase2_tracker.toReplaceWith(siPixelDigisClustersPreSplitting, _siPixelDigisClustersFromSoAPhase2.clone(
61  clusterThreshold_layer1 = 4000,
62  clusterThreshold_otherLayers = 4000,
63  src = "siPixelDigisPhase2SoA",
64  #produceDigis = False
65  ))
66 
67 (gpu & phase2_tracker).toReplaceWith(siPixelClustersPreSplittingTask, cms.Task(
68  # reconstruct the pixel clusters on the gpu from copied digis
69  siPixelClustersPreSplittingCUDA,
70  # copy from gpu to cpu
71  siPixelDigisPhase2SoA,
72  # convert the pixel digis (except errors) and clusters to the legacy format
73  siPixelDigisClustersPreSplitting,
74  # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
75  siPixelClustersPreSplitting))