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 CommonTools.ParticleFlow.Isolation.pfElectronIsolation_cff import *
0005 
0006 elPFIsoDepositChargedForBoostedElectrons = elPFIsoDepositCharged.clone(
0007    src = cms.InputTag('gedGsfElectrons'),    
0008 )
0009 elPFIsoDepositChargedAllForBoostedElectrons = elPFIsoDepositChargedAll.clone(
0010    src = cms.InputTag('gedGsfElectrons'),   
0011 )
0012 elPFIsoDepositNeutralForBoostedElectrons = elPFIsoDepositNeutral.clone(
0013    src = cms.InputTag('gedGsfElectrons'),
0014 )
0015 elPFIsoDepositGammaForBoostedElectrons = elPFIsoDepositGamma.clone(
0016    src = cms.InputTag('gedGsfElectrons'),
0017 )
0018 elPFIsoDepositPUForBoostedElectrons = elPFIsoDepositPU.clone(
0019    src = cms.InputTag('gedGsfElectrons'),
0020 )
0021 boostedElectronPFIsolationSequence = cms.Sequence(
0022     elPFIsoDepositChargedForBoostedElectrons
0023   + elPFIsoDepositChargedAllForBoostedElectrons
0024   + elPFIsoDepositNeutralForBoostedElectrons
0025   + elPFIsoDepositGammaForBoostedElectrons
0026   + elPFIsoDepositPUForBoostedElectrons
0027 )
0028 
0029 from PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi import patElectrons
0030 patBoostedElectrons = patElectrons.clone(
0031     isoDeposits = cms.PSet(
0032         # CV: strings for IsoDeposits defined in PhysicsTools/PatAlgos/plugins/PATElectronProducer.cc
0033         pfChargedHadrons = cms.InputTag("elPFIsoDepositChargedForBoostedElectrons"),
0034         pfNeutralHadrons = cms.InputTag("elPFIsoDepositNeutralForBoostedElectrons"),
0035         pfPhotons = cms.InputTag("elPFIsoDepositGammaForBoostedElectrons"),
0036         user = cms.VInputTag(
0037             cms.InputTag("elPFIsoDepositChargedAllForBoostedElectrons"),
0038             cms.InputTag("elPFIsoDepositPUForBoostedElectrons")
0039         )
0040     ),
0041     addGenMatch = cms.bool(False),
0042     embedHighLevelSelection = cms.bool(True),
0043     usePV = cms.bool(False) # compute transverse impact parameter wrt. beamspot (not event vertex)      
0044 )
0045 
0046 otherSubJetVeto = 'OtherJetConstituentsDeltaRVeto(boostedTauSeeds,0.3,boostedTauSeeds:pfCandAssocMapForIsoDepositVetos,0.01)'
0047 
0048 #pfChargedHadronVetos = elPFIsoValueCharged04NoPFId.deposits[0].vetos.value()
0049 pfChargedHadronVetos = elPFIsoValueCharged03NoPFId.deposits[0].vetos.value()
0050 pfChargedHadronVetos.append(otherSubJetVeto)
0051 print("pfChargedHadronVetos = %s" % pfChargedHadronVetos)
0052 
0053 #pfNeutralHadronVetos = elPFIsoValueNeutral04NoPFId.deposits[0].vetos.value()
0054 pfNeutralHadronVetos = elPFIsoValueNeutral03NoPFId.deposits[0].vetos.value()
0055 pfNeutralHadronVetos.append(otherSubJetVeto)
0056 print("pfNeutralHadronVetos = %s" % pfNeutralHadronVetos)
0057 
0058 #pfGammaVetos = elPFIsoValueGamma04NoPFId.deposits[0].vetos.value()
0059 pfGammaVetos = elPFIsoValueGamma03NoPFId.deposits[0].vetos.value()
0060 pfGammaVetos.append(otherSubJetVeto)
0061 print("pfGammaVetos = %s" % pfGammaVetos)
0062 
0063 #userVetos1 = elPFIsoValueChargedAll04NoPFId.deposits[0].vetos.value()
0064 userVetos1 = elPFIsoValueChargedAll03NoPFId.deposits[0].vetos.value()
0065 userVetos1.append(otherSubJetVeto)
0066 print("userVetos1 = %s" % userVetos1)
0067 
0068 #userVetos2 = elPFIsoValuePU04NoPFId.deposits[0].vetos.value()
0069 userVetos2 = elPFIsoValuePU03NoPFId.deposits[0].vetos.value()
0070 userVetos2.append(otherSubJetVeto)
0071 print("userVetos2 = %s" % userVetos2)
0072 
0073 patBoostedElectrons.userIsolation = cms.PSet(
0074    # CV: strings for Isolation values defined in PhysicsTools/PatAlgos/src/MultiIsolator.cc
0075    pfChargedHadron = cms.PSet(
0076       #  deltaR = cms.double(0.4),
0077         deltaR = cms.double(0.3),
0078         src = patBoostedElectrons.isoDeposits.pfChargedHadrons,
0079         vetos = cms.vstring(pfChargedHadronVetos),
0080       #  skipDefaultVeto = elPFIsoValueCharged04NoPFId.deposits[0].skipDefaultVeto
0081         skipDefaultVeto = elPFIsoValueCharged03NoPFId.deposits[0].skipDefaultVeto
0082    ),
0083    pfNeutralHadron = cms.PSet(
0084       #  deltaR = cms.double(0.4),
0085         deltaR = cms.double(0.3),
0086         src = patBoostedElectrons.isoDeposits.pfNeutralHadrons,
0087         vetos = cms.vstring(pfNeutralHadronVetos),
0088       #  skipDefaultVeto = elPFIsoValueNeutral04NoPFId.deposits[0].skipDefaultVeto
0089         skipDefaultVeto = elPFIsoValueNeutral03NoPFId.deposits[0].skipDefaultVeto
0090    ), 
0091    pfGamma = cms.PSet(
0092       #  deltaR = cms.double(0.4),
0093         deltaR = cms.double(0.3),
0094         src = patBoostedElectrons.isoDeposits.pfPhotons,
0095         vetos = cms.vstring(pfGammaVetos),
0096       #  skipDefaultVeto = elPFIsoValueGamma04NoPFId.deposits[0].skipDefaultVeto
0097         skipDefaultVeto = elPFIsoValueGamma03NoPFId.deposits[0].skipDefaultVeto 
0098    ),
0099    user = cms.VPSet(
0100         cms.PSet(
0101       #      deltaR = cms.double(0.4),
0102             deltaR = cms.double(0.3),
0103             src = patBoostedElectrons.isoDeposits.user[0],
0104             vetos = cms.vstring(userVetos1),
0105       #      skipDefaultVeto = elPFIsoValueChargedAll04NoPFId.deposits[0].skipDefaultVeto
0106             skipDefaultVeto = elPFIsoValueChargedAll03NoPFId.deposits[0].skipDefaultVeto
0107         ),
0108         cms.PSet(
0109       #      deltaR = cms.double(0.4),
0110             deltaR = cms.double(0.3),
0111             src = patBoostedElectrons.isoDeposits.user[1],
0112             vetos = cms.vstring(userVetos2),
0113       #      skipDefaultVeto = elPFIsoValuePU04NoPFId.deposits[0].skipDefaultVeto
0114             skipDefaultVeto = elPFIsoValuePU03NoPFId.deposits[0].skipDefaultVeto
0115         )
0116    ) 
0117 
0118 )
0119 
0120 makePatBoostedElectrons = cms.Sequence(
0121     boostedElectronPFIsolationSequence
0122    + patBoostedElectrons
0123 )
0124 
0125