Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:32:33

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