Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions PhysicsTools/NanoAOD/python/lowPtElectrons_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,22 @@
)
)

import PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi
updatedLowPtElectrons = cms.EDProducer(
"PATElectronUpdater",
src = cms.InputTag("modifiedLowPtElectrons"),
vertices = cms.InputTag("offlineSlimmedPrimaryVertices"),
computeMiniIso = cms.bool(True),
fixDxySign = cms.bool(False),
pfCandsForMiniIso = cms.InputTag("packedPFCandidates"),
miniIsoParamsB = PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi.patElectrons.miniIsoParamsB,
miniIsoParamsE = PhysicsTools.PatAlgos.producersLayer1.electronProducer_cfi.patElectrons.miniIsoParamsE,
)

from RecoEgamma.EgammaElectronProducers.lowPtGsfElectronID_cfi import lowPtGsfElectronID
lowPtPATElectronID = lowPtGsfElectronID.clone(
usePAT = True,
electrons = "modifiedLowPtElectrons",
electrons = "updatedLowPtElectrons",
unbiased = "",
ModelWeights = [
'RecoEgamma/ElectronIdentification/data/LowPtElectrons/LowPtElectrons_ID_2020Nov28.root',
Expand All @@ -28,8 +40,8 @@

isoForLowPtEle = cms.EDProducer(
"EleIsoValueMapProducer",
src = cms.InputTag("modifiedLowPtElectrons"),
relative = cms.bool(False),
src = cms.InputTag("updatedLowPtElectrons"),
relative = cms.bool(True),
rho_MiniIso = cms.InputTag("fixedGridRhoFastjetAll"),
rho_PFIso = cms.InputTag("fixedGridRhoFastjetAll"),
EAFile_MiniIso = cms.FileInPath("RecoEgamma/ElectronIdentification/data/Fall17/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_94X.txt"),
Expand All @@ -38,7 +50,7 @@

updatedLowPtElectronsWithUserData = cms.EDProducer(
"PATElectronUserDataEmbedder",
src = cms.InputTag("modifiedLowPtElectrons"),
src = cms.InputTag("updatedLowPtElectrons"),
userFloats = cms.PSet(
ID = cms.InputTag("lowPtPATElectronID"),
miniIsoChg = cms.InputTag("isoForLowPtEle:miniIsoChg"),
Expand Down Expand Up @@ -76,9 +88,9 @@
unbiased = Var("electronID('unbiased')",float,doc="ElectronSeed, pT- and dxy- agnostic BDT (raw) score"),
ptbiased = Var("electronID('ptbiased')",float,doc="ElectronSeed, pT- and dxy- dependent BDT (raw) score"),
# Isolation
miniPFRelIso_chg = Var("userFloat('miniIsoChg')/pt",float,
miniPFRelIso_chg = Var("userFloat('miniIsoChg')",float,
doc="mini PF relative isolation, charged component"),
miniPFRelIso_all = Var("userFloat('miniIsoAll')/pt",float,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these relative isolation or not ?
In this last PR the division for the pt is removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, they are rel. iso. even if the name suggests not. So the /pt is no longer needed. This is now done here.

miniPFRelIso_all = Var("userFloat('miniIsoAll')",float,
doc="mini PF relative isolation, total (with scaled rho*EA PU corrections)"),
# Conversions
convVeto = Var("passConversionVeto()",bool,doc="pass conversion veto"),
Expand All @@ -100,8 +112,6 @@
dxyErr = Var("edB('PV2D')",float,doc="dxy uncertainty, in cm",precision=6),
dz = Var("dB('PVDZ')",float,doc="dz (with sign) wrt first PV, in cm",precision=10),
dzErr = Var("abs(edB('PVDZ'))",float,doc="dz uncertainty, in cm",precision=6),
ip3d = Var("abs(dB('PV3D'))",float,doc="3D impact parameter wrt first PV, in cm",precision=10),
sip3d = Var("abs(dB('PV3D')/edB('PV3D'))",float,doc="3D impact parameter significance wrt first PV, in cm",precision=10),
# Cross-referencing
#jetIdx
#photonIdx
Expand Down Expand Up @@ -175,6 +185,7 @@
################################################################################

lowPtElectronSequence = cms.Sequence(modifiedLowPtElectrons
+updatedLowPtElectrons
+lowPtPATElectronID
+isoForLowPtEle
+updatedLowPtElectronsWithUserData
Expand Down
6 changes: 2 additions & 4 deletions PhysicsTools/NanoAOD/python/nanoDQM_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
Plot1D('unbiased', 'unbiased', 40, -10., 10., 'ElectronSeed, pT- and dxy- agnostic BDT (raw) score'),
Plot1D('ptbiased', 'ptbiased', 40, -10., 10., 'ElectronSeed, pT- and dxy- dependent BDT (raw) score'),
# Isolation
Plot1D('miniPFRelIso_chg', 'miniPFRelIso_chg', 20, 0, 2, 'mini PF relative isolation, charged component'),
Plot1D('miniPFRelIso_all', 'miniPFRelIso_all', 20, 0, 2, 'mini PF relative isolation, total (with scaled rho*EA PU corrections)'),
Plot1D('miniPFRelIso_chg', 'miniPFRelIso_chg', 20, 0., 1., 'mini PF relative isolation, charged component'),
Plot1D('miniPFRelIso_all', 'miniPFRelIso_all', 20, 0., 1., 'mini PF relative isolation, total (with scaled rho*EA PU corrections)'),
# Conversions
Plot1D('convVeto', 'convVeto', 2, -0.5, 1.5, 'pass conversion veto'),
Plot1D('convWP', 'convWP', 8, -0.5, 7.5, 'conversion flag bit map: 1=Veto, 2=Loose, 3=Tight'),
Expand All @@ -154,8 +154,6 @@
Plot1D('dz', 'dz', 20, -0.3, 0.3, 'dz (with sign) wrt first PV, in cm'),
Plot1D('dxyErr', 'dxyErr', 20, 0., 0.2, 'dxy uncertainty, in cm'),
Plot1D('dzErr', 'dzErr', 20, 0., 0.2, 'dz uncertainty, in cm'),
Plot1D('ip3d', 'ip3d', 20, 0., 0.2, '3D impact parameter wrt first PV, in cm'),
Plot1D('sip3d', 'sip3d', 20, 0., 20., '3D impact parameter significance wrt first PV, in cm'),
),
),

Expand Down