CMS 3D CMS Logo

boostedMuonIsolation_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 muPFIsoDepositChargedForBoostedMuons = muPFIsoDepositCharged.clone(
5  src = cms.InputTag('muons')
6 )
7 muPFIsoDepositNeutralForBoostedMuons = muPFIsoDepositNeutral.clone(
8  src = cms.InputTag('muons')
9 )
10 muPFIsoDepositGammaForBoostedMuons = muPFIsoDepositGamma.clone(
11  src = cms.InputTag('muons')
12 )
13 muPFIsoDepositChargedAllForBoostedMuons = muPFIsoDepositChargedAll.clone(
14  src = cms.InputTag('muons')
15 )
16 muPFIsoDepositPUforBoostedTauStudy = muPFIsoDepositPU.clone(
17  src = cms.InputTag('muons')
18 )
19 boostedMuonPFIsolationSequence = cms.Sequence(
20  muPFIsoDepositChargedForBoostedMuons
21  + muPFIsoDepositNeutralForBoostedMuons
22  + muPFIsoDepositGammaForBoostedMuons
23  + muPFIsoDepositChargedAllForBoostedMuons
24  + muPFIsoDepositPUforBoostedTauStudy
25 )
26 
28 patBoostedMuons = patMuons.clone(
29  isoDeposits = cms.PSet(
30  # CV: strings for IsoDeposits defined in PhysicsTools/PatAlgos/plugins/PATMuonProducer.cc
31  pfChargedHadrons = cms.InputTag("muPFIsoDepositChargedForBoostedMuons"),
32  pfNeutralHadrons = cms.InputTag("muPFIsoDepositNeutralForBoostedMuons"),
33  pfPhotons = cms.InputTag("muPFIsoDepositGammaForBoostedMuons"),
34  user = cms.VInputTag(
35  cms.InputTag("muPFIsoDepositChargedAllForBoostedMuons"),
36  cms.InputTag("muPFIsoDepositPUforBoostedTauStudy")
37  )
38  ),
39  addGenMatch = cms.bool(False),
40  embedHighLevelSelection = cms.bool(True),
41  embedCaloMETMuonCorrs = cms.bool(False),
42  embedTcMETMuonCorrs = cms.bool(False),
43  usePV = cms.bool(False) # compute transverse impact parameter wrt. beamspot (not event vertex)
44 )
45 
46 otherSubJetVeto = 'OtherJetConstituentsDeltaRVeto(boostedTauSeeds,0.3,boostedTauSeeds:pfCandAssocMapForIsoDepositVetos,0.01)'
47 
48 pfChargedHadronVetos = muPFIsoValueCharged04.deposits[0].vetos.value()
49 pfChargedHadronVetos.append(otherSubJetVeto)
50 print "pfChargedHadronVetos = %s" % pfChargedHadronVetos
51 
52 pfNeutralHadronVetos = muPFIsoValueNeutral04.deposits[0].vetos.value()
53 pfNeutralHadronVetos.append(otherSubJetVeto)
54 print "pfNeutralHadronVetos = %s" % pfNeutralHadronVetos
55 
56 pfGammaVetos = muPFIsoValueGamma04.deposits[0].vetos.value()
57 pfGammaVetos.append(otherSubJetVeto)
58 print "pfGammaVetos = %s" % pfGammaVetos
59 
60 userVetos1 = muPFIsoValueChargedAll04.deposits[0].vetos.value()
61 userVetos1.append(otherSubJetVeto)
62 print "userVetos1 = %s" % userVetos1
63 
64 userVetos2 = muPFIsoValuePU04.deposits[0].vetos.value()
65 userVetos2.append(otherSubJetVeto)
66 print "userVetos2 = %s" % userVetos2
67 
68 patBoostedMuons.userIsolation = cms.PSet(
69  # CV: strings for Isolation values defined in PhysicsTools/PatAlgos/src/MultiIsolator.cc
70  pfChargedHadron = cms.PSet(
71  deltaR = cms.double(0.4),
72  src = patBoostedMuons.isoDeposits.pfChargedHadrons,
73  vetos = cms.vstring(pfChargedHadronVetos),
74  skipDefaultVeto = muPFIsoValueCharged04.deposits[0].skipDefaultVeto
75  ),
76  pfNeutralHadron = cms.PSet(
77  deltaR = cms.double(0.4),
78  src = patBoostedMuons.isoDeposits.pfNeutralHadrons,
79  vetos = cms.vstring(pfNeutralHadronVetos),
80  skipDefaultVeto = muPFIsoValueNeutral04.deposits[0].skipDefaultVeto
81  ),
82  pfGamma = cms.PSet(
83  deltaR = cms.double(0.4),
84  src = patBoostedMuons.isoDeposits.pfPhotons,
85  vetos = cms.vstring(pfGammaVetos),
86  skipDefaultVeto = muPFIsoValueGamma04.deposits[0].skipDefaultVeto
87  ),
88  user = cms.VPSet(
89  cms.PSet(
90  deltaR = cms.double(0.4),
91  src = patBoostedMuons.isoDeposits.user[0],
92  vetos = cms.vstring(userVetos1),
93  skipDefaultVeto = muPFIsoValueChargedAll04.deposits[0].skipDefaultVeto
94  ),
95  cms.PSet(
96  deltaR = cms.double(0.4),
97  src = patBoostedMuons.isoDeposits.user[1],
98  vetos = cms.vstring(userVetos2),
99  skipDefaultVeto = muPFIsoValuePU04.deposits[0].skipDefaultVeto
100  )
101  )
102 )
103 
104 makePatBoostedMuons = cms.Sequence(
105  boostedMuonPFIsolationSequence
106  + patBoostedMuons
107 )