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 # digi errors
155 SiPixelPhase1RawDataConfForSerial = copy.deepcopy(SiPixelPhase1RawDataConf)
156 for pset in SiPixelPhase1RawDataConfForSerial:
157  pset.topFolderName = "SiPixelHeterogeneous/PixelErrorsCPU"
158 
159 siPixelPhase1MonitorRawDataASerial = SiPixelPhase1RawDataAnalyzer.clone(
160  src = "siPixelDigiErrorsAlpakaSerial",
161  histograms = SiPixelPhase1RawDataConfForSerial
162 )
163 
164 SiPixelPhase1RawDataConfForDevice = copy.deepcopy(SiPixelPhase1RawDataConf)
165 for pset in SiPixelPhase1RawDataConfForDevice:
166  pset.topFolderName = "SiPixelHeterogeneous/PixelErrorsGPU"
167 
168 siPixelPhase1MonitorRawDataADevice = SiPixelPhase1RawDataAnalyzer.clone(
169  src = "siPixelDigiErrorsAlpaka",
170  histograms = SiPixelPhase1RawDataConfForDevice
171 )
172 
173 siPixelPhase1CompareDigiErrorsSoAAlpaka = siPixelPhase1RawDataErrorComparator.clone(
174  pixelErrorSrcGPU = cms.InputTag("siPixelDigiErrorsAlpaka"),
175  pixelErrorSrcCPU = cms.InputTag("siPixelDigiErrorsAlpakaSerial"),
176  topFolderName = cms.string('SiPixelHeterogeneous/PixelErrorCompareGPUvsCPU')
177 )
178 
179 # PixelRecHits: monitor of CPUSerial product (Alpaka backend: 'serial_sync')
180 siPixelRecHitsSoAMonitorSerial = siPixelPhase1MonitorRecHitsSoAAlpaka.clone(
181  pixelHitsSrc = cms.InputTag( 'siPixelRecHitsPreSplittingAlpakaSerial' ),
182  TopFolderName = cms.string( 'SiPixelHeterogeneous/PixelRecHitsSerial' )
183 )
184 
185 # PixelRecHits: monitor of Device product (Alpaka backend: '')
186 siPixelRecHitsSoAMonitorDevice = siPixelPhase1MonitorRecHitsSoAAlpaka.clone(
187  pixelHitsSrc = cms.InputTag( 'siPixelRecHitsPreSplittingAlpaka' ),
188  TopFolderName = cms.string( 'SiPixelHeterogeneous/PixelRecHitsDevice' )
189 )
190 
191 # PixelTracks: monitor of CPUSerial product (Alpaka backend: 'serial_sync')
192 siPixelTrackSoAMonitorSerial = siPixelPhase1MonitorTrackSoAAlpaka.clone(
193  pixelTrackSrc = cms.InputTag('pixelTracksAlpakaSerial'),
194  topFolderName = cms.string('SiPixelHeterogeneous/PixelTrackSerial')
195 )
196 
197 # PixelTracks: monitor of CPUSerial product (Alpaka backend: 'serial_sync')
198 siPixelTrackSoAMonitorDevice = siPixelPhase1MonitorTrackSoAAlpaka.clone(
199  pixelTrackSrc = cms.InputTag('pixelTracksAlpaka'),
200  topFolderName = cms.string('SiPixelHeterogeneous/PixelTrackDevice')
201 )
202 
203 # PixelVertices: monitor of CPUSerial product (Alpaka backend: 'serial_sync')
204 siPixelVertexSoAMonitorSerial = siPixelMonitorVertexSoAAlpaka.clone(
205  pixelVertexSrc = cms.InputTag("pixelVerticesAlpakaSerial"),
206  topFolderName = cms.string('SiPixelHeterogeneous/PixelVertexSerial')
207 )
208 
209 siPixelVertexSoAMonitorDevice = siPixelMonitorVertexSoAAlpaka.clone(
210  pixelVertexSrc = cms.InputTag("pixelVerticesAlpaka"),
211  topFolderName = cms.string('SiPixelHeterogeneous/PixelVertexDevice')
212 )
213 
214 # Run-3 sequence
215 monitorpixelSoACompareSource = cms.Sequence(siPixelPhase1MonitorRawDataACPU *
216  siPixelPhase1MonitorRawDataAGPU *
217  siPixelPhase1MonitorRecHitsSoACPU *
218  siPixelPhase1MonitorRecHitsSoAGPU *
219  siPixelPhase1CompareRecHitsSoA *
220  siPixelPhase1MonitorTrackSoAGPU *
221  siPixelPhase1MonitorTrackSoACPU *
222  siPixelPhase1CompareTrackSoA *
223  siPixelMonitorVertexSoACPU *
224  siPixelMonitorVertexSoAGPU *
225  siPixelCompareVertexSoA *
226  siPixelPhase1RawDataErrorComparator)
227 # and the Alpaka version
228 monitorpixelSoACompareSourceAlpaka = cms.Sequence(
229  siPixelPhase1MonitorRawDataASerial *
230  siPixelPhase1MonitorRawDataADevice *
231  siPixelPhase1CompareDigiErrorsSoAAlpaka *
232  siPixelRecHitsSoAMonitorSerial *
233  siPixelRecHitsSoAMonitorDevice *
234  siPixelPhase1CompareRecHits *
235  siPixelTrackSoAMonitorSerial *
236  siPixelTrackSoAMonitorDevice *
237  siPixelPhase1CompareTracks *
238  siPixelVertexSoAMonitorSerial *
239  siPixelVertexSoAMonitorDevice *
240  siPixelCompareVertices )
241 
242 # Phase-2 sequence
243 _monitorpixelSoACompareSource = cms.Sequence(siPixelPhase2MonitorRecHitsSoACPU *
244  siPixelPhase2MonitorRecHitsSoAGPU *
245  siPixelPhase2CompareRecHitsSoA *
246  siPixelPhase2MonitorTrackSoAGPU *
247  siPixelPhase2MonitorTrackSoACPU *
248  siPixelPhase2CompareTrackSoA *
249  siPixelMonitorVertexSoACPU *
250  siPixelMonitorVertexSoAGPU *
251  siPixelCompareVertexSoA)
252 
253 # HIon sequence
254 _monitorpixelSoACompareSourceHIonPhase1 = cms.Sequence(siPixelHIonPhase1MonitorRecHitsSoACPU *
255  siPixelHIonPhase1MonitorRecHitsSoAGPU *
256  siPixelHIonPhase1CompareRecHitsSoA *
257  siPixelHIonPhase1MonitorTrackSoAGPU *
258  siPixelHIonPhase1MonitorTrackSoACPU *
259  siPixelHIonPhase1CompareTrackSoA *
260  siPixelMonitorVertexSoACPU *
261  siPixelMonitorVertexSoAGPU *
262  siPixelCompareVertexSoA)
263 
264 phase2_tracker.toReplaceWith(monitorpixelSoACompareSource,_monitorpixelSoACompareSource)
265 
266 from Configuration.ProcessModifiers.gpuValidationPixel_cff import gpuValidationPixel
267 gpuValidationPixel.toReplaceWith(monitorpixelSoASource, monitorpixelSoACompareSource)
268 
269 from Configuration.ProcessModifiers.alpakaValidationPixel_cff import alpakaValidationPixel
270 (alpakaValidationPixel & ~gpuValidationPixel).toReplaceWith(monitorpixelSoASource, monitorpixelSoACompareSourceAlpaka)