Skip to content

Commit

Permalink
Merge pull request #29044 from alefisico/PUID_102X
Browse files Browse the repository at this point in the history
Adding parameters needed for PUjetID 94X and 102X (backport to 102X)
  • Loading branch information
cmsbuild authored Mar 3, 2020
2 parents 5a9cc2d + 5bb98a4 commit 631e002
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 25 deletions.
55 changes: 33 additions & 22 deletions RecoJets/JetProducers/python/PileupJetIDCutParams_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
full_81x_chs_wp = cms.PSet(
#4 Eta Categories 0-2.5 2.5-2.75 2.75-3.0 3.0-5.0

#Tight Id
#Tight Id
Pt010_Tight = cms.vdouble( 0.69, -0.35, -0.26, -0.21),
Pt1020_Tight = cms.vdouble( 0.69, -0.35, -0.26, -0.21),
Pt2030_Tight = cms.vdouble( 0.69, -0.35, -0.26, -0.21),
Expand All @@ -25,13 +25,24 @@
Pt3050_Loose = cms.vdouble(-0.89, -0.52, -0.38, -0.30)
)

###########################################################
## Working points for the 102X training
###########################################################
full_102x_chs_wp = full_81x_chs_wp.clone()

###########################################################
## Working points for the 94X training
###########################################################
full_94x_chs_wp = full_81x_chs_wp.clone()


###########################################################
## Working points for the 80X training
###########################################################
full_80x_chs_wp = cms.PSet(
#4 Eta Categories 0-2.5 2.5-2.75 2.75-3.0 3.0-5.0

#Tight Id
#Tight Id
Pt010_Tight = cms.vdouble( 0.26, -0.34, -0.24, -0.26),
Pt1020_Tight = cms.vdouble( 0.26, -0.34, -0.24, -0.26),
Pt2030_Tight = cms.vdouble( 0.26, -0.34, -0.24, -0.26),
Expand All @@ -55,8 +66,8 @@
###########################################################
full_76x_chs_wp = cms.PSet(
#4 Eta Categories 0-2.5 2.5-2.75 2.75-3.0 3.0-5.0
#Tight Id

#Tight Id
Pt010_Tight = cms.vdouble(0.09,-0.37,-0.24,-0.21),
Pt1020_Tight = cms.vdouble(0.09,-0.37,-0.24,-0.21),
Pt2030_Tight = cms.vdouble(0.09,-0.37,-0.24,-0.21),
Expand All @@ -72,32 +83,32 @@
Pt010_Loose = cms.vdouble(-0.96,-0.62,-0.53,-0.49),
Pt1020_Loose = cms.vdouble(-0.96,-0.62,-0.53,-0.49),
Pt2030_Loose = cms.vdouble(-0.96,-0.62,-0.53,-0.49),
Pt3050_Loose = cms.vdouble(-0.93,-0.52,-0.39,-0.31)
Pt3050_Loose = cms.vdouble(-0.93,-0.52,-0.39,-0.31)
)

###########################################################
## Working points for the 74X training
###########################################################
full_74x_chs_wp = cms.PSet(
#4 Eta Categories 0-2.5 2.5-2.75 2.75-3.0 3.0-5.0
#Tight Id

#Tight Id
Pt010_Tight = cms.vdouble(-0.1,-0.83,-0.83,-0.98),
Pt1020_Tight = cms.vdouble(-0.1,-0.83,-0.83,-0.98),
Pt2030_Tight = cms.vdouble(-0.1,-0.83,-0.83,-0.98),
Pt3050_Tight = cms.vdouble(-0.5,-0.77,-0.80,-0.98),

#Medium Id
#Medium Id
Pt010_Medium = cms.vdouble(-0.3,-0.87,-0.87,-0.99),
Pt1020_Medium = cms.vdouble(-0.3,-0.87,-0.87,-0.99),
Pt2030_Medium = cms.vdouble(-0.3,-0.87,-0.87,-0.99),
Pt3050_Medium = cms.vdouble(-0.6,-0.85,-0.85,-0.99),

#Loose Id
#Loose Id
Pt010_Loose = cms.vdouble(-0.8,-0.97,-0.97,-0.99),
Pt1020_Loose = cms.vdouble(-0.8,-0.97,-0.97,-0.99),
Pt2030_Loose = cms.vdouble(-0.8,-0.97,-0.97,-0.99),
Pt3050_Loose = cms.vdouble(-0.8,-0.95,-0.97,-0.99)
Pt3050_Loose = cms.vdouble(-0.8,-0.95,-0.97,-0.99)
)

###########################################################
Expand All @@ -111,19 +122,19 @@
Pt1020_Tight = cms.vdouble(-0.83,-0.81,-0.74,-0.81),
Pt2030_Tight = cms.vdouble( 0.73, 0.05,-0.26,-0.42),
Pt3050_Tight = cms.vdouble( 0.73, 0.05,-0.26,-0.42),

#Medium Id
Pt010_Medium = cms.vdouble(-0.83,-0.92,-0.90,-0.92),
Pt1020_Medium = cms.vdouble(-0.83,-0.92,-0.90,-0.92),
Pt2030_Medium = cms.vdouble( 0.10,-0.36,-0.54,-0.54),
Pt3050_Medium = cms.vdouble( 0.10,-0.36,-0.54,-0.54),

#Loose Id
Pt010_Loose = cms.vdouble(-0.95,-0.96,-0.94,-0.95),
Pt1020_Loose = cms.vdouble(-0.95,-0.96,-0.94,-0.95),
Pt2030_Loose = cms.vdouble(-0.63,-0.60,-0.55,-0.45),
Pt3050_Loose = cms.vdouble(-0.63,-0.60,-0.55,-0.45),

#MET
Pt010_MET = cms.vdouble( 0. ,-0.6,-0.4,-0.4),
Pt1020_MET = cms.vdouble( 0.3 ,-0.2,-0.4,-0.4),
Expand All @@ -139,13 +150,13 @@
Pt1020_Tight = cms.vdouble(-0.83,-0.81,-0.74,-0.81),
Pt2030_Tight = cms.vdouble( 0.78, 0.50, 0.17, 0.17),
Pt3050_Tight = cms.vdouble( 0.78, 0.50, 0.17, 0.17),

#Medium Id
Pt010_Medium = cms.vdouble(-0.83,-0.92,-0.90,-0.92),
Pt1020_Medium = cms.vdouble(-0.83,-0.92,-0.90,-0.92),
Pt2030_Medium = cms.vdouble(-0.07,-0.09, 0.00,-0.06),
Pt3050_Medium = cms.vdouble(-0.07,-0.09, 0.00,-0.06),

#Loose Id
Pt010_Loose = cms.vdouble(-0.95,-0.96,-0.94,-0.95),
Pt1020_Loose = cms.vdouble(-0.95,-0.96,-0.94,-0.95),
Expand All @@ -154,7 +165,7 @@
)

met_53x_wp = cms.PSet(

#Tight Id
Pt010_Tight = cms.vdouble(-2, -2, -2, -2, -2),
Pt1020_Tight = cms.vdouble(-2, -2, -2, -2, -2),
Expand Down Expand Up @@ -217,7 +228,7 @@

simple_5x_wp = cms.PSet(
#4 Eta Categories 0-2.5 2.5-2.75 2.75-3.0 3.0-5.0

#Tight Id
Pt010_Tight = cms.vdouble(-0.54,-0.93,-0.93,-0.94),
Pt1020_Tight = cms.vdouble(-0.54,-0.93,-0.93,-0.94),
Expand All @@ -235,7 +246,7 @@
Pt1020_Loose = cms.vdouble(-0.95,-0.97,-0.96,-0.97),
Pt2030_Loose = cms.vdouble(-0.80,-0.86,-0.80,-0.84),
Pt3050_Loose = cms.vdouble(-0.80,-0.86,-0.80,-0.84)

)

###########################################################
Expand Down Expand Up @@ -364,13 +375,13 @@
Pt1020_BetaStarTight = cms.vdouble( 0.15, 0.15, 999., 999.),
Pt2030_BetaStarTight = cms.vdouble( 0.15, 0.15, 999., 999.),
Pt3050_BetaStarTight = cms.vdouble( 0.15, 0.15, 999., 999.),

#Medium Id => Daniele
Pt010_BetaStarMedium = cms.vdouble( 0.2, 0.3, 999., 999.),
Pt1020_BetaStarMedium = cms.vdouble( 0.2, 0.3, 999., 999.),
Pt2030_BetaStarMedium = cms.vdouble( 0.2, 0.3, 999., 999.),
Pt3050_BetaStarMedium = cms.vdouble( 0.2, 0.3, 999., 999.),

#Loose Id
Pt010_BetaStarLoose = cms.vdouble( 0.2, 0.3, 999., 999.),
Pt1020_BetaStarLoose = cms.vdouble( 0.2, 0.3, 999., 999.),
Expand All @@ -383,13 +394,13 @@
Pt1020_RMSTight = cms.vdouble( 0.06, 0.07, 0.04, 0.05),
Pt2030_RMSTight = cms.vdouble( 0.05, 0.07, 0.03, 0.045),
Pt3050_RMSTight = cms.vdouble( 0.05, 0.06, 0.03, 0.04),

#Medium Id => Daniele
Pt010_RMSMedium = cms.vdouble( 0.06, 0.03, 0.03, 0.04),
Pt1020_RMSMedium = cms.vdouble( 0.06, 0.03, 0.03, 0.04),
Pt2030_RMSMedium = cms.vdouble( 0.06, 0.03, 0.03, 0.04),
Pt3050_RMSMedium = cms.vdouble( 0.06, 0.03, 0.03, 0.04),

#Loose Id
Pt010_RMSLoose = cms.vdouble( 0.06, 0.05, 0.05, 0.07),
Pt1020_RMSLoose = cms.vdouble( 0.06, 0.05, 0.05, 0.07),
Expand Down
47 changes: 47 additions & 0 deletions RecoJets/JetProducers/python/PileupJetIDParams_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,53 @@
JetIdParams = full_81x_chs_wp,
label = cms.string("full")
)
####################################################################################################################
trainingVariables_102X_Eta0To3 = [
"nvtx" ,
"beta" ,
"dR2Mean" ,
"frac01" ,
"frac02" ,
"frac03" ,
"frac04" ,
"majW" ,
"minW" ,
"jetR" ,
"jetRchg" ,
"nParticles",
"nCharged" ,
"ptD" ,
"pull" ,
]
trainingVariables_102X_Eta3To5 = list(trainingVariables_102X_Eta0To3)
trainingVariables_102X_Eta3To5.remove('beta')
trainingVariables_102X_Eta3To5.remove('jetRchg')
trainingVariables_102X_Eta3To5.remove('nCharged')

full_102x_chs = full_81x_chs.clone(JetIdParams = full_102x_chs_wp)
full_102x_chs.trainings[0].tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_102X_Eta0p0To2p5_chs_BDT.weights.xml.gz"
full_102x_chs.trainings[0].tmvaVariables = trainingVariables_102X_Eta0To3
full_102x_chs.trainings[1].tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_102X_Eta2p5To2p75_chs_BDT.weights.xml.gz"
full_102x_chs.trainings[1].tmvaVariables = trainingVariables_102X_Eta0To3
full_102x_chs.trainings[2].tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_102X_Eta2p75To3p0_chs_BDT.weights.xml.gz"
full_102x_chs.trainings[2].tmvaVariables = trainingVariables_102X_Eta0To3
full_102x_chs.trainings[3].tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_102X_Eta3p0To5p0_chs_BDT.weights.xml.gz"
full_102x_chs.trainings[3].tmvaVariables = trainingVariables_102X_Eta3To5

####################################################################################################################
trainingVariables_94X_Eta0To3 = list(trainingVariables_102X_Eta0To3)
trainingVariables_94X_Eta3To5 = list(trainingVariables_102X_Eta3To5)
full_94x_chs = full_81x_chs.clone(JetIdParams = full_94x_chs_wp)
full_94x_chs.trainings[0].tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_94X_Eta0p0To2p5_chs_BDT.weights.xml.gz"
full_94x_chs.trainings[0].tmvaVariables = trainingVariables_94X_Eta0To3
full_94x_chs.trainings[1].tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_94X_Eta2p5To2p75_chs_BDT.weights.xml.gz"
full_94x_chs.trainings[1].tmvaVariables = trainingVariables_94X_Eta0To3
full_94x_chs.trainings[2].tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_94X_Eta2p75To3p0_chs_BDT.weights.xml.gz"
full_94x_chs.trainings[2].tmvaVariables = trainingVariables_94X_Eta0To3
full_94x_chs.trainings[3].tmvaWeights = "RecoJets/JetProducers/data/pileupJetId_94X_Eta3p0To5p0_chs_BDT.weights.xml.gz"
full_94x_chs.trainings[3].tmvaVariables = trainingVariables_94X_Eta3To5




####################################################################################################################
Expand Down
9 changes: 6 additions & 3 deletions RecoJets/JetProducers/python/PileupJetID_cfi.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import FWCore.ParameterSet.Config as cms

from RecoJets.JetProducers.PileupJetIDParams_cfi import *
from Configuration.Eras.Modifier_run2_miniAOD_devel_cff import run2_miniAOD_devel
from RecoJets.JetProducers.PileupJetIDParams_cfi import *

#_stdalgos_4x = cms.VPSet(full, cutbased,PhilV1)
_stdalgos_5x = cms.VPSet(full_5x,cutbased,PhilV1)

#_chsalgos_4x = cms.VPSet(full, cutbased)
#_chsalgos_4x = cms.VPSet(full, cutbased)
_chsalgos_5x = cms.VPSet(full_5x_chs,cutbased)
_chsalgos_74x = cms.VPSet(full_74x_chs,cutbased)
_chsalgos_76x = cms.VPSet(full_76x_chs,cutbased)
_chsalgos_80x = cms.VPSet(full_80x_chs,cutbased)
_chsalgos_81x = cms.VPSet(full_81x_chs,cutbased)
_chsalgos_94x = cms.VPSet(full_94x_chs,cutbased)
_chsalgos_102x = cms.VPSet(full_102x_chs,cutbased)

_stdalgos = _chsalgos_81x
run2_miniAOD_devel.toReplaceWith(_stdalgos, _chsalgos_102x)

# Calculate+store variables and run MVAs
pileupJetId = cms.EDProducer('PileupJetIdProducer',
Expand Down

0 comments on commit 631e002

Please sign in to comment.