File indexing completed on 2024-11-25 02:29:51
0001 import FWCore.ParameterSet.Config as cms
0002
0003 from RecoMuon.MuonIsolation.muonPFIsolation_cff import *
0004 muPFIsoDepositChargedForBoostedMuons = muPFIsoDepositCharged.clone(
0005 src = cms.InputTag('muons')
0006 )
0007 muPFIsoDepositNeutralForBoostedMuons = muPFIsoDepositNeutral.clone(
0008 src = cms.InputTag('muons')
0009 )
0010 muPFIsoDepositGammaForBoostedMuons = muPFIsoDepositGamma.clone(
0011 src = cms.InputTag('muons')
0012 )
0013 muPFIsoDepositChargedAllForBoostedMuons = muPFIsoDepositChargedAll.clone(
0014 src = cms.InputTag('muons')
0015 )
0016 muPFIsoDepositPUforBoostedTauStudy = muPFIsoDepositPU.clone(
0017 src = cms.InputTag('muons')
0018 )
0019 boostedMuonPFIsolationSequence = cms.Sequence(
0020 muPFIsoDepositChargedForBoostedMuons
0021 + muPFIsoDepositNeutralForBoostedMuons
0022 + muPFIsoDepositGammaForBoostedMuons
0023 + muPFIsoDepositChargedAllForBoostedMuons
0024 + muPFIsoDepositPUforBoostedTauStudy
0025 )
0026
0027 from PhysicsTools.PatAlgos.producersLayer1.muonProducer_cfi import patMuons
0028 patBoostedMuons = patMuons.clone(
0029 isoDeposits = cms.PSet(
0030
0031 pfChargedHadrons = cms.InputTag("muPFIsoDepositChargedForBoostedMuons"),
0032 pfNeutralHadrons = cms.InputTag("muPFIsoDepositNeutralForBoostedMuons"),
0033 pfPhotons = cms.InputTag("muPFIsoDepositGammaForBoostedMuons"),
0034 user = cms.VInputTag(
0035 cms.InputTag("muPFIsoDepositChargedAllForBoostedMuons"),
0036 cms.InputTag("muPFIsoDepositPUforBoostedTauStudy")
0037 )
0038 ),
0039 addGenMatch = cms.bool(False),
0040 embedHighLevelSelection = cms.bool(True),
0041 embedCaloMETMuonCorrs = cms.bool(False),
0042 embedTcMETMuonCorrs = cms.bool(False),
0043 usePV = cms.bool(False)
0044 )
0045
0046 otherSubJetVeto = 'OtherJetConstituentsDeltaRVeto(boostedTauSeeds,0.3,boostedTauSeeds:pfCandAssocMapForIsoDepositVetos,0.01)'
0047
0048 pfChargedHadronVetos = muPFIsoValueCharged04.deposits[0].vetos.value()
0049 pfChargedHadronVetos.append(otherSubJetVeto)
0050 print("pfChargedHadronVetos = %s" % pfChargedHadronVetos)
0051
0052 pfNeutralHadronVetos = muPFIsoValueNeutral04.deposits[0].vetos.value()
0053 pfNeutralHadronVetos.append(otherSubJetVeto)
0054 print("pfNeutralHadronVetos = %s" % pfNeutralHadronVetos)
0055
0056 pfGammaVetos = muPFIsoValueGamma04.deposits[0].vetos.value()
0057 pfGammaVetos.append(otherSubJetVeto)
0058 print("pfGammaVetos = %s" % pfGammaVetos)
0059
0060 userVetos1 = muPFIsoValueChargedAll04.deposits[0].vetos.value()
0061 userVetos1.append(otherSubJetVeto)
0062 print("userVetos1 = %s" % userVetos1)
0063
0064 userVetos2 = muPFIsoValuePU04.deposits[0].vetos.value()
0065 userVetos2.append(otherSubJetVeto)
0066 print("userVetos2 = %s" % userVetos2)
0067
0068 patBoostedMuons.userIsolation = cms.PSet(
0069
0070 pfChargedHadron = cms.PSet(
0071 deltaR = cms.double(0.4),
0072 src = patBoostedMuons.isoDeposits.pfChargedHadrons,
0073 vetos = cms.vstring(pfChargedHadronVetos),
0074 skipDefaultVeto = muPFIsoValueCharged04.deposits[0].skipDefaultVeto
0075 ),
0076 pfNeutralHadron = cms.PSet(
0077 deltaR = cms.double(0.4),
0078 src = patBoostedMuons.isoDeposits.pfNeutralHadrons,
0079 vetos = cms.vstring(pfNeutralHadronVetos),
0080 skipDefaultVeto = muPFIsoValueNeutral04.deposits[0].skipDefaultVeto
0081 ),
0082 pfGamma = cms.PSet(
0083 deltaR = cms.double(0.4),
0084 src = patBoostedMuons.isoDeposits.pfPhotons,
0085 vetos = cms.vstring(pfGammaVetos),
0086 skipDefaultVeto = muPFIsoValueGamma04.deposits[0].skipDefaultVeto
0087 ),
0088 user = cms.VPSet(
0089 cms.PSet(
0090 deltaR = cms.double(0.4),
0091 src = patBoostedMuons.isoDeposits.user[0],
0092 vetos = cms.vstring(userVetos1),
0093 skipDefaultVeto = muPFIsoValueChargedAll04.deposits[0].skipDefaultVeto
0094 ),
0095 cms.PSet(
0096 deltaR = cms.double(0.4),
0097 src = patBoostedMuons.isoDeposits.user[1],
0098 vetos = cms.vstring(userVetos2),
0099 skipDefaultVeto = muPFIsoValuePU04.deposits[0].skipDefaultVeto
0100 )
0101 )
0102 )
0103
0104 makePatBoostedMuons = cms.Sequence(
0105 boostedMuonPFIsolationSequence
0106 + patBoostedMuons
0107 )