Example #1
0
    cut = cms.string("pt > %f" % (ptMin,) ),
)

process.slimAOD = cms.Sequence(
    process.genMuons +
    process.goodTracks 
)

### ==== Make PAT Muons ====
from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi import allLayer1Muons
process.patMuonsWithoutTrigger = allLayer1Muons.clone(
    # embed the tracks, so we don't have to carry them around
    embedTrack          = True,
    embedCombinedMuon   = True,
    embedStandAloneMuon = True,
    # then switch off some features we don't need
    embedPickyMuon = False,
    embedTpfmsMuon = False, 
    isolation = cms.PSet(),   # no extra isolation beyond what's in reco::Muon itself
    isoDeposits = cms.PSet(), # no heavy isodeposits
    addGenMatch = False,      # no mc: T&P doesn't take it from here anyway.
)

### ==== Unpack trigger, and match ====
process.load("PhysicsTools.PatAlgos.triggerLayer1.triggerProducer_cfi")
process.patTrigger.onlyStandAlone = True
process.patTrigger.processName    = triggerProcess
from PhysicsTools.PatAlgos.triggerLayer1.triggerMatcher_cfi import muonTriggerMatchHLT1MuonIso
process.muonMatchHLTMuX = muonTriggerMatchHLT1MuonIso.clone(
    src = 'patMuonsWithoutTrigger',
    pathNames = [ triggerPath ]
)
Example #2
0
    "TrackSelector",
    src=cms.InputTag("generalTracks"),
    cut=cms.string("pt > %f" % (ptMin, )),
)

process.slimAOD = cms.Sequence(process.genMuons + process.goodTracks)

### ==== Make PAT Muons ====
from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi import allLayer1Muons
process.patMuonsWithoutTrigger = allLayer1Muons.clone(
    # embed the tracks, so we don't have to carry them around
    embedTrack=True,
    embedCombinedMuon=True,
    embedStandAloneMuon=True,
    # then switch off some features we don't need
    embedPickyMuon=False,
    embedTpfmsMuon=False,
    isolation=cms.PSet(
    ),  # no extra isolation beyond what's in reco::Muon itself
    isoDeposits=cms.PSet(),  # no heavy isodeposits
    addGenMatch=False,  # no mc: T&P doesn't take it from here anyway.
)

### ==== Unpack trigger, and match ====
process.load("PhysicsTools.PatAlgos.triggerLayer1.triggerProducer_cfi")
process.patTrigger.onlyStandAlone = True
process.patTrigger.processName = triggerProcess
from PhysicsTools.PatAlgos.triggerLayer1.triggerMatcher_cfi import muonTriggerMatchHLT1MuonIso
process.muonMatchHLTMuX = muonTriggerMatchHLT1MuonIso.clone(
    src='patMuonsWithoutTrigger', pathNames=[triggerPath])
Example #3
0
process.muonL1Match.maxDeltaR = 9999.0  # no deltaR match
process.muonL1Match.preselection = ""
process.muonL1Match.writeExtraInfo = True
#process.muonL1MatchUAV = process.muonL1Match.clone(src = 'lhcBasicMuonsUAV')

####  Merge matches into pat::GenericParticle
## from PhysicsTools.PatAlgos.producersLayer1.genericParticleProducer_cfi import allLayer1GenericParticles
## process.lhcMuons = allLayer1GenericParticles.clone(
##         src = "lhcBasicMuons", ...
####  Merge matches into pat::Muon
from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi import allLayer1Muons
process.lhcMuons = allLayer1Muons.clone(
    muonSource='lhcSTAMuonsBarrelOnly',  # src = 'lhcBasicMuons'
    embedStandAloneMuon=True,
    addTrigMatch=True,
    isolation=cms.PSet(),
    isoDeposits=cms.PSet(),
    addGenMatch=False,
    addTeVRefits=False  ## turn off unwanted pat::Muon features
)
#process.lhcMuonsUAV = process.lhcMuons.clone(src = 'lhcBasicMuonsUAV')


def addMatch(muons, matcher):
    muons.trigPrimMatch = cms.VInputTag(
        cms.InputTag(matcher), cms.InputTag(matcher, "propagatedReco"))
    muons.userData.userInts.src = cms.VInputTag(
        cms.InputTag(matcher, "bx"), cms.InputTag(matcher, "quality"),
        cms.InputTag(matcher, "isolated"))
    muons.userData.userFloats.src = cms.VInputTag(
        cms.InputTag(matcher, "deltaR"))
Example #4
0
process.muonL1Match.useState = 'innermost'
process.muonL1Match.maxDeltaPhi = 50.0*3.14/180.0 # 50 degrees, slide 3 of http://indico.cern.ch/getFile.py/access?contribId=2&resId=0&materialId=slides&confId=57817
process.muonL1Match.maxDeltaR   = 9999.0          # no deltaR match
process.muonL1Match.preselection = ""
process.muonL1Match.writeExtraInfo = True
process.muonL1Match.cosmicPropagationHypothesis = cms.bool(True) # must specify the type, as I'm adding a new parameter and not replacing one

####  Merge matches into pat::GenericParticle
## from PhysicsTools.PatAlgos.producersLayer1.genericParticleProducer_cfi import allLayer1GenericParticles 
## process.myMuons = allLayer1GenericParticles.clone(
##         src = "lhcBasicMuons", ...
####  Merge matches into pat::Muon
from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi import allLayer1Muons 
process.myMuons = allLayer1Muons.clone(
    muonSource = 'muons', # src = 'lhcBasicMuons'
    embedStandAloneMuon = True,
    addTrigMatch = True,
    isolation = cms.PSet(), isoDeposits = cms.PSet(), addGenMatch = False, addTeVRefits = False ## turn off unwanted pat::Muon features
)
process.myMuons.trigPrimMatch = cms.VInputTag( cms.InputTag("muonL1Match"), cms.InputTag("muonL1Match","propagatedReco") )
process.myMuons.userData.userInts.src = cms.VInputTag( cms.InputTag("muonL1Match", "bx"), cms.InputTag("muonL1Match", "quality"), cms.InputTag("muonL1Match", "isolated") )
process.myMuons.userData.userFloats.src = cms.VInputTag( cms.InputTag("muonL1Match", "deltaR") )

process.p = cms.Path(
    process.l1muonsAnyBX *  
    process.muonL1Match  *
    process.myMuons      
)

process.out = cms.OutputModule("PoolOutputModule",
    fileName = cms.untracked.string('l1CosmicMuonsCRAFT.root'),
    outputCommands = cms.untracked.vstring(