1 import FWCore.ParameterSet.Config
as cms
5 """Customise digi/reco geometry to use unganged ME1/a channels
7 if hasattr(process,
"CSCGeometryESModule"):
8 process.CSCGeometryESModule.useGangedStripsInME1a =
False
9 if hasattr(process,
"idealForDigiCSCGeometry"):
10 process.idealForDigiCSCGeometry.useGangedStripsInME1a =
False
15 """CSC digitizer customization
16 with bunchTimingOffsets tuned to center trigger stubs at bx6
17 when pretrigger with 3 layers and median stub timing are used
27 process.simMuonCSCDigis.strips.bunchTimingOffsets = cms.vdouble(0.0,
28 37.53, 37.66, 55.4, 48.2, 54.45, 53.78, 53.38, 54.12, 51.98, 51.28)
29 process.simMuonCSCDigis.wires.bunchTimingOffsets = cms.vdouble(0.0,
30 22.88, 22.55, 29.28, 30.0, 30.0, 30.5, 31.0, 29.5, 29.1, 29.88)
36 """ Pick up upgrade condions data directly from DB tags using ESPrefer's.
37 Might be useful when dealing with a global tag that doesn't include
38 'unganged' CSC conditions.
41 (
'CSCDBGainsRcd',
'CSCDBGains_ungangedME11A_mc'),
42 (
'CSCDBNoiseMatrixRcd',
'CSCDBNoiseMatrix_ungangedME11A_mc'),
43 (
'CSCDBCrosstalkRcd',
'CSCDBCrosstalk_ungangedME11A_mc'),
44 (
'CSCDBPedestalsRcd',
'CSCDBPedestals_ungangedME11A_mc'),
45 (
'CSCDBGasGainCorrectionRcd',
'CSCDBGasGainCorrection_ungangedME11A_mc'),
46 (
'CSCDBChipSpeedCorrectionRcd',
'CSCDBChipSpeedCorrection_ungangedME11A_mc')
50 for (classname, tag)
in myconds:
52 sourcename =
'unganged_' + classname
53 process.__setattr__(sourcename, cscConditions.clone())
54 process.__getattribute__(sourcename).toGet = cms.VPSet( cms.PSet( record = cms.string(classname), tag = cms.string(tag)) )
55 process.__getattribute__(sourcename).connect = cms.string(
'frontier://FrontierProd/CMS_COND_CSC_000')
56 process.__setattr__(
'esp_' + classname, cms.ESPrefer(
"PoolDBESSource", sourcename) )
64 """Settings for the upgrade raw vs offline condition channel translation
66 if hasattr(process,
"CSCIndexerESProducer"):
67 process.CSCIndexerESProducer.AlgoName=cms.string(
"CSCIndexerPostls1")
68 if hasattr(process,
"CSCChannelMapperESProducer"):
69 process.CSCChannelMapperESProducer.AlgoName=cms.string(
"CSCChannelMapperPostls1")
74 """Remove process.module_name from all the paths in process:
78 if not hasattr(process, module_name):
82 for path_name
in process._Process__paths.keys():
83 the_path = getattr(process, path_name)
84 module_names = the_path.moduleNames()
85 if module_name
in module_names:
86 the_path.remove(getattr(process, module_name))
91 """A sanity check to make sure that standard cmsDriver paths
92 have modules with expected names. If some paths would not have
93 expected modules, the procedure would only print WARNINGs.
97 (
'digitisation_step',
'simMuonCSCDigis'),
98 (
'L1simulation_step',
'simCscTriggerPrimitiveDigis'),
99 (
'L1simulation_step',
'simCsctfTrackDigis'),
100 (
'raw2digi_step',
'muonCSCDigis'),
101 (
'raw2digi_step',
'csctfDigis'),
102 (
'digi2raw_step',
'cscpacker'),
103 (
'digi2raw_step',
'csctfpacker'),
104 (
'reconstruction',
'csc2DRecHits'),
105 (
'dqmoffline_step',
'muonAnalyzer')
110 for path_name, module_name
in paths_modules:
111 if hasattr(process, path_name)
and not hasattr(process, module_name):
112 print "WARNING: module %s is not in %s path!!!" % (module_name, path_name)
113 print " This path has the following modules:"
114 print " ", getattr(process, path_name).moduleNames(),
"\n"
120 """Customise digi/reco geometry to use unganged ME1/a channels
127 """Customise CSC digitization to use unganged ME1/a channels
135 """Configure the local CSC trigger stubs emulator with the upgrade
136 algorithm version that efficiently uses unganged ME1a
141 from L1Trigger.CSCTriggerPrimitives.cscTriggerPrimitiveDigisPostLS1_cfi
import cscTriggerPrimitiveDigisPostLS1
142 process.simCscTriggerPrimitiveDigis = cscTriggerPrimitiveDigisPostLS1
143 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'simMuonCSCDigis',
'MuonCSCComparatorDigi')
144 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'simMuonCSCDigis',
'MuonCSCWireDigi')
150 """Regular CSCTF configuration adapted to deal with unganged ME1a
152 from L1Trigger.CSCTrackFinder.csctfTrackDigisUngangedME1a_cfi
import csctfTrackDigisUngangedME1a
153 process.simCsctfTrackDigis = csctfTrackDigisUngangedME1a
154 process.simCsctfTrackDigis.DTproducer = cms.untracked.InputTag(
"simDtTriggerPrimitiveDigis")
155 process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag(
"simCscTriggerPrimitiveDigis",
"MPCSORTED")
161 """Customise both stubs and TF emulators
169 """Use 2013 a.k.a. post-LS1 version
171 process.cscpacker.useFormatVersion = cms.uint32(2013)
172 process.cscpacker.usePreTriggers = cms.bool(
False)
173 process.cscpacker.packEverything = cms.bool(
True)
178 """Do nothing at the moment
184 """Adjust L1Extra producer's input tags for the use case
185 when we want to run L1Extra without packing-unpacking first
187 l1ep = process.l1extraParticles
192 l1ep.muonSource = cms.InputTag(
'simGmtDigis')
193 l1ep.etTotalSource = cms.InputTag(
'simGctDigis')
194 l1ep.nonIsolatedEmSource = cms.InputTag(
'simGctDigis',
'nonIsoEm')
195 l1ep.etMissSource = cms.InputTag(
'simGctDigis')
196 l1ep.forwardJetSource = cms.InputTag(
'simGctDigis',
'forJets')
197 l1ep.centralJetSource = cms.InputTag(
'simGctDigis',
'cenJets')
198 l1ep.tauJetSource = cms.InputTag(
'simGctDigis',
'tauJets')
199 l1ep.isolatedEmSource = cms.InputTag(
'simGctDigis',
'isoEm')
200 l1ep.etHadSource = cms.InputTag(
'simGctDigis')
201 l1ep.htMissSource = cms.InputTag(
"simGctDigis")
202 l1ep.hfRingEtSumsSource = cms.InputTag(
"simGctDigis")
203 l1ep.hfRingBitCountsSource = cms.InputTag(
"simGctDigis")
208 """Configure the CSC rechit producer
209 to handle unganged ME1a for upgrade studies
215 process.csc2DRecHits.readBadChannels = cms.bool(
False)
216 process.csc2DRecHits.CSCUseGasGainCorrections = cms.bool(
False)
222 """Do nothing special. May need some adjustments for unganged ME11
234 """Full set of the CSC PostLS1 related customizations.
235 It's tied to specific expected module names.
236 Therefore, a sanity check is done first to make sure that
237 standard cmsDriver paths have modules with such expected names.
247 if hasattr(process,
'simMuonCSCDigis'):
251 if hasattr(process,
'simCscTriggerPrimitiveDigis'):
255 if hasattr(process,
'simCsctfTrackDigis'):
259 if hasattr(process,
'cscpacker')
or hasattr(process,
'csctfpacker'):
263 if hasattr(process,
'muonCSCDigis')
or hasattr(process,
'csctfDigis'):
267 if hasattr(process,
'csc2DRecHits'):
271 if hasattr(process,
'cscMonitor'):
275 if hasattr(process,
'relvalMuonBits'):
def customise_csc_L1Extra_allsim
def customise_csc_Unpacker
def customise_csc_Digitizer
def customise_csc_L1Stubs_sim
def unganged_me1a_geometry
def customise_csc_Indexing
def customise_csc_LocalReco
def customise_csc_Geometry
def customise_csc_cond_ungangedME11A_mc
def customise_csc_L1TrackFinder_sim
def customise_csc_Validation
def remove_from_all_paths
def csc_PathVsModule_SanityCheck
def customise_csc_L1Emulator_sim
def customise_csc_PostLS1
def digitizer_timing_pre3_median