Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-06 05:39:42

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # The line below always has to be included to make VarParsing work
0004 from FWCore.ParameterSet.VarParsing import VarParsing
0005 options = VarParsing ('analysis')
0006 options.parseArguments()
0007 
0008 process = cms.Process("Demo")
0009 
0010 process.load("FWCore.MessageService.MessageLogger_cfi")
0011 process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0012 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0013 from Configuration.AlCa.GlobalTag import GlobalTag
0014 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0015 
0016 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
0017 
0018 
0019 input_filename = 'default.root' if len(options.inputFiles) == 0 else options.inputFiles[0]
0020 #input_filename='step2SingleElectronPt15Eta1p7_2p7_SimTracksters.root'
0021 #input_filename='step2FineCaloSingleElectronPt15Eta1p7_2p7_SimTracksters.root'
0022 #input_filename='step2SingleElectronPt15Eta1p7_2p7_CBWEAndSimTracksters.root'
0023 #input_filename='step2FineCaloSingleElectronPt15Eta1p7_2p7_CBWEAndSimTracksters.root'
0024 
0025 process.source = cms.Source("PoolSource",
0026     inputCommands = cms.untracked.vstring(['keep *',
0027                                            'drop l1tEMTFHit2016Extras_simEmtfDigis_CSC_HLT',
0028                                            'drop l1tEMTFHit2016Extras_simEmtfDigis_RPC_HLT',
0029                                            'drop l1tEMTFHit2016s_simEmtfDigis__HLT',
0030                                            'drop l1tEMTFTrack2016Extras_simEmtfDigis__HLT',
0031                                            'drop l1tEMTFTrack2016s_simEmtfDigis__HLT']),
0032     # replace 'myfile.root' with the source file you want to use
0033     fileNames = cms.untracked.vstring(
0034 #      'file:/data/rovere/HGCAL/study/CMSSW_9_4_0/src/SimGeneral/Debugging/test/20800.0_FourMuPt1_200+FourMuPt_1_200_pythia8_2023D20_GenSimHLBeamSpotFull+DigiFull_2023D20+RecoFullGlobal_2023D20+HARVESTFullGlobal_2023D20/step2.root'
0035 #        'file:/data/rovere/HGCAL/study/CMSSW_9_4_0/src/SimGeneral/Debugging/test/20824.0_TTbar_13+TTbar_13TeV_TuneCUETP8M1_2023D20_GenSimHLBeamSpotFull+DigiFull_2023D20+RecoFullGlobal_2023D20+HARVESTFullGlobal_2023D20/step2.root'
0036 #        'file:/data/rovere/HGCAL/study/CMSSW_9_4_0/src/SimGeneral/Debugging/test/20002.0_SingleElectronPt35+SingleElectronPt35_pythia8_2023D17_GenSimHLBeamSpotFull+DigiFullTrigger_2023D17+RecoFullGlobal_2023D17+HARVESTFullGlobal_2023D17/step2.root'
0037 #        'file:/data/rovere/HGCAL/study/CMSSW_9_4_0/src/SimGeneral/Debugging/test/20016.0_SingleGammaPt35Extended+DoubleGammaPt35Extended_pythia8_2023D17_GenSimHLBeamSpotFull+DigiFullTrigger_2023D17+RecoFullGlobal_2023D17+HARVESTFullGlobal_2023D17/step2.root'
0038 #        'file:/data/rovere/HGCAL/study/CMSSW_9_4_0/src/SimGeneral/Debugging/test/20088.0_SinglePiPt25Eta1p7_2p7+SinglePiPt25Eta1p7_2p7_2023D17_GenSimHLBeamSpotFull+DigiFullTrigger_2023D17+RecoFullGlobal_2023D17+HARVESTFullGlobal_2023D17/step2.root'
0039          'file:%s'%input_filename
0040 
0041     )
0042 )
0043 
0044 process.load("SimGeneral.Debugging.caloParticleDebugger_cfi")
0045 
0046 # MessageLogger customizations
0047 process.MessageLogger.cerr.enable = False
0048 process.MessageLogger.cout.enable = False
0049 labels = ['SimTracks', 'SimVertices', 'GenParticles', 'TrackingParticles', 'CaloParticles', 'SimClusters']
0050 messageLogger = dict()
0051 for category in labels:
0052     main_key = '%sMessageLogger'%(category)
0053     category_key = 'CaloParticleDebugger%s'%(category)
0054     messageLogger[main_key] = dict(
0055             filename = '%s_%s.log' % (input_filename.replace('.root',''), category),
0056             threshold = 'INFO',
0057             default = dict(limit=0)
0058             )
0059     messageLogger[main_key][category_key] = dict(limit=-1)
0060     # First create defaults
0061     setattr(process.MessageLogger.files, category, dict())
0062     # Then modify them
0063     setattr(process.MessageLogger.files, category, messageLogger[main_key])
0064 
0065 process.p = cms.Path(process.caloParticleDebugger)