Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update TopMuEG skim to latest HLT paths in BTV #37574

Merged
merged 1 commit into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 14 additions & 45 deletions DPGAnalysis/Skims/python/TopMuEGSkim_cff.py
Original file line number Diff line number Diff line change
@@ -1,101 +1,70 @@
import FWCore.ParameterSet.Config as cms


HLTPath = "HLT_Ele*"
HLTProcessName = "HLT"

### cut on electron tag
#ELECTRON_ET_CUT_MIN = 10.0
ELECTRON_ET_CUT_MIN_TIGHT = 20.0
ELECTRON_ET_CUT_MIN_LOOSE = 10.0
ELECTRON_COLL = "gedGsfElectrons"
ELECTRON_CUTS = "(abs(superCluster.eta)<2.5) && (ecalEnergy*sin(superClusterPosition.theta)>" + str(ELECTRON_ET_CUT_MIN_LOOSE) + ")"

MASS_CUT_MIN = 0.

##################
# Electron ID ######
from DPGAnalysis.Skims.WElectronSkim_cff import *


# GsfElectron ################

ElectronPassingVeryLooseId = cms.EDFilter("GsfElectronRefSelector",
looseElectronSelection = cms.EDFilter("GsfElectronRefSelector",
src = cms.InputTag( ELECTRON_COLL ),
cut = cms.string( ELECTRON_CUTS )
)


#####################################
#####################################
import copy

from HLTrigger.HLTfilters.hltHighLevel_cfi import *

ZEM_DiJetHltFilter = cms.EDFilter("HLTHighLevel",
hltBtagTopMuEGSelection = cms.EDFilter("HLTHighLevel",
TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
HLTPaths = cms.vstring('HLT_Mu17_Ele8_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v*','HLT_Mu8_Ele17_CaloIdT_CaloIsoVL_TrkIdVL_TrkIsoVL_v*'), # provide list of HLT paths (or patterns) you want
HLTPaths = cms.vstring('HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_PFDiJet30_PFBtagDeepCSV_1p5_v*', # new (2022) MuEG trigger paths (used at DQM)
'HLT_Mu8_TrkIsoVVL_Ele23_CaloIdL_TrackIdL_IsoVL_DZ_CaloDiJet30_CaloBtagDeepCSV_1p5_v*'), # new (2022) MuEG trigger paths (used at DQM)
eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
andOr = cms.bool(True), # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
throw = cms.bool(False), # throw exception on unknown path names
# saveTags = cms.bool(False)
)


#elec_sequence = cms.Sequence(
# ZEM_DiJetHltFilter *
# goodElectrons *
# PassingVeryLooseId
# )

#####################################
############ MU SELECTION #########################


# Get muons of needed quality for Zs
looseMuonsForTop = cms.EDFilter("MuonSelector",
muonSelection = cms.EDFilter("MuonSelector",
src = cms.InputTag("muons"),
cut = cms.string('pt > 20 && abs(eta)<2.4 && isGlobalMuon = 1 && isTrackerMuon = 1 && abs(innerTrack().dxy)<2.0'),
filter = cms.bool(True)
)



elecMuon = cms.EDProducer("CandViewShallowCloneCombiner",
muonDecayProducer = cms.EDProducer("CandViewShallowCloneCombiner",
checkCharge = cms.bool(False),
cut = cms.string('mass > 0'),
decay = cms.string("looseMuonsForTop ElectronPassingVeryLooseId")
decay = cms.string("muonSelection looseElectronSelection")
)
elecMuonFilter = cms.EDFilter("CandViewCountFilter",
src = cms.InputTag("elecMuon"),
muonDecaySelection = cms.EDFilter("CandViewCountFilter",
src = cms.InputTag("muonDecayProducer"),
minNumber = cms.uint32(1)
)


############################################
################# DI JET FILTER ###########################

import FWCore.ParameterSet.Config as cms


Jet1 = cms.EDFilter("EtaPtMinCandViewSelector",
AK4CandidateJetProducer = cms.EDFilter("EtaPtMinCandViewSelector",
src = cms.InputTag("ak4PFJets"),
ptMin = cms.double(30),
etaMin = cms.double(-2.5),
etaMax = cms.double(2.5)
)

dijetFilter = cms.EDFilter("CandViewCountFilter",
src = cms.InputTag("Jet1"),
dijetSelection = cms.EDFilter("CandViewCountFilter",
src = cms.InputTag("AK4CandidateJetProducer"),
minNumber = cms.uint32(2)
)


TopMuEGsequence = cms.Sequence(ZEM_DiJetHltFilter * looseMuonsForTop * ElectronPassingVeryLooseId * elecMuon * elecMuonFilter * Jet1 * dijetFilter)

#from Configuration.EventContent.EventContent_cff import OutALCARECOEcalCalElectron
#TopMuEGSkimContent = OutALCARECOEcalCalElectron.clone()
#TopMuEGSkimContent.outputCommands.extend( [
# "keep *drop *",
# "keep *_pfMet_*_*",
# "keep *_MuEG_Skim_*"
# ] )
TopMuEGsequence = cms.Sequence(hltBtagTopMuEGSelection * muonSelection * looseElectronSelection * muonDecayProducer * muonDecaySelection * AK4CandidateJetProducer * dijetSelection)
Loading