Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:03

0001 # Start with a skeleton process which gets imported with the following line
0002 from PhysicsTools.PatAlgos.patTemplate_cfg import *
0003 
0004 # Load the standard PAT config
0005 process.load( "PhysicsTools.PatAlgos.patSequences_cff" )
0006 
0007 # Load the exercise config
0008 process.load( "PhysicsTools.PatExamples.mcMatch_cfi" ) # The file to modify!
0009 
0010 # Modify the default config according to needed exercise settings
0011 # You can comment these lines in order to run the default rather than
0012 # your OWN MC matching from PhysicsTools/PatExamples/python/mcMatching_cfi
0013 # CAUTION: Uncommented, this does NOT run out-of-the-box!
0014 # Own muon match
0015 process.makeAllLayer1Muons.remove( process.muonMatch )
0016 process.makeAllLayer1Muons += process.myMuonMatch
0017 process.makeAllLayer1Muons.remove( process.allLayer1Muons )
0018 process.makeAllLayer1Muons += process.allLayer1Muons
0019 process.allLayer1Muons.genParticleMatch = "myMuonMatch"
0020 process.allLayer1Muons.embedGenMatch = True
0021 # Own jet match to MC jets
0022 process.makeAllLayer1Jets.remove( process.jetGenJetMatch )
0023 process.makeAllLayer1Jets += process.myJetGenJetMatch
0024 process.makeAllLayer1Jets.remove( process.allLayer1Jets )
0025 process.makeAllLayer1Jets += process.allLayer1Jets
0026 process.allLayer1Jets.genJetMatch = "myJetGenJetMatch"
0027 
0028 # Define the path
0029 process.p = cms.Path(
0030     process.patDefaultSequence
0031 )
0032 
0033 process.maxEvents.input     = 1000 # Reduce number of events for testing.
0034 process.out.fileName        = 'edmPatMcMatch.root'
0035 process.out.outputCommands += [ 'keep recoGenParticles_genParticles_*_*' ] # Keeps the MC objects for references
0036 process.options.wantSummary = False # to suppress the long output at the end of the job