Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
import FWCore.ParameterSet.Config as cms

# single high-pT muon skim sequence

HighPtMuonSelection = "(isTrackerMuon || isGlobalMuon) && abs(eta) <= 2.4 && pt > 10."

highPtMuonSelectorForMuonIon = cms.EDFilter("PATMuonRefSelector",
    src = cms.InputTag("slimmedMuons"),
    cut = cms.string(HighPtMuonSelection),
    filter = cms.bool(True)
    )

highPtMuonCountFilterForMuonIon = cms.EDFilter("MuonRefPatCount",
    src = cms.InputTag("slimmedMuons"),
    cut = cms.string(HighPtMuonSelection),
    minNumber = cms.uint32(1)
    )

HighPtMuonIonSkimSequence = cms.Sequence(
    highPtMuonSelectorForMuonIon *
    highPtMuonCountFilterForMuonIon
    )


# loose dimuon skim sequence

LooseMuonSelection = "(isTrackerMuon || isGlobalMuon) && ((abs(eta) <= 1.0 && pt > 3.3) || (1.0 < abs(eta) <= 2.4 && pt > 1.0))"

looseMuonSelectorForMuonIon = cms.EDFilter("PATMuonRefSelector",
    src = cms.InputTag("slimmedMuons"),
    cut = cms.string(LooseMuonSelection),
    filter = cms.bool(True)
    )

looseMuonCountFilterForMuonIon = cms.EDFilter("MuonRefPatCount",
    src = cms.InputTag("slimmedMuons"),
    cut = cms.string(LooseMuonSelection),
    minNumber = cms.uint32(2)
    )


dimuonMassCutForMuonIon = cms.EDProducer("CandViewShallowCloneCombiner",
    checkCharge = cms.bool(False),
    cut = cms.string("mass > 2.4"),
    decay = cms.string("looseMuonSelectorForMuonIon looseMuonSelectorForMuonIon")
    )

dimuonCountFilterForMuonIon = cms.EDFilter("CandViewCountFilter",
    src = cms.InputTag("dimuonMassCutForMuonIon"),
    minNumber = cms.uint32(1)
    )

# dimuon skim sequence
DimuonIonSkimSequence = cms.Sequence(
    looseMuonSelectorForMuonIon *
    looseMuonCountFilterForMuonIon *
    dimuonMassCutForMuonIon *
    dimuonCountFilterForMuonIon
    )