Skip to content

Commit 8ceabb0

Browse files
authored
Merge pull request #45800 from SanghyunKo/egmNanoForRegression
Adapting EGM nano to use it for training energy regression
2 parents b62a94d + 7a97c04 commit 8ceabb0

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

PhysicsTools/NanoAOD/python/egamma_custom_cff.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,19 @@
8383

8484
def addExtraEGammaVarsCustomize(process):
8585
#photon
86+
process.finalPhotons.cut = cms.string("pt > 1 ")
8687
process.photonTable.variables.setValue(_phoVarsExtra.parameters_())
8788
process.triggerObjectTable.selections.Photon = customPhotonFilterBits
88-
if process.nanoDQM:
89+
90+
if hasattr(process,'nanoDQM'):
8991
process.nanoDQM.vplots.Photon.plots = _Photon_extra_plots
92+
9093
#electron
94+
process.finalElectrons.cut = cms.string("pt > 1 ")
9195
process.electronTable.variables.setValue(_eleVarsExtra.parameters_())
9296
process.triggerObjectTable.selections.Electron = customElectronFilterBits
93-
if process.nanoDQM:
97+
98+
if hasattr(process,'nanoDQM'):
9499
process.nanoDQM.vplots.Electron.plots = _Electron_extra_plots
95100

96101
return process

PhysicsTools/NanoAOD/python/photons_cff.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,9 @@ def make_bitmapVID_docstring(id_modules_working_points_pset):
252252
rawPreshowerEnergy = Var("superCluster.preshowerEnergy",float,doc="energy deposited in preshower",precision=10),
253253
seedClusEnergy = Var("superCluster.seed.energy",float,doc="seed cluster energy",precision=10),
254254
e5x5 = Var("full5x5_showerShapeVariables.e5x5",float,doc="energy in 5x5",precision=10),
255-
dEtaSeedClusSuperClus = Var("superCluster.seed.eta-superCluster.position.Eta",float,doc="dEta(seed,SC)",precision=10),
256-
dPhiSeedClusSuperClus = Var("deltaPhi(superCluster.seed.phi,superCluster.position.Phi)",float,doc="dPhi(seed,SC)",precision=10),
255+
superclusterPhi = Var("superCluster().phi()",float,doc="supercluster phi",precision=10),
256+
seedClusterEta = Var("superCluster().seed().eta()",float,doc="seed cluster eta",precision=10),
257+
seedClusterPhi = Var("superCluster().seed().phi()",float,doc="seed cluster phi",precision=10),
257258
sigmaIphiIphiFull5x5 = Var("full5x5_showerShapeVariables().sigmaIphiIphi",float,doc="Full5x5 sigmaIPhiIPhi",precision=10),
258259
eMax = Var("full5x5_maxEnergyXtal()",float,doc="Emax",precision=10),
259260
e2nd = Var("full5x5_showerShapeVariables.e2nd",float,doc="E2nd",precision=10),

0 commit comments

Comments
 (0)