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.siPixelRawToClusterCUDAPhase1_cfi import siPixelRawToClusterCUDAPhase1 as _siPixelRawToClusterCUDA
19 from RecoLocalTracker.SiPixelClusterizer.siPixelRawToClusterCUDAHIonPhase1_cfi import siPixelRawToClusterCUDAHIonPhase1 as _siPixelRawToClusterCUDAHIonPhase1
20 siPixelClustersPreSplittingCUDA = _siPixelRawToClusterCUDA.clone()
21 
22 # HIon Modifiers
23 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
24 # Phase 2 Tracker Modifier
25 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
26 
27 (pp_on_AA & ~phase2_tracker).toReplaceWith(siPixelClustersPreSplittingCUDA, _siPixelRawToClusterCUDAHIonPhase1.clone())
28 
29 run3_common.toModify(siPixelClustersPreSplittingCUDA,
30  # use the pixel channel calibrations scheme for Run 3
31  clusterThreshold_layer1 = 4000,
32  VCaltoElectronGain = 1, # all gains=1, pedestals=0
33  VCaltoElectronGain_L1 = 1,
34  VCaltoElectronOffset = 0,
35  VCaltoElectronOffset_L1 = 0)
36 
37 
38 from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoAPhase1_cfi import siPixelDigisClustersFromSoAPhase1 as _siPixelDigisClustersFromSoAPhase1
39 from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoAPhase2_cfi import siPixelDigisClustersFromSoAPhase2 as _siPixelDigisClustersFromSoAPhase2
40 
41 siPixelDigisClustersPreSplitting = _siPixelDigisClustersFromSoAPhase1.clone()
42 
43 from RecoLocalTracker.SiPixelClusterizer.siPixelDigisClustersFromSoAHIonPhase1_cfi import siPixelDigisClustersFromSoAHIonPhase1 as _siPixelDigisClustersFromSoAHIonPhase1
44 (pp_on_AA & ~phase2_tracker).toReplaceWith(siPixelDigisClustersPreSplitting, _siPixelDigisClustersFromSoAHIonPhase1.clone())
45 
46 
47 run3_common.toModify(siPixelDigisClustersPreSplitting,
48  clusterThreshold_layer1 = 4000)
49 
50 gpu.toReplaceWith(siPixelClustersPreSplittingTask, cms.Task(
51  # conditions used *only* by the modules running on GPU
52  siPixelROCsStatusAndMappingWrapperESProducer,
53  siPixelGainCalibrationForHLTGPU,
54  # reconstruct the pixel digis and clusters on the gpu
55  siPixelClustersPreSplittingCUDA,
56  # convert the pixel digis (except errors) and clusters to the legacy format
57  siPixelDigisClustersPreSplitting,
58  # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
59  siPixelClustersPreSplittingTask.copy()
60 ))
61 
62 from RecoLocalTracker.SiPixelClusterizer.siPixelPhase2DigiToClusterCUDA_cfi import siPixelPhase2DigiToClusterCUDA as _siPixelPhase2DigiToClusterCUDA
63 # for phase2 no pixel raw2digi is available at the moment
64 # so we skip the raw2digi step and run on pixel digis copied to gpu
65 
66 from SimTracker.SiPhase2Digitizer.phase2TrackerDigitizer_cfi import PixelDigitizerAlgorithmCommon
67 
68 phase2_tracker.toReplaceWith(siPixelClustersPreSplittingCUDA,_siPixelPhase2DigiToClusterCUDA.clone(
69  Phase2ReadoutMode = PixelDigitizerAlgorithmCommon.Phase2ReadoutMode.value(), # Flag to decide Readout Mode : linear TDR (-1), dual slope with slope parameters (+1,+2,+3,+4 ...) with threshold subtraction
70  Phase2DigiBaseline = int(PixelDigitizerAlgorithmCommon.ThresholdInElectrons_Barrel.value()), #Same for barrel and endcap
71  Phase2KinkADC = 8,
72  ElectronPerADCGain = PixelDigitizerAlgorithmCommon.ElectronPerAdc.value()
73 ))
74 
75 from EventFilter.SiPixelRawToDigi.siPixelDigisSoAFromCUDA_cfi import siPixelDigisSoAFromCUDA as _siPixelDigisSoAFromCUDA
76 siPixelDigisPhase2SoA = _siPixelDigisSoAFromCUDA.clone(
77  src = "siPixelClustersPreSplittingCUDA"
78 )
79 
80 phase2_tracker.toReplaceWith(siPixelDigisClustersPreSplitting, _siPixelDigisClustersFromSoAPhase2.clone(
81  clusterThreshold_layer1 = 4000,
82  clusterThreshold_otherLayers = 4000,
83  src = "siPixelDigisPhase2SoA",
84  #produceDigis = False
85  ))
86 
87 (gpu & phase2_tracker).toReplaceWith(siPixelClustersPreSplittingTask, cms.Task(
88  # reconstruct the pixel clusters on the gpu from copied digis
89  siPixelClustersPreSplittingCUDA,
90  # copy from gpu to cpu
91  siPixelDigisPhase2SoA,
92  # convert the pixel digis (except errors) and clusters to the legacy format
93  siPixelDigisClustersPreSplitting,
94  # SwitchProducer wrapping the legacy pixel cluster producer or an alias for the pixel clusters information converted from SoA
95  siPixelClustersPreSplitting))