CMS 3D CMS Logo

SiPixelHeterogenousDQM_FirstStep_cff.py
Go to the documentation of this file.
1 import copy
2 import FWCore.ParameterSet.Config as cms
10 # Alpaka Modules
19 
20 # Run-3 sequence
21 monitorpixelSoASource = cms.Sequence(siPixelPhase1MonitorRecHitsSoA * siPixelPhase1MonitorTrackSoA * siPixelMonitorVertexSoA)
22 # Run-3 Alpaka sequence
23 monitorpixelSoASourceAlpaka = cms.Sequence(siPixelPhase1MonitorRecHitsSoAAlpaka * siPixelPhase1MonitorTrackSoAAlpaka * siPixelMonitorVertexSoAAlpaka)
24 alpaka.toReplaceWith(monitorpixelSoASource, monitorpixelSoASourceAlpaka)
25 # Phase-2 sequence
26 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
27 _monitorpixelSoARecHitsSource = cms.Sequence(siPixelPhase2MonitorRecHitsSoA * siPixelPhase2MonitorTrackSoA * siPixelMonitorVertexSoA)
28 (phase2_tracker & ~alpaka).toReplaceWith(monitorpixelSoASource, _monitorpixelSoARecHitsSource)
29 _monitorpixelSoARecHitsSourceAlpaka = cms.Sequence(siPixelPhase2MonitorRecHitsSoAAlpaka * siPixelPhase2MonitorTrackSoAAlpaka * siPixelMonitorVertexSoAAlpaka)
30 (phase2_tracker & alpaka).toReplaceWith(monitorpixelSoASource, _monitorpixelSoARecHitsSourceAlpaka)
31 
32 # HIon Phase 1 sequence
33 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
34 
35 _monitorpixelSoARecHitsSourceHIon = cms.Sequence(siPixelHIonPhase1MonitorRecHitsSoA * siPixelHIonPhase1MonitorTrackSoA * siPixelMonitorVertexSoA)
36 (pp_on_AA & ~phase2_tracker).toReplaceWith(monitorpixelSoASource, _monitorpixelSoARecHitsSourceHIon)
37 _monitorpixelSoARecHitsSourceHIonAlpaka = cms.Sequence(siPixelHIonPhase1MonitorRecHitsSoAAlpaka * siPixelHIonPhase1MonitorTrackSoAAlpaka * siPixelMonitorVertexSoAAlpaka)
38 (pp_on_AA & ~phase2_tracker & alpaka).toReplaceWith(monitorpixelSoASource, _monitorpixelSoARecHitsSourceHIonAlpaka)
39 
40 #Define the sequence for GPU vs CPU validation
41 #This should run:- individual monitor for the 2 collections + comparison module
51 #Alpaka
59 
60 # digi errors
61 SiPixelPhase1RawDataConfForCPU = copy.deepcopy(SiPixelPhase1RawDataConf)
62 for pset in SiPixelPhase1RawDataConfForCPU:
63  pset.topFolderName = "SiPixelHeterogeneous/PixelErrorsCPU"
64 
65 siPixelPhase1MonitorRawDataACPU = SiPixelPhase1RawDataAnalyzer.clone(
66  src = "siPixelDigis@cpu",
67  histograms = SiPixelPhase1RawDataConfForCPU
68 )
69 
70 SiPixelPhase1RawDataConfForGPU = copy.deepcopy(SiPixelPhase1RawDataConf)
71 for pset in SiPixelPhase1RawDataConfForGPU:
72  pset.topFolderName = "SiPixelHeterogeneous/PixelErrorsGPU"
73 
74 siPixelPhase1MonitorRawDataAGPU = SiPixelPhase1RawDataAnalyzer.clone(
75  src = "siPixelDigis@cuda",
76  histograms =SiPixelPhase1RawDataConfForGPU
77 )
78 
79 
80 siPixelPhase1MonitorRecHitsSoACPU = siPixelPhase1MonitorRecHitsSoA.clone(
81  pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cpu",
82  TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoACPU"
83 )
84 
85 siPixelPhase1MonitorRecHitsSoAGPU = siPixelPhase1MonitorRecHitsSoA.clone(
86  pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cuda",
87  TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoAGPU"
88 )
89 
90 siPixelPhase2MonitorRecHitsSoACPU = siPixelPhase2MonitorRecHitsSoA.clone(
91  pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cpu",
92  TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoACPU"
93 )
94 
95 siPixelPhase2MonitorRecHitsSoAGPU = siPixelPhase2MonitorRecHitsSoA.clone(
96  pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cuda",
97  TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoAGPU"
98 )
99 
100 siPixelHIonPhase1MonitorRecHitsSoACPU = siPixelHIonPhase1MonitorRecHitsSoA.clone(
101  pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cpu",
102  TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoACPU"
103 )
104 
105 siPixelHIonPhase1MonitorRecHitsSoAGPU = siPixelHIonPhase1MonitorRecHitsSoA.clone(
106  pixelHitsSrc = "siPixelRecHitsPreSplittingSoA@cuda",
107  TopFolderName = "SiPixelHeterogeneous/PixelRecHitsSoAGPU"
108 )
109 
110 
111 siPixelPhase1MonitorTrackSoACPU = siPixelPhase1MonitorTrackSoA.clone(
112  pixelTrackSrc = 'pixelTracksSoA@cpu',
113  topFolderName = 'SiPixelHeterogeneous/PixelTrackSoACPU',
114 )
115 
116 siPixelPhase1MonitorTrackSoAGPU = siPixelPhase1MonitorTrackSoA.clone(
117  pixelTrackSrc = 'pixelTracksSoA@cuda',
118  topFolderName = 'SiPixelHeterogeneous/PixelTrackSoAGPU',
119 )
120 
121 siPixelPhase2MonitorTrackSoACPU = siPixelPhase2MonitorTrackSoA.clone(
122  pixelTrackSrc = 'pixelTracksSoA@cpu',
123  topFolderName = 'SiPixelHeterogeneous/PixelTrackSoACPU',
124 )
125 
126 siPixelPhase2MonitorTrackSoAGPU = siPixelPhase2MonitorTrackSoA.clone(
127  pixelTrackSrc = 'pixelTracksSoA@cuda',
128  topFolderName = 'SiPixelHeterogeneous/PixelTrackSoAGPU',
129 )
130 
131 siPixelHIonPhase1MonitorTrackSoACPU = siPixelHIonPhase1MonitorTrackSoA.clone(
132  pixelTrackSrc = 'pixelTracksSoA@cpu',
133  topFolderName = 'SiPixelHeterogeneous/PixelTrackSoACPU',
134 )
135 
136 siPixelHIonPhase1MonitorTrackSoAGPU = siPixelHIonPhase1MonitorTrackSoA.clone(
137  pixelTrackSrc = 'pixelTracksSoA@cuda',
138  topFolderName = 'SiPixelHeterogeneous/PixelTrackSoAGPU',
139 )
140 
141 
142 siPixelMonitorVertexSoACPU = siPixelMonitorVertexSoA.clone(
143  pixelVertexSrc = 'pixelVerticesSoA@cpu',
144  topFolderName = 'SiPixelHeterogeneous/PixelVertexSoACPU',
145 )
146 
147 siPixelMonitorVertexSoAGPU = siPixelMonitorVertexSoA.clone(
148  pixelVertexSrc = 'pixelVerticesSoA@cuda',
149  topFolderName = 'SiPixelHeterogeneous/PixelVertexSoAGPU',
150 )
151 
152 
153 
154 # PixelRecHits: monitor of CPUSerial product (Alpaka backend: 'serial_sync')
155 siPixelRecHitsSoAMonitorSerial = siPixelPhase1MonitorRecHitsSoAAlpaka.clone(
156  pixelHitsSrc = cms.InputTag( 'siPixelRecHitsPreSplittingAlpakaSerial' ),
157  TopFolderName = cms.string( 'SiPixelHeterogeneous/PixelRecHitsSerial' )
158 )
159 
160 # PixelRecHits: monitor of Device product (Alpaka backend: '')
161 siPixelRecHitsSoAMonitorDevice = siPixelPhase1MonitorRecHitsSoAAlpaka.clone(
162  pixelHitsSrc = cms.InputTag( 'siPixelRecHitsPreSplittingAlpaka' ),
163  TopFolderName = cms.string( 'SiPixelHeterogeneous/PixelRecHitsDevice' )
164 )
165 
166 # PixelTracks: monitor of CPUSerial product (Alpaka backend: 'serial_sync')
167 siPixelTrackSoAMonitorSerial = siPixelPhase1MonitorTrackSoAAlpaka.clone(
168  pixelTrackSrc = cms.InputTag('pixelTracksAlpakaSerial'),
169  topFolderName = cms.string('SiPixelHeterogeneous/PixelTrackSerial')
170 )
171 
172 # PixelTracks: monitor of CPUSerial product (Alpaka backend: 'serial_sync')
173 siPixelTrackSoAMonitorDevice = siPixelPhase1MonitorTrackSoAAlpaka.clone(
174  pixelTrackSrc = cms.InputTag('pixelTracksAlpaka'),
175  topFolderName = cms.string('SiPixelHeterogeneous/PixelTrackDevice')
176 )
177 
178 # PixelVertices: monitor of CPUSerial product (Alpaka backend: 'serial_sync')
179 siPixelVertexSoAMonitorSerial = siPixelMonitorVertexSoAAlpaka.clone(
180  pixelVertexSrc = cms.InputTag("pixelVerticesAlpakaSerial"),
181  topFolderName = cms.string('SiPixelHeterogeneous/PixelVertexSerial')
182 )
183 
184 siPixelVertexSoAMonitorDevice = siPixelMonitorVertexSoAAlpaka.clone(
185  pixelVertexSrc = cms.InputTag("pixelVerticesAlpaka"),
186  topFolderName = cms.string('SiPixelHeterogeneous/PixelVertexDevice')
187 )
188 
189 # Run-3 sequence
190 monitorpixelSoACompareSource = cms.Sequence(siPixelPhase1MonitorRawDataACPU *
191  siPixelPhase1MonitorRawDataAGPU *
192  siPixelPhase1MonitorRecHitsSoACPU *
193  siPixelPhase1MonitorRecHitsSoAGPU *
194  siPixelPhase1CompareRecHitsSoA *
195  siPixelPhase1MonitorTrackSoAGPU *
196  siPixelPhase1MonitorTrackSoACPU *
197  siPixelPhase1CompareTrackSoA *
198  siPixelMonitorVertexSoACPU *
199  siPixelMonitorVertexSoAGPU *
200  siPixelCompareVertexSoA *
201  siPixelPhase1RawDataErrorComparator)
202 # and the Alpaka version
203 monitorpixelSoACompareSourceAlpaka = cms.Sequence(
204  siPixelRecHitsSoAMonitorSerial *
205  siPixelRecHitsSoAMonitorDevice *
206  siPixelPhase1CompareRecHitsSoAAlpaka *
207  siPixelTrackSoAMonitorSerial *
208  siPixelTrackSoAMonitorDevice *
209  siPixelPhase1CompareTrackSoAAlpaka *
210  siPixelVertexSoAMonitorSerial *
211  siPixelVertexSoAMonitorDevice *
212  siPixelCompareVertexSoAAlpaka )
213 
214 # Phase-2 sequence
215 _monitorpixelSoACompareSource = cms.Sequence(siPixelPhase2MonitorRecHitsSoACPU *
216  siPixelPhase2MonitorRecHitsSoAGPU *
217  siPixelPhase2CompareRecHitsSoA *
218  siPixelPhase2MonitorTrackSoAGPU *
219  siPixelPhase2MonitorTrackSoACPU *
220  siPixelPhase2CompareTrackSoA *
221  siPixelMonitorVertexSoACPU *
222  siPixelMonitorVertexSoAGPU *
223  siPixelCompareVertexSoA)
224 
225 # HIon sequence
226 _monitorpixelSoACompareSourceHIonPhase1 = cms.Sequence(siPixelHIonPhase1MonitorRecHitsSoACPU *
227  siPixelHIonPhase1MonitorRecHitsSoAGPU *
228  siPixelHIonPhase1CompareRecHitsSoA *
229  siPixelHIonPhase1MonitorTrackSoAGPU *
230  siPixelHIonPhase1MonitorTrackSoACPU *
231  siPixelHIonPhase1CompareTrackSoA *
232  siPixelMonitorVertexSoACPU *
233  siPixelMonitorVertexSoAGPU *
234  siPixelCompareVertexSoA)
235 
236 phase2_tracker.toReplaceWith(monitorpixelSoACompareSource,_monitorpixelSoACompareSource)
237 
238 from Configuration.ProcessModifiers.gpuValidationPixel_cff import gpuValidationPixel
239 gpuValidationPixel.toReplaceWith(monitorpixelSoASource, monitorpixelSoACompareSource)
240 
241 from Configuration.ProcessModifiers.alpakaValidationPixel_cff import alpakaValidationPixel
242 (alpakaValidationPixel & ~gpuValidationPixel).toReplaceWith(monitorpixelSoASource, monitorpixelSoACompareSourceAlpaka)