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 # set the label for Emulator TP Task
24 tpTask.tagEmul = "valHcalTriggerPrimitiveDigis"
25 
26 hcalOfflineSourceSequence = cms.Sequence(
27  digiTask +
28  tpTask +
29  recHitTask +
30  rawTask )
31 
32 hcalOnlyOfflineSourceSequence = cms.Sequence(
33  digiTask +
34  recHitPreRecoTask +
35  rawTask )
36 
37 hcalOnlyOfflineSourceSequenceGPU = cms.Sequence(
38  digiTask +
39  recHitTask +
40  rawTask +
41  hcalGPUComparisonTask
42 )
43 
44 from Configuration.ProcessModifiers.gpuValidationHcal_cff import gpuValidationHcal
45 gpuValidationHcal.toReplaceWith(hcalOnlyOfflineSourceSequence, hcalOnlyOfflineSourceSequenceGPU)
46 
47 from Configuration.Eras.Modifier_run2_HCAL_2018_cff import run2_HCAL_2018
48 run2_HCAL_2018.toModify(hcalGPUComparisonTask,
49  tagHBHE_ref = "hbheprereco@cpu",
50  tagHBHE_target = "hbheprereco@cuda"
51 )
52 run2_HCAL_2018.toModify(recHitTask,
53  tagHBHE = "hbheprereco"
54 )
55 
56 from Configuration.Eras.Modifier_run3_HB_cff import run3_HB
57 
58 run3_HB.toModify(hcalGPUComparisonTask,
59  tagHBHE_ref = "hbhereco@cpu",
60  tagHBHE_target = "hbhereco@cuda"
61 )
62 run3_HB.toModify(recHitTask,
63  tagHBHE = "hbhereco"
64 )
65 _phase1_hcalOnlyOfflineSourceSequence = hcalOnlyOfflineSourceSequence.copy()
66 _phase1_hcalOnlyOfflineSourceSequence.replace(recHitPreRecoTask, recHitTask)
67 run3_HB.toReplaceWith(hcalOnlyOfflineSourceSequence, _phase1_hcalOnlyOfflineSourceSequence)
68 
69 from Configuration.Eras.Modifier_phase2_hcal_cff import phase2_hcal
70 _phase2_hcalOfflineSourceSequence = hcalOfflineSourceSequence.copyAndExclude([tpTask,rawTask])
71 phase2_hcal.toReplaceWith(hcalOfflineSourceSequence, _phase2_hcalOfflineSourceSequence)
72 phase2_hcal.toModify(digiTask,
73  tagHBHE = "simHcalDigis:HBHEQIE11DigiCollection",
74  tagHO = "simHcalDigis",
75  tagHF = "simHcalDigis:HFQIE10DigiCollection"
76 )
77 
78 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
79 (premix_stage2 & phase2_hcal).toModify(digiTask,
80  tagHBHE = "DMHcalDigis:HBHEQIE11DigiCollection",
81  tagHO = "DMHcalDigis",
82  tagHF = "DMHcalDigis:HFQIE10DigiCollection"
83 )