Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-08 02:27:16

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 import sys
0005 from Configuration.Eras.Era_Run2_2018_pp_on_AA_cff import Run2_2018_pp_on_AA
0006 from Configuration.Eras.Era_Run3_cff import Run3
0007 process = cms.Process("MUTRKDQM", Run3)
0008 
0009 live=True
0010 unitTest=False
0011 if 'unitTest=True' in sys.argv:
0012     live=False
0013     unitTest=True
0014 
0015 offlineTesting=not live
0016 
0017 
0018 #----------------------------
0019 #### Event Source
0020 #----------------------------
0021 # for live online DQM in P5
0022 
0023 
0024 if (unitTest):
0025     process.load("DQM.Integration.config.unittestinputsource_cfi")
0026     from DQM.Integration.config.unittestinputsource_cfi import options
0027 
0028 elif (live):
0029     process.load("DQM.Integration.config.inputsource_cfi")
0030     from DQM.Integration.config.inputsource_cfi import options
0031 
0032 # for testing in lxplus
0033 elif(offlineTesting):
0034     process.load("DQM.Integration.config.fileinputsource_cfi")
0035     from DQM.Integration.config.fileinputsource_cfi import options
0036     
0037  
0038 print("Running with run type = ", process.runType.getRunType())
0039 
0040 if (process.runType.getRunType() != process.runType.cosmic_run):
0041     print("MuTracking client runs only in cosmics, disabling")
0042     
0043 
0044 #----------------------------
0045 #### DQM Environment
0046 #----------------------------
0047 
0048 process.load("DQMServices.Components.DQMEnvironment_cfi")
0049 
0050 process.load("DQM.Integration.config.environment_cfi")
0051 
0052 
0053 #----------------------------
0054 #### DQM Live Environment
0055 #----------------------------
0056 process.dqmEnv.subSystemFolder = 'Muons'
0057 process.dqmSaver.tag = 'Muons'
0058 ##?? process.dqmSaver.backupLumiCount = 30
0059 
0060 # process.dqmSaver.path = '.'
0061 process.dqmSaver.runNumber = options.runNumber
0062 process.dqmSaverPB.tag = 'Muons'
0063 # process.dqmSaverPB.path = './pb'
0064 process.dqmSaverPB.runNumber = options.runNumber
0065 
0066 process.dqmmodules = cms.Sequence(process.dqmEnv + process.dqmSaver + process.dqmSaverPB)
0067 
0068 # Imports
0069 
0070 #-------------------------------------------------                             
0071 # GEOMETRY                                                                    
0072 #-------------------------------------------------  
0073 
0074 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0075 
0076 #-----------------------------                                                  
0077 # Magnetic Field                                                                
0078 #-----------------------------  
0079 
0080 process.load("Configuration.StandardSequences.MagneticField_cff")
0081 
0082 #-----------------------------                                                  
0083 # Cosmics muon reco sequence                                                    
0084 #-----------------------------  
0085 
0086 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0087 process.load("Configuration.StandardSequences.ReconstructionCosmics_cff")
0088 process.load("L1Trigger.Configuration.L1TRawToDigi_cff") 
0089 
0090 #-------------------------------------------------                             
0091 # GLOBALTAG                                                                    
0092 #-------------------------------------------------                              
0093 # Condition for P5 cluster                          
0094 
0095 if (live):
0096     process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
0097 
0098 # Condition for lxplus: change and possibly customise the GT
0099 elif(offlineTesting):
0100     process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0101     from Configuration.AlCa.GlobalTag import GlobalTag as gtCustomise
0102     process.GlobalTag = gtCustomise(process.GlobalTag, 'auto:run2_data', '')
0103 
0104 
0105 
0106 #------------------------------------                                                                                              
0107 # Cosmic muons reconstruction modules
0108 #------------------------------------
0109 
0110 #1 RAW-TO-DIGI 
0111 
0112 process.muRawToDigi = cms.Sequence(process.L1TRawToDigi +
0113                                    process.muonCSCDigis +
0114                                    process.muonDTDigis +
0115                                    process.muonRPCDigis +
0116                                    process.muonGEMDigis)
0117                                    
0118 
0119 
0120 #2 LOCAL RECO
0121 from RecoLocalMuon.Configuration.RecoLocalMuonCosmics_cff import *
0122 from RecoLocalMuon.RPCRecHit.rpcRecHits_cfi import *
0123 
0124 process.dtlocalreco = cms.Sequence(dt1DRecHits*dt4DSegments)
0125 process.csclocalreco = cms.Sequence(csc2DRecHits*cscSegments)
0126 process.muLocalRecoCosmics = cms.Sequence(process.dtlocalreco+process.csclocalreco+process.rpcRecHits)
0127 
0128 
0129 #3 STA RECO 
0130 
0131 from RecoMuon.MuonSeedGenerator.CosmicMuonSeedProducer_cfi import *
0132 from RecoMuon.CosmicMuonProducer.cosmicMuons_cff import *
0133 
0134 ##Reco Beam Spot from DB 
0135 from RecoVertex.BeamSpotProducer.BeamSpotFakeParameters_cfi import *
0136 process.beamspot = cms.EDAnalyzer("BeamSpotFromDB")
0137 process.offlineBeamSpot = cms.EDProducer("BeamSpotProducer")
0138 process.beampath = cms.Sequence(process.beamspot+process.offlineBeamSpot)
0139 
0140 
0141 process.muSTAreco = cms.Sequence(process.CosmicMuonSeed*process.cosmicMuons)
0142 
0143 
0144 
0145 
0146 
0147 #--------------------------                                                                                                         # Service                                                                                                                           #--------------------------                                                                                                                      
0148 process.AdaptorConfig = cms.Service("AdaptorConfig")                                                                                            
0149 
0150 #--------------------------
0151 # Filters
0152 #--------------------------
0153 # HLT Filter
0154 # 0=random, 1=physics, 2=calibration, 3=technical
0155 process.hltTriggerTypeFilter = cms.EDFilter("HLTTriggerTypeFilter",
0156     SelectedTriggerType = cms.int32(1)
0157 )
0158 
0159 
0160 # HLT trigger selection (HLT_ZeroBias)
0161 # modified for 0 Tesla HLT menu (no ZeroBias_*)
0162 process.load('HLTrigger.HLTfilters.hltHighLevel_cfi')
0163 process.hltHighLevel.HLTPaths = ['HLT*Mu*','HLT_*Physics*']
0164 process.hltHighLevel.andOr = True
0165 process.hltHighLevel.throw =  False
0166 
0167 
0168 #-----------------------------                                                                                                     
0169 # DQM monitor modules
0170 #----------------------------- 
0171 
0172 process.load("DQM.MuonMonitor.muonCosmicAnalyzer_cff")
0173 process.muonDQM = cms.Sequence(process.muonCosmicAnalyzer)
0174 
0175 
0176 #--------------------------
0177 # Scheduling
0178 #--------------------------
0179 
0180 process.allReco = cms.Sequence(process.muRawToDigi*process.muLocalRecoCosmics*process.beampath*process.muSTAreco)
0181 
0182 process.allPaths = cms.Path(process.hltHighLevel * 
0183                             process.hltTriggerTypeFilter * 
0184                             process.allReco * 
0185                             process.muonDQM * 
0186                             process.dqmmodules)
0187 
0188 
0189 from DQM.Integration.config.online_customizations_cfi import *
0190 
0191 process = customise(process)
0192 process.options.wantSummary = cms.untracked.bool(True)
0193 print("Final Source settings:", process.source)
0194