CMS 3D CMS Logo

OfflineSourceSequence_pp.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #-----------------
4 # HCAL DQM Offline Source Sequence Definition for pp
5 # To be used for Offline DQM importing
6 #-----------------
7 
8 # import the tasks
9 from DQM.HcalTasks.DigiTask_cfi import digiTask
10 from DQM.HcalTasks.RawTask_cfi import rawTask
11 from DQM.HcalTasks.TPTask_cfi import tpTask
12 from DQM.HcalTasks.RecHitTask_cfi import recHitTask, recHitPreRecoTask
13 from DQM.HcalTasks.hcalGPUComparisonTask_cfi import hcalGPUComparisonTask
14 
15 # set processing type to Offine
16 digiTask.ptype = 1
17 tpTask.ptype = 1
18 recHitTask.ptype = 1
19 rawTask.ptype = 1
20 recHitPreRecoTask.ptype = 1
21 hcalGPUComparisonTask.ptype = 1
22 
23 hcalAlpakaComparisonTask = hcalGPUComparisonTask.clone()
24 
25 # set the label for Emulator TP Task
26 tpTask.tagEmul = "valHcalTriggerPrimitiveDigis"
27 
28 hcalOfflineSourceSequence = cms.Sequence(
29  digiTask +
30  tpTask +
31  recHitTask +
32  rawTask )
33 
34 hcalOnlyOfflineSourceSequence = cms.Sequence(
35  digiTask +
36  recHitPreRecoTask +
37  rawTask )
38 
39 hcalOnlyOfflineSourceSequenceGPU = cms.Sequence(
40  digiTask +
41  recHitTask +
42  rawTask +
43  hcalGPUComparisonTask
44 )
45 hcalOnlyOfflineSourceSequenceAlpaka = cms.Sequence(
46  digiTask +
47  recHitTask +
48  rawTask +
49  hcalAlpakaComparisonTask
50 )
51 
52 
53 from Configuration.ProcessModifiers.gpuValidationHcal_cff import gpuValidationHcal
54 gpuValidationHcal.toReplaceWith(hcalOnlyOfflineSourceSequence, hcalOnlyOfflineSourceSequenceGPU)
55 
56 from Configuration.Eras.Modifier_run2_HCAL_2018_cff import run2_HCAL_2018
57 run2_HCAL_2018.toModify(hcalGPUComparisonTask,
58  tagHBHE_ref = "hbheprereco@cpu",
59  tagHBHE_target = "hbheprereco@cuda"
60 )
61 run2_HCAL_2018.toModify(recHitTask,
62  tagHBHE = "hbheprereco"
63 )
64 
65 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
67 
68 run3_HB.toModify(hcalGPUComparisonTask,
69  tagHBHE_ref = "hbhereco@cpu",
70  tagHBHE_target = "hbhereco@cuda"
71 )
72 run3_HB.toModify(recHitTask,
73  tagHBHE = "hbhereco"
74 )
75 (alpaka & run3_HB).toModify(hcalGPUComparisonTask,
76  tagHBHE_ref = "hbherecoSerial",
77  tagHBHE_target = "hbhereco"
78 )
79 run3_HB.toModify(hcalAlpakaComparisonTask,
80  tagHBHE_ref = "hbherecoLegacy",
81  tagHBHE_target = "hbhereco"
82 )
83 
84 _phase1_hcalOnlyOfflineSourceSequence = hcalOnlyOfflineSourceSequence.copy()
85 _phase1_hcalOnlyOfflineSourceSequence.replace(recHitPreRecoTask, recHitTask)
86 run3_HB.toReplaceWith(hcalOnlyOfflineSourceSequence, _phase1_hcalOnlyOfflineSourceSequence)
87 
88 from Configuration.Eras.Modifier_phase2_hcal_cff import phase2_hcal
89 _phase2_hcalOfflineSourceSequence = hcalOfflineSourceSequence.copyAndExclude([tpTask,rawTask])
90 phase2_hcal.toReplaceWith(hcalOfflineSourceSequence, _phase2_hcalOfflineSourceSequence)
91 phase2_hcal.toModify(digiTask,
92  tagHBHE = "simHcalDigis:HBHEQIE11DigiCollection",
93  tagHO = "simHcalDigis",
94  tagHF = "simHcalDigis:HFQIE10DigiCollection"
95 )
96 
97 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
98 (premix_stage2 & phase2_hcal).toModify(digiTask,
99  tagHBHE = "DMHcalDigis:HBHEQIE11DigiCollection",
100  tagHO = "DMHcalDigis",
101  tagHF = "DMHcalDigis:HFQIE10DigiCollection"
102 )