CMS 3D CMS Logo

slimmedMuons_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 slimmedMuons = cms.EDProducer("PATMuonSlimmer",
4  src = cms.InputTag("selectedPatMuons"),
5  linkToPackedPFCandidates = cms.bool(True),
6  linkToLostTrack = cms.bool(True),
7  pfCandidates = cms.VInputTag(cms.InputTag("particleFlow")),
8  packedPFCandidates = cms.VInputTag(cms.InputTag("packedPFCandidates")),
9  lostTracks = cms.InputTag("lostTracks"),
10  saveTeVMuons = cms.string("pt > 100"), # you can put a cut to slim selectively, e.g. pt > 10
11  dropDirectionalIso = cms.string("0"),
12  dropPfP4 = cms.string("1"),
13  slimCaloVars = cms.string("1"),
14  slimKinkVars = cms.string("1"),
15  slimCaloMETCorr = cms.string("1"),
16  slimMatches = cms.string("1"),
17  segmentsMuonSelection = cms.string("pt > 50"), #segments are needed for EXO analysis looking at TOF and for very high pt from e.g. Z'
18  saveSegments = cms.bool(True),
19  modifyMuons = cms.bool(True),
20  modifierConfig = cms.PSet( modifications = cms.VPSet() ),
21  trackExtraAssocs = cms.VInputTag(["muonReducedTrackExtras", "slimmedMuonTrackExtras"]),
22 )
23 
24 # full set of track extras not available in existing AOD
25 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
26 from Configuration.Eras.Modifier_run2_miniAOD_94XFall17_cff import run2_miniAOD_94XFall17
27 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
28 from Configuration.ProcessModifiers.miniAOD_skip_trackExtras_cff import miniAOD_skip_trackExtras
29 
30 (run2_miniAOD_80XLegacy | run2_miniAOD_94XFall17 | pp_on_AA | miniAOD_skip_trackExtras).toModify(slimmedMuons, trackExtraAssocs = ["slimmedMuonTrackExtras"])
31 from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
32 run2_miniAOD_pp_on_AA_103X.toModify(slimmedMuons,
33  packedPFCandidates = ["packedPFCandidates","packedPFCandidatesRemoved"],
34  pfCandidates = ["cleanedParticleFlow","cleanedParticleFlow:removed"]
35 )