CMS 3D CMS Logo

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