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
17 #
18 # sequence CaloLocalReco
19 #
20 
21 def hbheCosmic(module):
22  return module.clone(
23  tsFromDB = cms.bool(False),
24  recoParamsFromDB = cms.bool(False),
25  algorithm = dict(
26  useM2 = cms.bool(False),
27  useM3 = cms.bool(False),
28  firstSampleShift = cms.int32(-1000),
29  samplesToAdd = cms.int32(10),
30  correctForPhaseContainment = cms.bool(False),
31  ),
32  sipmQTSShift = cms.int32(-100),
33  sipmQNTStoSum = cms.int32(200),
34  )
35 
36 hbhereco = hbheCosmic(_hcalLocalReco_cff.hbheprereco)
37 hfreco = _hcalLocalReco_cff._default_hfreco.clone(
38  firstSample = 0,
39  samplesToAdd = 10, ### min(10,size) in the algo
40  correctForTimeslew = False,
41  correctForPhaseContainment = False,
42  tsFromDB = False,
43  recoParamsFromDB = cms.bool(False),
44  digiTimeFromDB = False,
45 )
46 horeco = _hcalLocalReco_cff.horeco.clone(
47  firstSample = 0,
48  samplesToAdd = 10,
49  correctForTimeslew = False,
50  correctForPhaseContainment = False,
51  tsFromDB = False,
52  recoParamsFromDB = cms.bool(False),
53 )
54 zdcreco = _hcalLocalReco_cff.zdcreco.clone(
55 # firstSample = 1,
56 # samplesToAdd = 8,
57  correctForTimeslew = True,
58  correctForPhaseContainment = True,
59  correctionPhaseNS = 10.,
60 )
61 
62 # 2017 customs
63 from Configuration.Eras.Modifier_run2_HF_2017_cff import run2_HF_2017
64 
65 _phase1_hfreco = _hcalLocalReco_cff._phase1_hfreco.clone(
66  algorithm = dict(
67  Class = cms.string("HFSimpleTimeCheck"),
68  rejectAllFailures = cms.bool(False),
69  )
70 )
71 
72 
73 run2_HF_2017.toReplaceWith(hfreco, _phase1_hfreco )
74 
75 hfprereco = _hcalLocalReco_cff.hfprereco.clone(
76  sumAllTimeSlices = cms.bool(True)
77 )
78 
79 from RecoLocalCalo.HcalRecProducers.hbheplan1_cfi import hbheplan1
80 
81 # redefine hcal sequence
82 hcalLocalRecoSequence = cms.Sequence(hbhereco+hfreco+horeco+zdcreco)
83 
84 _phase1_hcalLocalRecoSequence = hcalLocalRecoSequence.copy()
85 _phase1_hcalLocalRecoSequence.insert(0,hfprereco)
86 run2_HF_2017.toReplaceWith(hcalLocalRecoSequence, _phase1_hcalLocalRecoSequence)
87 
88 # shuffle modules so "hbheplan1" produces final collection of hits named "hbhereco"
89 _plan1_hcalLocalRecoSequence = _phase1_hcalLocalRecoSequence.copy()
90 hbheprereco = hbhereco.clone()
91 _plan1_hcalLocalRecoSequence.insert(0,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(hcalLocalRecoSequence, _plan1_hcalLocalRecoSequence)
95 
96 hbhecollapse = hbheplan1.clone()
97 _collapse_hcalLocalRecoSequence = _phase1_hcalLocalRecoSequence.copy()
98 _collapse_hcalLocalRecoSequence.insert(0,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(hcalLocalRecoSequence, _collapse_hcalLocalRecoSequence)
102 
103 calolocalrecoCosmics = cms.Sequence(ecalLocalRecoSequenceCosmics+hcalLocalRecoSequence)
104 
105 #
106 # R.Ofierzynski (29.Oct.2009): add NZS sequence
107 #
109 calolocalrecoCosmicsNZS = cms.Sequence(ecalLocalRecoSequenceCosmics+hcalLocalRecoSequence+hcalLocalRecoSequenceNZS)