Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate module configurations in RecoLocalMuon to use automatically generated cfi default configurations #33543

Merged
merged 10 commits into from Apr 30, 2021
9 changes: 9 additions & 0 deletions HLTrigger/Configuration/python/customizeHLTforCMSSW.py
Expand Up @@ -129,6 +129,14 @@ def customiseFor2018Input(process):

return process

def customizeFor33543(process):
""" Customize HLT menu to remove deprecated parameters for the CSCRecHitDProducer in RecoLocalMuon"""
for producer in producers_by_type(process, "CSCRecHitDProducer"):
if hasattr(producer, "CSCStripClusterSize"):
del producer.CSCStripClusterSize

return process

def customiseFor33495(process):
"""Customize HLT menu to remove deprecated parameters for pixel Generic and Template CPE's """
for producer in esproducers_by_type(process, "PixelCPEGenericESProducer"):
Expand All @@ -150,5 +158,6 @@ def customizeHLTforCMSSW(process, menuType="GRun"):
# add call to action function in proper order: newest last!
# process = customiseFor12718(process)
process = customiseFor33495(process)
process = customizeFor33543(process)

return process
56 changes: 28 additions & 28 deletions RecoLocalMuon/CSCRecHitD/python/cscRecHitD_cff.py
Expand Up @@ -8,39 +8,39 @@
# To be extracted from measurements (DB)
# The values bellow were tuned on MC (though there were MTCC ones too)
#
cscRecHitDParameters = cms.PSet(
cscRecHitDParameters = dict(
#
# a XT asymmetry model parameter
XTasymmetry_ME1a = cms.double(0.023),
XTasymmetry_ME1b = cms.double(0.01),
XTasymmetry_ME12 = cms.double(0.015),
XTasymmetry_ME13 = cms.double(0.02),
XTasymmetry_ME21 = cms.double(0.023),
XTasymmetry_ME22 = cms.double(0.023),
XTasymmetry_ME31 = cms.double(0.023),
XTasymmetry_ME32 = cms.double(0.023),
XTasymmetry_ME41 = cms.double(0.023),
XTasymmetry_ME1a = 0.023,
XTasymmetry_ME1b = 0.01,
XTasymmetry_ME12 = 0.015,
XTasymmetry_ME13 = 0.02,
XTasymmetry_ME21 = 0.023,
XTasymmetry_ME22 = 0.023,
XTasymmetry_ME31 = 0.023,
XTasymmetry_ME32 = 0.023,
XTasymmetry_ME41 = 0.023,
#
# constant systematics (in cm)
ConstSyst_ME1a = cms.double(0.01),
ConstSyst_ME1b = cms.double(0.02),
ConstSyst_ME12 = cms.double(0.02),
ConstSyst_ME13 = cms.double(0.03),
ConstSyst_ME21 = cms.double(0.03),
ConstSyst_ME22 = cms.double(0.03),
ConstSyst_ME31 = cms.double(0.03),
ConstSyst_ME32 = cms.double(0.03),
ConstSyst_ME41 = cms.double(0.03),
ConstSyst_ME1a = 0.01,
ConstSyst_ME1b = 0.02,
ConstSyst_ME12 = 0.02,
ConstSyst_ME13 = 0.03,
ConstSyst_ME21 = 0.03,
ConstSyst_ME22 = 0.03,
ConstSyst_ME31 = 0.03,
ConstSyst_ME32 = 0.03,
ConstSyst_ME41 = 0.03,
#
# 3 time bins noise (in ADC counts)
NoiseLevel_ME1a = cms.double(9.0),
NoiseLevel_ME1b = cms.double(6.0),
NoiseLevel_ME12 = cms.double(7.0),
NoiseLevel_ME13 = cms.double(4.0),
NoiseLevel_ME21 = cms.double(5.0),
NoiseLevel_ME22 = cms.double(7.0),
NoiseLevel_ME31 = cms.double(5.0),
NoiseLevel_ME32 = cms.double(7.0),
NoiseLevel_ME41 = cms.double(5.0)
NoiseLevel_ME1a = 9.0,
NoiseLevel_ME1b = 6.0,
NoiseLevel_ME12 = 7.0,
NoiseLevel_ME13 = 4.0,
NoiseLevel_ME21 = 5.0,
NoiseLevel_ME22 = 7.0,
NoiseLevel_ME31 = 5.0,
NoiseLevel_ME32 = 7.0,
NoiseLevel_ME41 = 5.0
)

71 changes: 35 additions & 36 deletions RecoLocalMuon/CSCRecHitD/python/cscRecHitD_cfi.py
Expand Up @@ -4,73 +4,72 @@

# parameters for CSC rechit building
from RecoLocalMuon.CSCRecHitD.cscRecHitD_cff import *
csc2DRecHits = cms.EDProducer("CSCRecHitDProducer",
#
# Parameters for coordinate and uncertainty calculations
# Data and MC parameters are (still) different
# Needs tuning
#
cscRecHitDParameters,
import RecoLocalMuon.CSCRecHitD.cscRecHitDProducer_cfi as _mod

csc2DRecHits = _mod.cscRecHitDProducer.clone(
#
# Parameters for strip hits
#
CSCStripPeakThreshold = cms.double(10.0),
CSCStripClusterChargeCut = cms.double(25.0),
CSCStripxtalksOffset = cms.double(0.03),
CSCStripPeakThreshold = 10.0,
CSCStripClusterChargeCut = 25.0,
CSCStripxtalksOffset = 0.03,
#
# How to find SCA peak time?
#
UseAverageTime = cms.bool(False),
UseParabolaFit = cms.bool(False),
UseFivePoleFit = cms.bool(True),
UseAverageTime = False,
UseParabolaFit = False,
UseFivePoleFit = True,
#
# Parameters for wire hits
CSCWireClusterDeltaT = cms.int32(1),
CSCWireClusterDeltaT = 1,
#
# wire time window used for reconstruction
CSCUseReducedWireTimeWindow = cms.bool(True),
CSCWireTimeWindowLow = cms.int32(5),
CSCWireTimeWindowHigh = cms.int32(11),
CSCUseReducedWireTimeWindow = True,
CSCWireTimeWindowLow = 5,
CSCWireTimeWindowHigh = 11,
#
# Calibration info:
CSCUseCalibrations = cms.bool(True),
CSCUseCalibrations = True,
# Pedestal treatment
CSCUseStaticPedestals = cms.bool(False),
CSCNoOfTimeBinsForDynamicPedestal = cms.int32(2),
CSCUseStaticPedestals = False,
CSCNoOfTimeBinsForDynamicPedestal = 2,
#
# Which digis:
#
# When using data from unpacker
wireDigiTag = cms.InputTag("muonCSCDigis","MuonCSCWireDigi"),
stripDigiTag = cms.InputTag("muonCSCDigis","MuonCSCStripDigi"),
wireDigiTag = "muonCSCDigis:MuonCSCWireDigi",
stripDigiTag = "muonCSCDigis:MuonCSCStripDigi",
# When using data from simulation
# wireDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi"),
# stripDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigi"),
# wireDigiTag = "simMuonCSCDigis:MuonCSCWireDigi",
# stripDigiTag = "simMuonCSCDigis:MuonCSCStripDigi",
#
# Use dead channels information
readBadChannels = cms.bool(True),
readBadChambers = cms.bool(True),
readBadChannels = True,
readBadChambers = True,
#
# Do we use the chip and chamber and L1A phase corrections when filling the recHit time?
#
CSCUseTimingCorrections = cms.bool(True),
CSCUseTimingCorrections = True,
#
# Do we correct the energy deposited for gas gains?
CSCUseGasGainCorrections = cms.bool(True),
CSCUseGasGainCorrections = True,
#
# Parameters which are not used currently
#
CSCDebug = cms.untracked.bool(False),
CSCDebug = False,
# To be set once wire digis have proper timing info:
CSCstripWireDeltaTime = cms.int32(8),
# to be deleted
CSCStripClusterSize = cms.untracked.int32(3)
CSCstripWireDeltaTime = 8,
#
# Parameters for coordinate and uncertainty calculations
# Data and MC parameters are (still) different
# Needs tuning
#
**cscRecHitDParameters
)

##
## Modify for running in Run 2
##
from Configuration.Eras.Modifier_run2_common_cff import run2_common
run2_common.toModify( csc2DRecHits, readBadChannels = False )
run2_common.toModify( csc2DRecHits, CSCUseGasGainCorrections = False )

run2_common.toModify( csc2DRecHits,
readBadChannels = False,
CSCUseGasGainCorrections = False )
3 changes: 1 addition & 2 deletions RecoLocalMuon/CSCRecHitD/src/CSCRecHitDProducer.cc
Expand Up @@ -92,7 +92,6 @@ void CSCRecHitDProducer::fillDescriptions(edm::ConfigurationDescriptions& descri
desc.add<bool>("CSCUseGasGainCorrections", true);
desc.addUntracked<bool>("CSCDebug", false);
desc.add<int>("CSCstripWireDeltaTime", 8);
desc.addUntracked<int>("CSCStripClusterSize", 3);

desc.add<double>("XTasymmetry_ME1a", 0.023), desc.add<double>("XTasymmetry_ME1b", 0.01),
desc.add<double>("XTasymmetry_ME12", 0.015), desc.add<double>("XTasymmetry_ME13", 0.02),
Expand All @@ -112,7 +111,7 @@ void CSCRecHitDProducer::fillDescriptions(edm::ConfigurationDescriptions& descri
desc.add<bool>("CSCUseReducedWireTimeWindow", false);
desc.add<int>("CSCWireTimeWindowLow", 0);
desc.add<int>("CSCWireTimeWindowHigh", 15);
descriptions.add("configWireTimeWindow", desc);
descriptions.add("cscRecHitDProducer", desc);
}

//define this as a plug-in
Expand Down