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