![]() |
![]() |
def muonCustoms::csc_PathVsModule_SanityCheck | ( | process | ) |
A sanity check to make sure that standard cmsDriver paths have modules with expected names. If some paths would not have expected modules, the procedure would only print WARNINGs.
Definition at line 86 of file muonCustoms.py.
00087 : 00088 """A sanity check to make sure that standard cmsDriver paths 00089 have modules with expected names. If some paths would not have 00090 expected modules, the procedure would only print WARNINGs. 00091 """ 00092 # list of (pathName, expected moduleName) tuples: 00093 paths_modules = [ 00094 ('digitisation_step', 'simMuonCSCDigis'), 00095 ('L1simulation_step', 'simCscTriggerPrimitiveDigis'), 00096 ('L1simulation_step', 'simCsctfTrackDigis'), 00097 ('raw2digi_step', 'muonCSCDigis'), 00098 ('raw2digi_step', 'csctfDigis'), 00099 ('digi2raw_step', 'cscpacker'), 00100 ('digi2raw_step', 'csctfpacker'), 00101 ('reconstruction', 'csc2DRecHits'), 00102 ('dqmoffline_step', 'muonAnalyzer'), 00103 #('dqmHarvesting', ''), 00104 ('validation_step', 'relvalMuonBits') 00105 ] 00106 # verify: 00107 for path_name, module_name in paths_modules: 00108 if hasattr(process, path_name) and not hasattr(process, module_name): 00109 print "WARNING: module %s is not in %s path!!!" % (module_name, path_name) 00110 print " This path has the following modules:" 00111 print " ", getattr(process, path_name).moduleNames(),"\n" 00112 00113 00114 # ------------------------------------------------------------------
def muonCustoms::customise_csc_cond_ungangedME11A_mc | ( | process | ) |
Pick up upgrade condions data directly from DB tags using ESPrefer's. Might be useful when dealing with a global tag that doesn't include 'unganged' CSC conditions.
Definition at line 33 of file muonCustoms.py.
00034 : 00035 """ Pick up upgrade condions data directly from DB tags using ESPrefer's. 00036 Might be useful when dealing with a global tag that doesn't include 00037 'unganged' CSC conditions. 00038 """ 00039 myconds = [ 00040 ('CSCDBGainsRcd', 'CSCDBGains_ungangedME11A_mc'), 00041 ('CSCDBNoiseMatrixRcd', 'CSCDBNoiseMatrix_ungangedME11A_mc'), 00042 ('CSCDBCrosstalkRcd', 'CSCDBCrosstalk_ungangedME11A_mc'), 00043 ('CSCDBPedestalsRcd', 'CSCDBPedestals_ungangedME11A_mc'), 00044 ('CSCDBGasGainCorrectionRcd', 'CSCDBGasGainCorrection_ungangedME11A_mc'), 00045 ('CSCDBChipSpeedCorrectionRcd', 'CSCDBChipSpeedCorrection_ungangedME11A_mc') 00046 ] 00047 00048 from CalibMuon.Configuration.getCSCConditions_frontier_cff import cscConditions 00049 for (classname, tag) in myconds: 00050 print classname, tag 00051 sourcename = 'unganged_' + classname 00052 process.__setattr__(sourcename, cscConditions.clone()) 00053 process.__getattribute__(sourcename).toGet = cms.VPSet( cms.PSet( record = cms.string(classname), tag = cms.string(tag)) ) 00054 process.__getattribute__(sourcename).connect = cms.string('frontier://FrontierProd/CMS_COND_CSC_000') 00055 process.__setattr__('esp_' + classname, cms.ESPrefer("PoolDBESSource", sourcename) ) 00056 00057 del cscConditions 00058 00059 return process 00060
def muonCustoms::customise_csc_Digitizer | ( | process | ) |
Customise CSC digitization to use unganged ME1/a channels
Definition at line 122 of file muonCustoms.py.
def muonCustoms::customise_csc_DQM | ( | process | ) |
At this point: get rid of process.muonAnalyzer, adjust cscMonitor's input
Definition at line 223 of file muonCustoms.py.
00224 : 00225 """At this point: get rid of process.muonAnalyzer, adjust cscMonitor's input 00226 """ 00227 process = remove_from_all_paths(process, 'muonAnalyzer') 00228 00229 process.cscMonitor.clctDigiTag = cms.InputTag("simCscTriggerPrimitiveDigis") 00230 process.cscMonitor.stripDigiTag = cms.InputTag("simMuonCSCDigis", "MuonCSCStripDigi") 00231 process.cscMonitor.wireDigiTag = cms.InputTag("simMuonCSCDigis", "MuonCSCWireDigi") 00232 process.cscMonitor.alctDigiTag = cms.InputTag("simCscTriggerPrimitiveDigis") 00233 00234 return process 00235
def muonCustoms::customise_csc_Geometry | ( | process | ) |
Customise digi/reco geometry to use unganged ME1/a channels
Definition at line 115 of file muonCustoms.py.
def muonCustoms::customise_csc_Indexing | ( | process | ) |
Settings for the upgrade raw vs offline condition channel translation
Definition at line 61 of file muonCustoms.py.
def muonCustoms::customise_csc_L1Emulator | ( | process | ) |
Customise both stubs and TF emulators
Definition at line 157 of file muonCustoms.py.
def muonCustoms::customise_csc_L1Extra_allsim | ( | process | ) |
Adjust L1Extra producer's input tags for the use case when we want to run L1Extra without packing-unpacking first
Definition at line 181 of file muonCustoms.py.
00182 : 00183 """Adjust L1Extra producer's input tags for the use case 00184 when we want to run L1Extra without packing-unpacking first 00185 """ 00186 l1ep = process.l1extraParticles 00187 #l1ep.centralBxOnly = cms.bool(True) 00188 #l1ep.produceMuonParticles = cms.bool(True) 00189 #l1ep.produceCaloParticles = cms.bool(False) 00190 #l1ep.ignoreHtMiss = cms.bool(False) 00191 l1ep.muonSource = cms.InputTag('simGmtDigis') 00192 l1ep.etTotalSource = cms.InputTag('simGctDigis') 00193 l1ep.nonIsolatedEmSource = cms.InputTag('simGctDigis', 'nonIsoEm') 00194 l1ep.etMissSource = cms.InputTag('simGctDigis') 00195 l1ep.forwardJetSource = cms.InputTag('simGctDigis', 'forJets') 00196 l1ep.centralJetSource = cms.InputTag('simGctDigis', 'cenJets') 00197 l1ep.tauJetSource = cms.InputTag('simGctDigis', 'tauJets') 00198 l1ep.isolatedEmSource = cms.InputTag('simGctDigis', 'isoEm') 00199 l1ep.etHadSource = cms.InputTag('simGctDigis') 00200 l1ep.htMissSource = cms.InputTag("simGctDigis") 00201 l1ep.hfRingEtSumsSource = cms.InputTag("simGctDigis") 00202 l1ep.hfRingBitCountsSource = cms.InputTag("simGctDigis") 00203 return process 00204
def muonCustoms::customise_csc_L1Stubs | ( | process | ) |
Configure the local CSC trigger stubs emulator with the upgrade algorithm version that efficiently uses unganged ME1a
Definition at line 130 of file muonCustoms.py.
00131 : 00132 """Configure the local CSC trigger stubs emulator with the upgrade 00133 algorithm version that efficiently uses unganged ME1a 00134 """ 00135 00136 process = customise_csc_Indexing(process) 00137 00138 from L1Trigger.CSCTriggerPrimitives.cscTriggerPrimitiveDigisPostLS1_cfi import cscTriggerPrimitiveDigisPostLS1 00139 process.simCscTriggerPrimitiveDigis = cscTriggerPrimitiveDigisPostLS1 00140 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag( 'simMuonCSCDigis', 'MuonCSCComparatorDigi') 00141 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag( 'simMuonCSCDigis', 'MuonCSCWireDigi') 00142 00143 return process 00144
def muonCustoms::customise_csc_L1TrackFinder | ( | process | ) |
Regular CSCTF configuration adapted to deal with unganged ME1a
Definition at line 145 of file muonCustoms.py.
00146 : 00147 """Regular CSCTF configuration adapted to deal with unganged ME1a 00148 """ 00149 00150 from L1Trigger.CSCTrackFinder.csctfTrackDigisUngangedME1a_cfi import csctfTrackDigisUngangedME1a 00151 process.simCsctfTrackDigis = csctfTrackDigisUngangedME1a 00152 process.simCsctfTrackDigis.DTproducer = cms.untracked.InputTag("simDtTriggerPrimitiveDigis") 00153 process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag("simCscTriggerPrimitiveDigis", "MPCSORTED") 00154 00155 return process 00156
def muonCustoms::customise_csc_LocalReco | ( | process | ) |
Configure the CSC rechit producer to handle unganged ME1a for upgrade studies
Definition at line 205 of file muonCustoms.py.
00206 : 00207 """Configure the CSC rechit producer 00208 to handle unganged ME1a for upgrade studies 00209 """ 00210 # 00211 process = customise_csc_Indexing(process) 00212 00213 # Turn off some flags for CSCRecHitD that are turned ON in default config 00214 process.csc2DRecHits.readBadChannels = cms.bool(False) 00215 process.csc2DRecHits.CSCUseGasGainCorrection = cms.bool(False) 00216 00217 # Switch input for CSCRecHitD to s i m u l a t e d digis 00218 process.csc2DRecHits.wireDigiTag = cms.InputTag("simMuonCSCDigis", "MuonCSCWireDigi") 00219 process.csc2DRecHits.stripDigiTag = cms.InputTag("simMuonCSCDigis", "MuonCSCStripDigi") 00220 00221 return process 00222
def muonCustoms::customise_csc_Packer | ( | process | ) |
Get rid of process.cscpacker and process.csctfpacker in all the paths
Definition at line 165 of file muonCustoms.py.
def muonCustoms::customise_csc_PostLS1 | ( | process | ) |
Full set of the CSC PostLS1 related customizations. It's tied to specific expected module names. Therefore, a sanity check is done first to make sure that standard cmsDriver paths have modules with such expected names.
Definition at line 243 of file muonCustoms.py.
00244 : 00245 """Full set of the CSC PostLS1 related customizations. 00246 It's tied to specific expected module names. 00247 Therefore, a sanity check is done first to make sure that 00248 standard cmsDriver paths have modules with such expected names. 00249 """ 00250 00251 # a simple sanity check first 00252 csc_PathVsModule_SanityCheck(process) 00253 00254 # use unganged geometry 00255 process = customise_csc_Geometry(process) 00256 00257 # digitizer 00258 if hasattr(process, 'simMuonCSCDigis'): 00259 process = customise_csc_Digitizer(process) 00260 00261 # L1 stub emulator upgrade algorithm 00262 if hasattr(process, 'simCscTriggerPrimitiveDigis'): 00263 process = customise_csc_L1Stubs(process) 00264 00265 # CSCTF that can deal with unganged ME1a 00266 if hasattr(process, 'simCsctfTrackDigis'): 00267 process = customise_csc_L1TrackFinder(process) 00268 00269 # packer - simply get rid of it 00270 if hasattr(process, 'cscpacker') or hasattr(process, 'csctfpacker'): 00271 process = customise_csc_Packer(process) 00272 00273 # unpacker - simply get rid of it 00274 if hasattr(process, 'muonCSCDigis') or hasattr(process, 'csctfDigis'): 00275 process = customise_csc_Unpacker(process) 00276 00277 # CSC RecHiti producer adjustments 00278 if hasattr(process, 'csc2DRecHits'): 00279 process = customise_csc_LocalReco(process) 00280 00281 # DQM 00282 if hasattr(process, 'cscMonitor'): 00283 process = customise_csc_DQM(process) 00284 00285 # Validation 00286 if hasattr(process, 'relvalMuonBits'): 00287 process = customise_csc_Validation(process) 00288 00289 return process 00290
def muonCustoms::customise_csc_Unpacker | ( | process | ) |
Get rid of process.muonCSCDigis and process.csctfDigis in all the paths
Definition at line 173 of file muonCustoms.py.
def muonCustoms::customise_csc_Validation | ( | process | ) |
At this point, just get rid of process.relvalMuonBits
Definition at line 236 of file muonCustoms.py.
def muonCustoms::digitizer_timing_pre3_median | ( | process | ) |
CSC digitizer customization with bunchTimingOffsets tuned to center trigger stubs at bx6 when pretrigger with 3 layers and median stub timing are used
Definition at line 12 of file muonCustoms.py.
00013 : 00014 """CSC digitizer customization 00015 with bunchTimingOffsets tuned to center trigger stubs at bx6 00016 when pretrigger with 3 layers and median stub timing are used 00017 """ 00018 ## Make sure there's no bad chambers/channels 00019 #process.simMuonCSCDigis.strips.readBadChambers = True 00020 #process.simMuonCSCDigis.wires.readBadChannels = True 00021 #process.simMuonCSCDigis.digitizeBadChambers = True 00022 00023 ## Customised timing offsets so that ALCTs and CLCTs times are centered in signal BX. 00024 ## These offsets below were tuned for the case of 3 layer pretriggering 00025 ## and median stub timing algorithm. 00026 process.simMuonCSCDigis.strips.bunchTimingOffsets = cms.vdouble(0.0, 00027 37.53, 37.66, 55.4, 48.2, 54.45, 53.78, 53.38, 54.12, 51.98, 51.28) 00028 process.simMuonCSCDigis.wires.bunchTimingOffsets = cms.vdouble(0.0, 00029 22.88, 22.55, 29.28, 30.0, 30.0, 30.5, 31.0, 29.5, 29.1, 29.88) 00030 00031 return process 00032
def muonCustoms::remove_from_all_paths | ( | process, | |
module_name | |||
) |
Remove process.module_name from all the paths in process:
Definition at line 69 of file muonCustoms.py.
00070 : 00071 """Remove process.module_name from all the paths in process: 00072 """ 00073 00074 # trivial case first: 00075 if not hasattr(process, module_name): 00076 return process 00077 00078 # walk over all the paths: 00079 for path_name in process._Process__paths.keys(): 00080 the_path = getattr(process, path_name) 00081 module_names = the_path.moduleNames() 00082 if module_name in module_names: 00083 the_path.remove(getattr(process, module_name)) 00084 return process 00085
def muonCustoms::unganged_me1a_geometry | ( | process | ) |
Customise digi/reco geometry to use unganged ME1/a channels
Definition at line 4 of file muonCustoms.py.