Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-07 22:22:59

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TestRPCdigi")
0004 
0005 process.load('Configuration.StandardSequences.Services_cff')
0006 process.load('FWCore.MessageService.MessageLogger_cfi')
0007 process.load('Configuration.EventContent.EventContent_cff')
0008 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0009 process.load('Configuration.StandardSequences.SimIdeal_cff')
0010 process.load('Configuration.StandardSequences.Generator_cff')
0011 process.load('Configuration.StandardSequences.Digi_cff')
0012 process.load('Configuration.StandardSequences.DigiToRaw_cff')
0013 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0014 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0015 from Configuration.AlCa.GlobalTag import GlobalTag
0016 
0017 ### 2023 Geometry w/ ME0 ###
0018 ############################
0019 # process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_design', '')
0020 # from SLHCUpgradeSimulations.Configuration.fixMissingUpgradeGTPayloads import fixRPCConditions # RPC Conditions for Phase2 Detector (2023)
0021 # process = fixRPCConditions(process)                                                           # RPC Conditions for Phase2 Detector (2023)
0022 # from SimMuon.GEMDigitizer.customizeGEMDigi import customize_digi_addGEM_muon_only             # Customize for CSC + DT + GEM + RPC
0023 # process = customize_digi_addGEM_muon_only(process)                                            # Digi only Muon Detectors
0024 # process.load('Configuration.Geometry.GeometryExtended2023MuonReco_cff')
0025 # process.load('Configuration.Geometry.GeometryExtended2023Muon_cff')
0026 # process.load('Configuration.StandardSequences.MagneticField_cff')
0027 ############################
0028 
0029 ### 2023 Geometry w/o ME0 ###
0030 ############################
0031 # process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_design', '')
0032 # from SLHCUpgradeSimulations.Configuration.fixMissingUpgradeGTPayloads import fixRPCConditions # RPC Conditions for Phase2 Detector (2023)
0033 # process = fixRPCConditions(process)                                                           # RPC Conditions for Phase2 Detector (2023)
0034 # from SimMuon.GEMDigitizer.customizeGEMDigi import customize_digi_addGEM_muon_only             # Customize for CSC + DT + GEM + RPC
0035 # process = customize_digi_addGEM_muon_only(process)                                            # Digi only Muon Detectors
0036 # process.load('Configuration.Geometry.GeometryExtended2023Reco_cff')
0037 # process.load('Configuration.Geometry.GeometryExtended2023_cff')
0038 # process.load('Configuration.StandardSequences.MagneticField_cff')
0039 #############################
0040 
0041 ### 2021 Geometry w/ GEM ###
0042 ############################
0043 # process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_design', '')
0044 # from SLHCUpgradeSimulations.Configuration.fixMissingUpgradeGTPayloads import fixRPCConditions # RPC Conditions for Phase2 Detector (2021)
0045 # process = fixRPCConditions(process)                                                           # RPC Conditions for Phase2 Detector (2021)
0046 ### Info:
0047 ### conditions for RPC in 2023 are not updated for higher noises or lower efficiency
0048 ### conditions for RPC in 2021 loaded by the global tag are the same as he 2023 conditions
0049 ### by default it will not work because it uses the previous RPC Simulation Model (RPCSimAverageNoiseEffCls)
0050 ### while the newer RPC Simulation Model (RPCSimAsymmetricCls) is loaded in CMSSW 
0051 ### by loading the fixRPCConditions the previous RPC Simulation Model will be loaded
0052 ### in future we ll have to give different conditions payload to the 2021 geometry
0053 ### such that the newest RPC Simulation Model (RPCSimAsymmetricCls.h) can be used.
0054 # from SimMuon.GEMDigitizer.customizeGEMDigi import customize_digi_addGEM_muon_only   # Customize for CSC + DT + GEM + RPC
0055 # process = customize_digi_addGEM_muon_only(process)                                  # Digi only Muon Detectors
0056 # process.load('Configuration.Geometry.GeometryExtended2021Reco_cff')
0057 # process.load('Configuration.Geometry.GeometryExtended2021_cff')
0058 # process.load('Configuration.StandardSequences.MagneticField_cff')
0059 ############################
0060 
0061 ### Run 2 Geometry ###
0062 ######################
0063 # process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0064 #  from SimMuon.RPCDigitizer.customizeRPCDigi import customize_digi_muon_only  # Customize for CSC + DT + RPC
0065 # process = customize_digi_muon_only(process)                                 # Digi only Muon Detectors
0066 # process.load('Configuration.Geometry.GeometryExtended2015Reco_cff')
0067 # process.load('Configuration.Geometry.GeometryExtended2015_cff')
0068 # process.load('Configuration.StandardSequences.MagneticField_cff')
0069 ######################
0070 
0071 ### Run 1 Geometry ###
0072 ######################
0073 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run1_mc', '')
0074 from SimMuon.RPCDigitizer.customizeRPCDigi import customize_digi_muon_only  # Customize for CSC + DT + RPC
0075 process = customize_digi_muon_only(process)                                 # Digi only Muon Detectors
0076 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0077 process.load('Configuration.StandardSequences.MagneticField_cff')
0078 ######################
0079 
0080 
0081 ### Input file  
0082 process.source = cms.Source("PoolSource",
0083     fileNames = cms.untracked.vstring(
0084       '/store/relval/CMSSW_7_1_0_pre7/RelValSingleMuPt10/GEN-SIM/PRE_STA71_V3-v1/00000/EC57E8A1-3ED1-E311-8416-002618943882.root' # Run 1 MC
0085       # '/store/relval/CMSSW_7_4_0_pre7/RelValSingleMuPt10_UP15/GEN-SIM/MCRUN2_74_V7-v1/00000/6A0EACAD-FEB6-E411-90C7-0025905A48FC.root' # Run 2 MC
0086       # 'file:/afs/cern.ch/work/a/archie/public/SingleMuPt100_GEN-SIM__CMSSW_75X.root' # Upgrade MC (GEN-SIM in 2023 works for all)
0087     )
0088 )
0089 process.output = cms.OutputModule("PoolOutputModule",
0090     fileName = cms.untracked.string( 
0091         'file:out_digi.root'
0092     ),
0093     outputCommands = cms.untracked.vstring(
0094         'drop *_*_*_*',
0095         'keep *_*CSC*_*_*',
0096         'keep *_*DT*_*_*',
0097         'keep *_*GEM*_*_*',
0098         'keep *_*RPC*_*_*',
0099         'keep *_*_*CSC*_*',
0100         'keep *_*_*DT*_*',
0101         'keep *_*_*GEM*_*',
0102         'keep *_*_*RPC*_*',
0103     ),
0104     SelectEvents = cms.untracked.PSet(
0105         SelectEvents = cms.vstring('digi_step')
0106     )
0107 )
0108 process.maxEvents = cms.untracked.PSet( 
0109     input = cms.untracked.int32(1) 
0110 )
0111 
0112 
0113 ### TO ACTIVATE LogTrace IN RPCDigitizer NEED TO COMPILE IT WITH: 
0114 ### --> scram b -j8 USER_CXXFLAGS="-DEDM_ML_DEBUG"
0115 ### Make sure that you first cleaned your CMSSW version: 
0116 ### --> scram b clean 
0117 ### before issuing the scram command above
0118 ### ------------------------------------------------------------
0119 ### LogTrace output goes to cout; all other output to "junk.log"
0120 ### Code/Configuration with thanks to Tim Cox
0121 ### ------------------------------------------------------------
0122 ### to have a handle on the loops inside RPCSimSetup 
0123 ### I have split the LogDebug stream in several streams
0124 ### that can be activated independently
0125 ################################################################
0126 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0127 process.MessageLogger.debugModules = cms.untracked.vstring("*")
0128 process.MessageLogger.cerr.enable = False
0129 process.MessageLogger.files.junk = dict()
0130 process.MessageLogger.cout = cms.untracked.PSet(
0131     enable = cms.untracked.bool(True),
0132     threshold = cms.untracked.string("DEBUG"),
0133     default = cms.untracked.PSet( limit = cms.untracked.int32(0) ),
0134     FwkReport = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0135     ## RPCGeometry = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0136     RPCDigiProducer = cms.untracked.PSet( limit = cms.untracked.int32(-1) ), 
0137     ## RPCSimSetup = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0138     ## RPCSimSetupClsLoopDetails = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0139     ## RPCSimSetupNoiseLoopDetails = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0140     ## RPCSimSetupChecks = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0141     RPCSynchronizer = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0142     RPCDigitizer = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0143     RPCSimAsymmetricCls = cms.untracked.PSet( limit = cms.untracked.int32(-1) ),
0144     ## RPCSimAverageNoiseEffCls = cms.untracked.PSet( limit = cms.untracked.int32(-1) )
0145 )
0146 
0147 # process.Timing = cms.Service("Timing")
0148 # process.options = cms.untracked.PSet( 
0149 #     wantSummary = cms.untracked.bool(True) 
0150 # )
0151 
0152 
0153 process.digi_step     = cms.Path(process.pdigi)
0154 process.digi2raw_step = cms.Path(process.DigiToRaw)
0155 process.endjob_step   = cms.Path(process.endOfProcess)
0156 process.out_step      = cms.EndPath(process.output)
0157 
0158 
0159 process.schedule = cms.Schedule(
0160     process.digi_step,
0161     process.endjob_step,
0162     process.out_step
0163 )