File indexing completed on 2025-04-22 06:27:49
0001 import FWCore.ParameterSet.Config as cms
0002
0003
0004 from FWCore.ParameterSet.VarParsing import VarParsing
0005
0006 options = VarParsing("analysis")
0007 options.parseArguments()
0008
0009 process = cms.Process("Demo")
0010
0011 process.load("FWCore.MessageService.MessageLogger_cfi")
0012 process.load("Configuration.Geometry.GeometryExtendedRun4D110Reco_cff")
0013 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0014 from Configuration.AlCa.GlobalTag import GlobalTag
0015
0016 process.GlobalTag = GlobalTag(process.GlobalTag, "auto:phase2_realistic_T21", "")
0017
0018 process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(-1))
0019
0020
0021 input_filename = (
0022 "default.root" if len(options.inputFiles) == 0 else options.inputFiles[0]
0023 )
0024
0025
0026
0027
0028
0029 process.source = cms.Source(
0030 "PoolSource",
0031 inputCommands=cms.untracked.vstring(
0032 [
0033 "keep *",
0034 "drop l1tEMTFHit2016Extras_simEmtfDigis_CSC_HLT",
0035 "drop l1tEMTFHit2016Extras_simEmtfDigis_RPC_HLT",
0036 "drop l1tEMTFHit2016s_simEmtfDigis__HLT",
0037 "drop l1tEMTFTrack2016Extras_simEmtfDigis__HLT",
0038 "drop l1tEMTFTrack2016s_simEmtfDigis__HLT",
0039 ]
0040 ),
0041
0042 fileNames=cms.untracked.vstring(
0043
0044
0045
0046
0047
0048 "file:%s" % input_filename
0049 ),
0050 )
0051
0052 process.load("SimGeneral.Debugging.caloParticleDebugger_cfi")
0053
0054
0055 process.MessageLogger.cerr.enable = False
0056 process.MessageLogger.cout.enable = False
0057 labels = [
0058 "SimTracks",
0059 "SimVertices",
0060 "GenParticles",
0061 "TrackingParticles",
0062 "CaloParticles",
0063 "SimClusters",
0064 ]
0065 messageLogger = dict()
0066 for category in labels:
0067 main_key = "%sMessageLogger" % (category)
0068 category_key = "CaloParticleDebugger%s" % (category)
0069 messageLogger[main_key] = dict(
0070 filename="%s_%s.log" % (input_filename.replace(".root", ""), category),
0071 threshold="INFO",
0072 default=dict(limit=0),
0073 )
0074 messageLogger[main_key][category_key] = dict(limit=-1)
0075
0076 setattr(process.MessageLogger.files, category, dict())
0077
0078 setattr(process.MessageLogger.files, category, messageLogger[main_key])
0079
0080 process.p = cms.Path(process.caloParticleDebugger)