Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:48:04

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #------------------------------------------------
0004 #AlCaReco filtering for HCAL minbias:
0005 #------------------------------------------------
0006 
0007 from Calibration.HcalAlCaRecoProducers.ALCARECOHcalCalMinBiasNoise_cff import *
0008 
0009 import HLTrigger.HLTfilters.hltHighLevel_cfi
0010 hcalminbiasHLT =  HLTrigger.HLTfilters.hltHighLevel_cfi.hltHighLevel.clone(
0011 #    HLTPaths = ['HLT_HcalPhiSym'],
0012     eventSetupPathsKey='HcalCalMinBias',
0013     throw = False #dont throw except on unknown path name 
0014 )
0015 
0016 ## customizations for the pp_on_AA eras
0017 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0018 pp_on_AA.toModify(hcalminbiasHLT,
0019                   eventSetupPathsKey='HcalCalMinBiasHI'
0020 )
0021 
0022 
0023 import RecoLocalCalo.HcalRecProducers.HBHEPhase1Reconstructor_cfi
0024 hbherecoMBNZS = RecoLocalCalo.HcalRecProducers.HBHEPhase1Reconstructor_cfi.hbheprereco.clone(
0025     digiLabelQIE8  = cms.InputTag("hcalDigiAlCaMB"),
0026     digiLabelQIE11 = cms.InputTag("hcalDigiAlCaMB"),
0027 ###    tsFromDB = cms.bool(False),
0028     dropZSmarkedPassed = cms.bool(False),
0029     algorithm = dict(
0030         useMahi = cms.bool(False),
0031         useM2 = cms.bool(False),
0032         useM3 = cms.bool(False)
0033     ),
0034     processQIE11 = cms.bool(False),
0035     setNegativeFlagsQIE8 = cms.bool(False),
0036     setNegativeFlagsQIE11 = cms.bool(False),
0037     setNoiseFlagsQIE8 = cms.bool(True),
0038     setNoiseFlagsQIE11 = cms.bool(False),
0039     setPulseShapeFlagsQIE8 = cms.bool(False),
0040     setPulseShapeFlagsQIE11 = cms.bool(False),
0041     setLegacyFlagsQIE8 = cms.bool(False),
0042     setLegacyFlagsQIE11 = cms.bool(False),
0043 )
0044 
0045 hbherecoMBNZS.algorithm.firstSampleShift = 0 # explicitly repeating the default
0046 
0047 import RecoLocalCalo.HcalRecProducers.hosimplereco_cfi
0048 horecoMBNZS = RecoLocalCalo.HcalRecProducers.hosimplereco_cfi.hosimplereco.clone()
0049 
0050 horecoMBNZS.firstSample = 4
0051 horecoMBNZS.samplesToAdd = 4
0052 horecoMBNZS.digiLabel = 'hcalDigiAlCaMB'
0053 horecoMBNZS.tsFromDB = cms.bool(False)
0054 horecoMBNZS.dropZSmarkedPassed = cms.bool(False)
0055 
0056 import RecoLocalCalo.HcalRecProducers.hfsimplereco_cfi
0057 hfrecoMBNZS = RecoLocalCalo.HcalRecProducers.hfsimplereco_cfi.hfsimplereco.clone()
0058 
0059 hfrecoMBNZS.firstSample = 2   # Run 2 default before 2017
0060 hfrecoMBNZS.samplesToAdd = 2
0061 hfrecoMBNZS.digiLabel = 'hcalDigiAlCaMB'
0062 hfrecoMBNZS.tsFromDB = cms.bool(False)
0063 hfrecoMBNZS.dropZSmarkedPassed = cms.bool(False)
0064 
0065 seqALCARECOHcalCalMinBiasDigi = cms.Sequence(hcalminbiasHLT*hcalDigiAlCaMB*gtDigisAlCaMB)
0066 seqALCARECOHcalCalMinBiasDigiNoHLT = cms.Sequence(hcalDigiAlCaMB*gtDigisAlCaMB)
0067 
0068 seqALCARECOHcalCalMinBias = cms.Sequence(hbherecoMBNZS*horecoMBNZS*hbherecoNoise*hfrecoNoise*hfrecoMBNZS*horecoNoise)
0069 
0070 #Specify to use HI output for the pp_on_AA eras
0071 seqALCARECOHcalCalMinBiasHI = cms.Sequence(hbherecoNoise*hfrecoNoise*hfrecoMBNZS*horecoNoise)
0072 pp_on_AA.toReplaceWith(seqALCARECOHcalCalMinBias,
0073                        seqALCARECOHcalCalMinBiasHI
0074                    )
0075 
0076 import RecoLocalCalo.HcalRecProducers.hfprereco_cfi
0077 hfprerecoNoise = RecoLocalCalo.HcalRecProducers.hfprereco_cfi.hfprereco.clone(
0078     digiLabel = cms.InputTag("hcalDigiAlCaMB"),
0079     dropZSmarkedPassed = cms.bool(False),
0080     tsFromDB = cms.bool(False),
0081     sumAllTimeSlices = cms.bool(False),
0082     forceSOI = cms.int32(0)
0083 )
0084 hfprerecoMBNZS = RecoLocalCalo.HcalRecProducers.hfprereco_cfi.hfprereco.clone(
0085     digiLabel = cms.InputTag("hcalDigiAlCaMB"),
0086     dropZSmarkedPassed = cms.bool(False),
0087     tsFromDB = cms.bool(False),
0088     sumAllTimeSlices = cms.bool(True),
0089     forceSOI = cms.int32(1)
0090 )
0091 
0092 import RecoLocalCalo.HcalRecProducers.HFPhase1Reconstructor_cfi
0093 _phase1_hfrecoNoise = RecoLocalCalo.HcalRecProducers.HFPhase1Reconstructor_cfi.hfreco.clone(
0094     inputLabel = cms.InputTag("hfprerecoNoise"),
0095     setNoiseFlags = cms.bool(False),
0096     algorithm = dict(
0097         Class = cms.string("HFSimpleTimeCheck"),
0098         rejectAllFailures = cms.bool(False)
0099     ),
0100 )
0101 _phase1_hfrecoMBNZS = RecoLocalCalo.HcalRecProducers.HFPhase1Reconstructor_cfi.hfreco.clone(
0102     inputLabel = cms.InputTag("hfprerecoMBNZS"),
0103     setNoiseFlags = cms.bool(False),
0104     algorithm = dict(
0105         Class = cms.string("HFSimpleTimeCheck"),
0106         rejectAllFailures = cms.bool(False)
0107     ),
0108 )
0109 
0110 _phase1_seqALCARECOHcalCalMinBias = seqALCARECOHcalCalMinBias.copy()
0111 _phase1_seqALCARECOHcalCalMinBias.insert(0,hfprerecoMBNZS)
0112 _phase1_seqALCARECOHcalCalMinBias.insert(0,hfprerecoNoise)
0113 
0114 from Configuration.Eras.Modifier_run2_HF_2017_cff import run2_HF_2017
0115 run2_HF_2017.toReplaceWith( seqALCARECOHcalCalMinBias, _phase1_seqALCARECOHcalCalMinBias )
0116 run2_HF_2017.toReplaceWith( hfrecoNoise, _phase1_hfrecoNoise )
0117 run2_HF_2017.toReplaceWith( hfrecoMBNZS, _phase1_hfrecoMBNZS )
0118 
0119 import RecoLocalCalo.HcalRecProducers.hbheplan1_cfi
0120 hbheplan1MBNZS = RecoLocalCalo.HcalRecProducers.hbheplan1_cfi.hbheplan1.clone(
0121     hbheInput = cms.InputTag("hbheprerecoMBNZS")
0122 )
0123 hbheplan1Noise = RecoLocalCalo.HcalRecProducers.hbheplan1_cfi.hbheplan1.clone(
0124     hbheInput = cms.InputTag("hbheprerecoNoise")
0125 )
0126 
0127 from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
0128 run2_HCAL_2017.toModify( hbherecoMBNZS,
0129     processQIE11 = cms.bool(True),
0130 # temporarily disabled until RecoLocalCalo/HcalRecProducers/python/HBHEPhase1Reconstructor_cfi.py:flagParametersQIE11 is filled
0131 #    setNoiseFlagsQIE11 = cms.bool(True),
0132 )
0133 run2_HCAL_2017.toModify( hbherecoNoise,
0134     processQIE11 = cms.bool(True),
0135 # temporarily disabled until RecoLocalCalo/HcalRecProducers/python/HBHEPhase1Reconstructor_cfi.py:flagParametersQIE11 is filled
0136 #    setNoiseFlagsQIE11 = cms.bool(True),
0137 )
0138 
0139 _plan1_seqALCARECOHcalCalMinBias = _phase1_seqALCARECOHcalCalMinBias.copy()
0140 hbheprerecoMBNZS = hbherecoMBNZS.clone()
0141 hbheprerecoNoise = hbherecoNoise.clone()
0142 _plan1_seqALCARECOHcalCalMinBias.insert(0,hbheprerecoNoise)
0143 _plan1_seqALCARECOHcalCalMinBias.insert(0,hbheprerecoMBNZS)
0144 from Configuration.Eras.Modifier_run2_HEPlan1_2017_cff import run2_HEPlan1_2017
0145 run2_HEPlan1_2017.toReplaceWith(hbherecoMBNZS, hbheplan1MBNZS)
0146 run2_HEPlan1_2017.toReplaceWith(hbherecoNoise, hbheplan1Noise)
0147 run2_HEPlan1_2017.toReplaceWith(seqALCARECOHcalCalMinBias, _plan1_seqALCARECOHcalCalMinBias)