CMS 3D CMS Logo

boostedElectronIsolation_cff.py
Go to the documentation of this file.
1 from __future__ import print_function
2 import FWCore.ParameterSet.Config as cms
3 
5 
6 elPFIsoDepositChargedForBoostedElectrons = elPFIsoDepositCharged.clone(
7  src = cms.InputTag('gedGsfElectrons'),
8 )
9 elPFIsoDepositChargedAllForBoostedElectrons = elPFIsoDepositChargedAll.clone(
10  src = cms.InputTag('gedGsfElectrons'),
11 )
12 elPFIsoDepositNeutralForBoostedElectrons = elPFIsoDepositNeutral.clone(
13  src = cms.InputTag('gedGsfElectrons'),
14 )
15 elPFIsoDepositGammaForBoostedElectrons = elPFIsoDepositGamma.clone(
16  src = cms.InputTag('gedGsfElectrons'),
17 )
18 elPFIsoDepositPUForBoostedElectrons = elPFIsoDepositPU.clone(
19  src = cms.InputTag('gedGsfElectrons'),
20 )
21 boostedElectronPFIsolationSequence = cms.Sequence(
22  elPFIsoDepositChargedForBoostedElectrons
23  + elPFIsoDepositChargedAllForBoostedElectrons
24  + elPFIsoDepositNeutralForBoostedElectrons
25  + elPFIsoDepositGammaForBoostedElectrons
26  + elPFIsoDepositPUForBoostedElectrons
27 )
28 
30 patBoostedElectrons = patElectrons.clone(
31  isoDeposits = cms.PSet(
32  # CV: strings for IsoDeposits defined in PhysicsTools/PatAlgos/plugins/PATElectronProducer.cc
33  pfChargedHadrons = cms.InputTag("elPFIsoDepositChargedForBoostedElectrons"),
34  pfNeutralHadrons = cms.InputTag("elPFIsoDepositNeutralForBoostedElectrons"),
35  pfPhotons = cms.InputTag("elPFIsoDepositGammaForBoostedElectrons"),
36  user = cms.VInputTag(
37  cms.InputTag("elPFIsoDepositChargedAllForBoostedElectrons"),
38  cms.InputTag("elPFIsoDepositPUForBoostedElectrons")
39  )
40  ),
41  addGenMatch = cms.bool(False),
42  embedHighLevelSelection = cms.bool(True),
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 = elPFIsoValueCharged04NoPFId.deposits[0].vetos.value()
49 pfChargedHadronVetos = elPFIsoValueCharged03NoPFId.deposits[0].vetos.value()
50 pfChargedHadronVetos.append(otherSubJetVeto)
51 print("pfChargedHadronVetos = %s" % pfChargedHadronVetos)
52 
53 #pfNeutralHadronVetos = elPFIsoValueNeutral04NoPFId.deposits[0].vetos.value()
54 pfNeutralHadronVetos = elPFIsoValueNeutral03NoPFId.deposits[0].vetos.value()
55 pfNeutralHadronVetos.append(otherSubJetVeto)
56 print("pfNeutralHadronVetos = %s" % pfNeutralHadronVetos)
57 
58 #pfGammaVetos = elPFIsoValueGamma04NoPFId.deposits[0].vetos.value()
59 pfGammaVetos = elPFIsoValueGamma03NoPFId.deposits[0].vetos.value()
60 pfGammaVetos.append(otherSubJetVeto)
61 print("pfGammaVetos = %s" % pfGammaVetos)
62 
63 #userVetos1 = elPFIsoValueChargedAll04NoPFId.deposits[0].vetos.value()
64 userVetos1 = elPFIsoValueChargedAll03NoPFId.deposits[0].vetos.value()
65 userVetos1.append(otherSubJetVeto)
66 print("userVetos1 = %s" % userVetos1)
67 
68 #userVetos2 = elPFIsoValuePU04NoPFId.deposits[0].vetos.value()
69 userVetos2 = elPFIsoValuePU03NoPFId.deposits[0].vetos.value()
70 userVetos2.append(otherSubJetVeto)
71 print("userVetos2 = %s" % userVetos2)
72 
73 patBoostedElectrons.userIsolation = cms.PSet(
74  # CV: strings for Isolation values defined in PhysicsTools/PatAlgos/src/MultiIsolator.cc
75  pfChargedHadron = cms.PSet(
76  # deltaR = cms.double(0.4),
77  deltaR = cms.double(0.3),
78  src = patBoostedElectrons.isoDeposits.pfChargedHadrons,
79  vetos = cms.vstring(pfChargedHadronVetos),
80  # skipDefaultVeto = elPFIsoValueCharged04NoPFId.deposits[0].skipDefaultVeto
81  skipDefaultVeto = elPFIsoValueCharged03NoPFId.deposits[0].skipDefaultVeto
82  ),
83  pfNeutralHadron = cms.PSet(
84  # deltaR = cms.double(0.4),
85  deltaR = cms.double(0.3),
86  src = patBoostedElectrons.isoDeposits.pfNeutralHadrons,
87  vetos = cms.vstring(pfNeutralHadronVetos),
88  # skipDefaultVeto = elPFIsoValueNeutral04NoPFId.deposits[0].skipDefaultVeto
89  skipDefaultVeto = elPFIsoValueNeutral03NoPFId.deposits[0].skipDefaultVeto
90  ),
91  pfGamma = cms.PSet(
92  # deltaR = cms.double(0.4),
93  deltaR = cms.double(0.3),
94  src = patBoostedElectrons.isoDeposits.pfPhotons,
95  vetos = cms.vstring(pfGammaVetos),
96  # skipDefaultVeto = elPFIsoValueGamma04NoPFId.deposits[0].skipDefaultVeto
97  skipDefaultVeto = elPFIsoValueGamma03NoPFId.deposits[0].skipDefaultVeto
98  ),
99  user = cms.VPSet(
100  cms.PSet(
101  # deltaR = cms.double(0.4),
102  deltaR = cms.double(0.3),
103  src = patBoostedElectrons.isoDeposits.user[0],
104  vetos = cms.vstring(userVetos1),
105  # skipDefaultVeto = elPFIsoValueChargedAll04NoPFId.deposits[0].skipDefaultVeto
106  skipDefaultVeto = elPFIsoValueChargedAll03NoPFId.deposits[0].skipDefaultVeto
107  ),
108  cms.PSet(
109  # deltaR = cms.double(0.4),
110  deltaR = cms.double(0.3),
111  src = patBoostedElectrons.isoDeposits.user[1],
112  vetos = cms.vstring(userVetos2),
113  # skipDefaultVeto = elPFIsoValuePU04NoPFId.deposits[0].skipDefaultVeto
114  skipDefaultVeto = elPFIsoValuePU03NoPFId.deposits[0].skipDefaultVeto
115  )
116  )
117 
118 )
119 
120 makePatBoostedElectrons = cms.Sequence(
121  boostedElectronPFIsolationSequence
122  + patBoostedElectrons
123 )
124 
125 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66