CMS 3D CMS Logo

RecoLocalCalo_Cosmics_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #
4 # Ecal part
5 #
8 
9 #defines a sequence ecalLocalRecoSequence
10 
11 #
12 # Hcal part
13 #
14 #HCAL reconstruction
15 import RecoLocalCalo.Configuration.hcalLocalReco_cff as _hcalLocalReco_cff
18 #
19 # sequence CaloLocalReco
20 #
21 
22 hbhereco = _hcalLocalReco_cff.hbheprereco.cpu.clone(
23  tsFromDB = False,
24  recoParamsFromDB = False,
25  algorithm = dict(
26  useMahi = False,
27  useM2 = False,
28  useM3 = False,
29  firstSampleShift = -1000,
30  samplesToAdd = 10,
31  correctForPhaseContainment = False,
32  ),
33  sipmQTSShift = -100,
34  sipmQNTStoSum = 200,
35 )
36 hfreco = _hcalLocalReco_cff._default_hfreco.clone(
37  firstSample = 0,
38  samplesToAdd = 10,
39  correctForTimeslew = False,
40  correctForPhaseContainment = False,
41  tsFromDB = False,
42  recoParamsFromDB = False,
43  digiTimeFromDB = False,
44 )
45 horeco = _hcalLocalReco_cff.horeco.clone(
46  firstSample = 0,
47  samplesToAdd = 10,
48  correctForTimeslew = False,
49  correctForPhaseContainment = False,
50  tsFromDB = False,
51  recoParamsFromDB = False,
52 )
53 zdcreco = _hcalLocalReco_cff.zdcreco.clone(
54 # firstSample = 1,
55 # samplesToAdd = 8,
56  correctForTimeslew = True,
57  correctForPhaseContainment = True,
58  correctionPhaseNS = 10.,
59 )
60 
61 # 2017 customs
62 from Configuration.Eras.Modifier_run2_HF_2017_cff import run2_HF_2017
63 
64 _phase1_hfreco = _hcalLocalReco_cff._phase1_hfreco.clone(
65  algorithm = dict(
66  Class = "HFSimpleTimeCheck",
67  rejectAllFailures = False,
68  )
69 )
70 
71 
72 run2_HF_2017.toReplaceWith(hfreco, _phase1_hfreco )
73 
74 hfprereco = _hcalLocalReco_cff.hfprereco.clone(
75  sumAllTimeSlices = True
76 )
77 
78 from RecoLocalCalo.HcalRecProducers.hbheplan1_cfi import hbheplan1
79 
80 # redefine hcal sequence
81 hcalLocalRecoTask = cms.Task(hbhereco,hfreco,horeco,zdcreco)
82 hcalLocalRecoSequence = cms.Sequence(hcalLocalRecoTask)
83 
84 _phase1_hcalLocalRecoTask = hcalLocalRecoTask.copy()
85 _phase1_hcalLocalRecoTask.add(hfprereco)
86 run2_HF_2017.toReplaceWith(hcalLocalRecoTask, _phase1_hcalLocalRecoTask)
87 
88 # shuffle modules so "hbheplan1" produces final collection of hits named "hbhereco"
89 _plan1_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
90 hbheprereco = hbhereco.clone()
91 _plan1_hcalLocalRecoTask.add(hbheprereco)
92 from Configuration.Eras.Modifier_run2_HEPlan1_2017_cff import run2_HEPlan1_2017
93 run2_HEPlan1_2017.toReplaceWith(hbhereco, hbheplan1)
94 run2_HEPlan1_2017.toReplaceWith(hcalLocalRecoTask, _plan1_hcalLocalRecoTask)
95 
96 hbhecollapse = hbheplan1.clone()
97 _collapse_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
98 _collapse_hcalLocalRecoTask.add(hbheprereco)
99 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
100 run2_HECollapse_2018.toReplaceWith(hbhereco, hbhecollapse)
101 run2_HECollapse_2018.toReplaceWith(hcalLocalRecoTask, _collapse_hcalLocalRecoTask)
102 calolocalrecoTaskCosmics = cms.Task(ecalLocalRecoTaskCosmics,hcalLocalRecoTask)
103 calolocalrecoCosmics = cms.Sequence(calolocalrecoTaskCosmics)
104 #
105 # R.Ofierzynski (29.Oct.2009): add NZS sequence
106 #
108 calolocalrecoTaskCosmicsNZS = cms.Task(ecalLocalRecoTaskCosmics,hcalLocalRecoTask,hcalLocalRecoTaskNZS)
109 calolocalrecoCosmicsNZS = cms.Sequence(calolocalrecoTaskCosmicsNZS)
110 
111 #--- for Run 3 and later
112 _run3_hcalLocalRecoTask = _phase1_hcalLocalRecoTask.copy()
113 from RecoLocalCalo.HcalRecProducers.zdcrecoRun3_cfi import zdcrecoRun3
114 _run3_hcalLocalRecoTask.remove(zdcreco)
115 _run3_hcalLocalRecoTask.add(zdcrecoRun3)
116 from Configuration.Eras.Modifier_run3_common_cff import run3_common
117 run3_common.toReplaceWith(hcalLocalRecoTask, _run3_hcalLocalRecoTask)