CMS 3D CMS Logo

ALCARECOHcalCalMinBias_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #------------------------------------------------
4 #AlCaReco filtering for HCAL minbias:
5 #------------------------------------------------
6 
8 
10 hcalminbiasHLT = HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
11 # HLTPaths = ['HLT_HcalPhiSym'],
12  eventSetupPathsKey='HcalCalMinBias',
13  throw = False #dont throw except on unknown path name
14 )
15 
16 
17 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
18 pp_on_AA.toModify(hcalminbiasHLT,
19  eventSetupPathsKey='HcalCalMinBiasHI'
20 )
21 
22 
23 import RecoLocalCalo.HcalRecProducers.HBHEPhase1Reconstructor_cfi
24 hbherecoMBNZS = RecoLocalCalo.HcalRecProducers.HBHEPhase1Reconstructor_cfi.hbheprereco.clone(
25  digiLabelQIE8 = cms.InputTag("hcalDigiAlCaMB"),
26  digiLabelQIE11 = cms.InputTag("hcalDigiAlCaMB"),
27 
28  dropZSmarkedPassed = cms.bool(False),
29  algorithm = dict(
30  useMahi = cms.bool(False),
31  useM2 = cms.bool(False),
32  useM3 = cms.bool(False)
33  ),
34  processQIE11 = cms.bool(False),
35  setNegativeFlagsQIE8 = cms.bool(False),
36  setNegativeFlagsQIE11 = cms.bool(False),
37  setNoiseFlagsQIE8 = cms.bool(True),
38  setNoiseFlagsQIE11 = cms.bool(False),
39  setPulseShapeFlagsQIE8 = cms.bool(False),
40  setPulseShapeFlagsQIE11 = cms.bool(False),
41  setLegacyFlagsQIE8 = cms.bool(False),
42  setLegacyFlagsQIE11 = cms.bool(False),
43 )
44 
45 hbherecoMBNZS.algorithm.firstSampleShift = 0 # explicitly repeating the default
46 
47 import RecoLocalCalo.HcalRecProducers.hosimplereco_cfi
48 horecoMBNZS = RecoLocalCalo.HcalRecProducers.hosimplereco_cfi.hosimplereco.clone()
49 
50 horecoMBNZS.firstSample = 4
51 horecoMBNZS.samplesToAdd = 4
52 horecoMBNZS.digiLabel = 'hcalDigiAlCaMB'
53 horecoMBNZS.tsFromDB = cms.bool(False)
54 horecoMBNZS.dropZSmarkedPassed = cms.bool(False)
55 
56 import RecoLocalCalo.HcalRecProducers.hfsimplereco_cfi
57 hfrecoMBNZS = RecoLocalCalo.HcalRecProducers.hfsimplereco_cfi.hfsimplereco.clone()
58 
59 hfrecoMBNZS.firstSample = 2 # Run 2 default before 2017
60 hfrecoMBNZS.samplesToAdd = 2
61 hfrecoMBNZS.digiLabel = 'hcalDigiAlCaMB'
62 hfrecoMBNZS.tsFromDB = cms.bool(False)
63 hfrecoMBNZS.dropZSmarkedPassed = cms.bool(False)
64 
65 seqALCARECOHcalCalMinBiasDigi = cms.Sequence(hcalminbiasHLT*hcalDigiAlCaMB*gtDigisAlCaMB)
66 seqALCARECOHcalCalMinBiasDigiNoHLT = cms.Sequence(hcalDigiAlCaMB*gtDigisAlCaMB)
67 
68 seqALCARECOHcalCalMinBias = cms.Sequence(hbherecoMBNZS*horecoMBNZS*hbherecoNoise*hfrecoNoise*hfrecoMBNZS*horecoNoise)
69 
70 #Specify to use HI output for the pp_on_AA eras
71 seqALCARECOHcalCalMinBiasHI = cms.Sequence(hbherecoNoise*hfrecoNoise*hfrecoMBNZS*horecoNoise)
72 pp_on_AA.toReplaceWith(seqALCARECOHcalCalMinBias,
73  seqALCARECOHcalCalMinBiasHI
74  )
75 
76 import RecoLocalCalo.HcalRecProducers.hfprereco_cfi
77 hfprerecoNoise = RecoLocalCalo.HcalRecProducers.hfprereco_cfi.hfprereco.clone(
78  digiLabel = cms.InputTag("hcalDigiAlCaMB"),
79  dropZSmarkedPassed = cms.bool(False),
80  tsFromDB = cms.bool(False),
81  sumAllTimeSlices = cms.bool(False),
82  forceSOI = cms.int32(0)
83 )
84 hfprerecoMBNZS = RecoLocalCalo.HcalRecProducers.hfprereco_cfi.hfprereco.clone(
85  digiLabel = cms.InputTag("hcalDigiAlCaMB"),
86  dropZSmarkedPassed = cms.bool(False),
87  tsFromDB = cms.bool(False),
88  sumAllTimeSlices = cms.bool(True),
89  forceSOI = cms.int32(1)
90 )
91 
92 import RecoLocalCalo.HcalRecProducers.HFPhase1Reconstructor_cfi
93 _phase1_hfrecoNoise = RecoLocalCalo.HcalRecProducers.HFPhase1Reconstructor_cfi.hfreco.clone(
94  inputLabel = cms.InputTag("hfprerecoNoise"),
95  setNoiseFlags = cms.bool(False),
96  algorithm = dict(
97  Class = cms.string("HFSimpleTimeCheck"),
98  rejectAllFailures = cms.bool(False)
99  ),
100 )
101 _phase1_hfrecoMBNZS = RecoLocalCalo.HcalRecProducers.HFPhase1Reconstructor_cfi.hfreco.clone(
102  inputLabel = cms.InputTag("hfprerecoMBNZS"),
103  setNoiseFlags = cms.bool(False),
104  algorithm = dict(
105  Class = cms.string("HFSimpleTimeCheck"),
106  rejectAllFailures = cms.bool(False)
107  ),
108 )
109 
110 _phase1_seqALCARECOHcalCalMinBias = seqALCARECOHcalCalMinBias.copy()
111 _phase1_seqALCARECOHcalCalMinBias.insert(0,hfprerecoMBNZS)
112 _phase1_seqALCARECOHcalCalMinBias.insert(0,hfprerecoNoise)
113 
114 from Configuration.Eras.Modifier_run2_HF_2017_cff import run2_HF_2017
115 run2_HF_2017.toReplaceWith( seqALCARECOHcalCalMinBias, _phase1_seqALCARECOHcalCalMinBias )
116 run2_HF_2017.toReplaceWith( hfrecoNoise, _phase1_hfrecoNoise )
117 run2_HF_2017.toReplaceWith( hfrecoMBNZS, _phase1_hfrecoMBNZS )
118 
119 import RecoLocalCalo.HcalRecProducers.hbheplan1_cfi
120 hbheplan1MBNZS = RecoLocalCalo.HcalRecProducers.hbheplan1_cfi.hbheplan1.clone(
121  hbheInput = cms.InputTag("hbheprerecoMBNZS")
122 )
123 hbheplan1Noise = RecoLocalCalo.HcalRecProducers.hbheplan1_cfi.hbheplan1.clone(
124  hbheInput = cms.InputTag("hbheprerecoNoise")
125 )
126 
127 from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
128 run2_HCAL_2017.toModify( hbherecoMBNZS,
129  processQIE11 = cms.bool(True),
130 # temporarily disabled until RecoLocalCalo/HcalRecProducers/python/HBHEPhase1Reconstructor_cfi.py:flagParametersQIE11 is filled
131 # setNoiseFlagsQIE11 = cms.bool(True),
132 )
133 run2_HCAL_2017.toModify( hbherecoNoise,
134  processQIE11 = cms.bool(True),
135 # temporarily disabled until RecoLocalCalo/HcalRecProducers/python/HBHEPhase1Reconstructor_cfi.py:flagParametersQIE11 is filled
136 # setNoiseFlagsQIE11 = cms.bool(True),
137 )
138 
139 _plan1_seqALCARECOHcalCalMinBias = _phase1_seqALCARECOHcalCalMinBias.copy()
140 hbheprerecoMBNZS = hbherecoMBNZS.clone()
141 hbheprerecoNoise = hbherecoNoise.clone()
142 _plan1_seqALCARECOHcalCalMinBias.insert(0,hbheprerecoNoise)
143 _plan1_seqALCARECOHcalCalMinBias.insert(0,hbheprerecoMBNZS)
144 from Configuration.Eras.Modifier_run2_HEPlan1_2017_cff import run2_HEPlan1_2017
145 run2_HEPlan1_2017.toReplaceWith(hbherecoMBNZS, hbheplan1MBNZS)
146 run2_HEPlan1_2017.toReplaceWith(hbherecoNoise, hbheplan1Noise)
147 run2_HEPlan1_2017.toReplaceWith(seqALCARECOHcalCalMinBias, _plan1_seqALCARECOHcalCalMinBias)