CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
boostedElectronIsolation_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 
5 elPFIsoDepositChargedForBoostedElectrons = elPFIsoDepositCharged.clone(
6  src = cms.InputTag('gedGsfElectrons'),
7 )
8 elPFIsoDepositChargedAllForBoostedElectrons = elPFIsoDepositChargedAll.clone(
9  src = cms.InputTag('gedGsfElectrons'),
10 )
11 elPFIsoDepositNeutralForBoostedElectrons = elPFIsoDepositNeutral.clone(
12  src = cms.InputTag('gedGsfElectrons'),
13 )
14 elPFIsoDepositGammaForBoostedElectrons = elPFIsoDepositGamma.clone(
15  src = cms.InputTag('gedGsfElectrons'),
16 )
17 elPFIsoDepositPUForBoostedElectrons = elPFIsoDepositPU.clone(
18  src = cms.InputTag('gedGsfElectrons'),
19 )
20 boostedElectronPFIsolationSequence = cms.Sequence(
21  elPFIsoDepositChargedForBoostedElectrons
22  + elPFIsoDepositChargedAllForBoostedElectrons
23  + elPFIsoDepositNeutralForBoostedElectrons
24  + elPFIsoDepositGammaForBoostedElectrons
25  + elPFIsoDepositPUForBoostedElectrons
26 )
27 
29 patBoostedElectrons = patElectrons.clone(
30  isoDeposits = cms.PSet(
31  # CV: strings for IsoDeposits defined in PhysicsTools/PatAlgos/plugins/PATElectronProducer.cc
32  pfChargedHadrons = cms.InputTag("elPFIsoDepositChargedForBoostedElectrons"),
33  pfNeutralHadrons = cms.InputTag("elPFIsoDepositNeutralForBoostedElectrons"),
34  pfPhotons = cms.InputTag("elPFIsoDepositGammaForBoostedElectrons"),
35  user = cms.VInputTag(
36  cms.InputTag("elPFIsoDepositChargedAllForBoostedElectrons"),
37  cms.InputTag("elPFIsoDepositPUForBoostedElectrons")
38  )
39  ),
40  addGenMatch = cms.bool(False),
41  embedHighLevelSelection = cms.bool(True),
42  usePV = cms.bool(False) # compute transverse impact parameter wrt. beamspot (not event vertex)
43 )
44 
45 otherSubJetVeto = 'OtherJetConstituentsDeltaRVeto(boostedTauSeeds,0.3,boostedTauSeeds:pfCandAssocMapForIsoDepositVetos,0.01)'
46 
47 #pfChargedHadronVetos = elPFIsoValueCharged04NoPFId.deposits[0].vetos.value()
48 pfChargedHadronVetos = elPFIsoValueCharged03NoPFId.deposits[0].vetos.value()
49 pfChargedHadronVetos.append(otherSubJetVeto)
50 print "pfChargedHadronVetos = %s" % pfChargedHadronVetos
51 
52 #pfNeutralHadronVetos = elPFIsoValueNeutral04NoPFId.deposits[0].vetos.value()
53 pfNeutralHadronVetos = elPFIsoValueNeutral03NoPFId.deposits[0].vetos.value()
54 pfNeutralHadronVetos.append(otherSubJetVeto)
55 print "pfNeutralHadronVetos = %s" % pfNeutralHadronVetos
56 
57 #pfGammaVetos = elPFIsoValueGamma04NoPFId.deposits[0].vetos.value()
58 pfGammaVetos = elPFIsoValueGamma03NoPFId.deposits[0].vetos.value()
59 pfGammaVetos.append(otherSubJetVeto)
60 print "pfGammaVetos = %s" % pfGammaVetos
61 
62 #userVetos1 = elPFIsoValueChargedAll04NoPFId.deposits[0].vetos.value()
63 userVetos1 = elPFIsoValueChargedAll03NoPFId.deposits[0].vetos.value()
64 userVetos1.append(otherSubJetVeto)
65 print "userVetos1 = %s" % userVetos1
66 
67 #userVetos2 = elPFIsoValuePU04NoPFId.deposits[0].vetos.value()
68 userVetos2 = elPFIsoValuePU03NoPFId.deposits[0].vetos.value()
69 userVetos2.append(otherSubJetVeto)
70 print "userVetos2 = %s" % userVetos2
71 
72 patBoostedElectrons.userIsolation = cms.PSet(
73  # CV: strings for Isolation values defined in PhysicsTools/PatAlgos/src/MultiIsolator.cc
74  pfChargedHadron = cms.PSet(
75  # deltaR = cms.double(0.4),
76  deltaR = cms.double(0.3),
77  src = patBoostedElectrons.isoDeposits.pfChargedHadrons,
78  vetos = cms.vstring(pfChargedHadronVetos),
79  # skipDefaultVeto = elPFIsoValueCharged04NoPFId.deposits[0].skipDefaultVeto
80  skipDefaultVeto = elPFIsoValueCharged03NoPFId.deposits[0].skipDefaultVeto
81  ),
82  pfNeutralHadron = cms.PSet(
83  # deltaR = cms.double(0.4),
84  deltaR = cms.double(0.3),
85  src = patBoostedElectrons.isoDeposits.pfNeutralHadrons,
86  vetos = cms.vstring(pfNeutralHadronVetos),
87  # skipDefaultVeto = elPFIsoValueNeutral04NoPFId.deposits[0].skipDefaultVeto
88  skipDefaultVeto = elPFIsoValueNeutral03NoPFId.deposits[0].skipDefaultVeto
89  ),
90  pfGamma = cms.PSet(
91  # deltaR = cms.double(0.4),
92  deltaR = cms.double(0.3),
93  src = patBoostedElectrons.isoDeposits.pfPhotons,
94  vetos = cms.vstring(pfGammaVetos),
95  # skipDefaultVeto = elPFIsoValueGamma04NoPFId.deposits[0].skipDefaultVeto
96  skipDefaultVeto = elPFIsoValueGamma03NoPFId.deposits[0].skipDefaultVeto
97  ),
98  user = cms.VPSet(
99  cms.PSet(
100  # deltaR = cms.double(0.4),
101  deltaR = cms.double(0.3),
102  src = patBoostedElectrons.isoDeposits.user[0],
103  vetos = cms.vstring(userVetos1),
104  # skipDefaultVeto = elPFIsoValueChargedAll04NoPFId.deposits[0].skipDefaultVeto
105  skipDefaultVeto = elPFIsoValueChargedAll03NoPFId.deposits[0].skipDefaultVeto
106  ),
107  cms.PSet(
108  # deltaR = cms.double(0.4),
109  deltaR = cms.double(0.3),
110  src = patBoostedElectrons.isoDeposits.user[1],
111  vetos = cms.vstring(userVetos2),
112  # skipDefaultVeto = elPFIsoValuePU04NoPFId.deposits[0].skipDefaultVeto
113  skipDefaultVeto = elPFIsoValuePU03NoPFId.deposits[0].skipDefaultVeto
114  )
115  )
116 
117 )
118 
119 makePatBoostedElectrons = cms.Sequence(
120  boostedElectronPFIsolationSequence
121  + patBoostedElectrons
122 )
123 
124