-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hgg photons variables in nanoAODs #36526
Changes from all commits
2e40d6d
c6ea511
280b30b
85d3955
5dfd00d
8f2ae4b
ea3f693
22115f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,7 +118,6 @@ def make_bitmapVID_docstring(id_modules_working_points_pset): | |
src = cms.InputTag("slimmedPhotons"), | ||
userFloats = cms.PSet( | ||
mvaID = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRunIIFall17v2Values"), | ||
mvaID_Fall17V1p1 = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRunIIFall17v1p1Values"), | ||
PFIsoChg = cms.InputTag("isoForPho:PFIsoChg"), | ||
PFIsoAll = cms.InputTag("isoForPho:PFIsoAll"), | ||
), | ||
|
@@ -174,12 +173,18 @@ def make_bitmapVID_docstring(id_modules_working_points_pset): | |
doc = cms.string("slimmedPhotons after basic selection (" + finalPhotons.cut.value()+")"), | ||
singleton = cms.bool(False), # the number of entries is variable | ||
extension = cms.bool(False), # this is the main table for the photons | ||
variables = cms.PSet(CandVars, | ||
variables = cms.PSet(P3Vars, | ||
jetIdx = Var("?hasUserCand('jet')?userCand('jet').key():-1", int, doc="index of the associated jet (-1 if none)"), | ||
electronIdx = Var("?hasUserCand('electron')?userCand('electron').key():-1", int, doc="index of the associated electron (-1 if none)"), | ||
energyErr = Var("getCorrectedEnergyError('regression2')",float,doc="energy error of the cluster from regression",precision=6), | ||
r9 = Var("full5x5_r9()",float,doc="R9 of the supercluster, calculated with full 5x5 region",precision=10), | ||
sieie = Var("full5x5_sigmaIetaIeta()",float,doc="sigma_IetaIeta of the supercluster, calculated with full 5x5 region",precision=10), | ||
energyRaw = Var("superCluster().rawEnergy()",float,doc="raw energy of photon supercluster", precision=10), | ||
r9 = Var("full5x5_r9()",float,doc="R9 of the supercluster, calculated with full 5x5 region",precision=8), | ||
sieie = Var("full5x5_sigmaIetaIeta()",float,doc="sigma_IetaIeta of the supercluster, calculated with full 5x5 region",precision=8), | ||
sipip = Var("showerShapeVariables().sigmaIphiIphi", float, doc="sigmaIphiIphi of the supercluster", precision=8), | ||
sieip = Var("full5x5_showerShapeVariables().sigmaIetaIphi",float,doc="sigma_IetaIphi of the supercluster, calculated with full 5x5 region",precision=8), | ||
s4 = Var("full5x5_showerShapeVariables().e2x2/full5x5_showerShapeVariables().e5x5",float,doc="e2x2/e5x5 of the supercluster, calculated with full 5x5 region",precision=8), | ||
etaWidth = Var("superCluster().etaWidth()",float,doc="Width of the photon supercluster in eta", precision=8), | ||
phiWidth = Var("superCluster().phiWidth()",float,doc="Width of the photon supercluster in phi", precision=8), | ||
cutBased = Var( | ||
"userInt('cutbasedID_loose')+userInt('cutbasedID_medium')+userInt('cutbasedID_tight')", | ||
int, | ||
|
@@ -198,15 +203,24 @@ def make_bitmapVID_docstring(id_modules_working_points_pset): | |
electronVeto = Var("passElectronVeto()",bool,doc="pass electron veto"), | ||
pixelSeed = Var("hasPixelSeed()",bool,doc="has pixel seed"), | ||
Comment on lines
203
to
204
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we improve the self documentation ? i.e. the doc string electronVeto : to add "analysis not sensitive to electron -> photon fake rate" see information in the wiki https://twiki.cern.ch/twiki/bin/viewauth/CMS/CutBasedPhotonIdentificationRun2 |
||
mvaID = Var("userFloat('mvaID')",float,doc="MVA ID score, Fall17V2",precision=10), | ||
mvaID_Fall17V1p1 = Var("userFloat('mvaID_Fall17V1p1')",float,doc="MVA ID score, Fall17V1p1",precision=10), | ||
mvaID_WP90 = Var("userInt('mvaID_WP90')",bool,doc="MVA ID WP90, Fall17V2"), | ||
mvaID_WP80 = Var("userInt('mvaID_WP80')",bool,doc="MVA ID WP80, Fall17V2"), | ||
pfPhoIso03 = Var("photonIso()",float,doc="PF absolute isolation dR=0.3, photon component (uncorrected)"), | ||
pfChargedIsoPFPV = Var("chargedHadronPFPVIso()",float,doc="PF absolute isolation dR=0.3, charged component (PF PV only)"), | ||
pfChargedIsoWorstVtx = Var("chargedHadronWorstVtxIso()",float,doc="PF absolute isolation dR=0.3, charged component (Vertex with largest isolation)"), | ||
pfRelIso03_chg = Var("userFloat('PFIsoChg')/pt",float,doc="PF relative isolation dR=0.3, charged component (with rho*EA PU corrections)"), | ||
pfRelIso03_all = Var("userFloat('PFIsoAll')/pt",float,doc="PF relative isolation dR=0.3, total (with rho*EA PU corrections)"), | ||
hoe = Var("hadronicOverEm()",float,doc="H over E",precision=8), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hoe = Var("hadronicOverEm()",float,doc="H over E",precision=8), We should update with the right one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In run 2 the H/E variable used in IDs is indeed hadTowOverEm() (tower based H/E), while for Run 3 we are planning to move to the cone based H/E, ie hadronicOverEm() (the one you are talking about), so probably we should keep it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can have both Run2 and Run3 right
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. does this duality hadTowOverEm() vs hadronicOverEm() exist also for the electrons ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, for electrons we do not need hadTowOverEm(): the ID cuts on hadronicOverEm(), which is the one included |
||
isScEtaEB = Var("abs(superCluster().eta()) < 1.4442",bool,doc="is supercluster eta within barrel acceptance"), | ||
isScEtaEE = Var("abs(superCluster().eta()) > 1.566 && abs(superCluster().eta()) < 2.5",bool,doc="is supercluster eta within endcap acceptance"), | ||
seedGain = Var("userInt('seedGain')","uint8",doc="Gain of the seed crystal"), | ||
# position of photon is best approximated by position of seed cluster, not the SC centroid | ||
x_calo = Var("superCluster().seed().position().x()",float,doc="photon supercluster position on calorimeter, x coordinate (cm)",precision=10), | ||
y_calo = Var("superCluster().seed().position().y()",float,doc="photon supercluster position on calorimeter, y coordinate (cm)",precision=10), | ||
z_calo = Var("superCluster().seed().position().z()",float,doc="photon supercluster position on calorimeter, z coordinate (cm)",precision=10), | ||
# ES variables | ||
esEffSigmaRR = Var("full5x5_showerShapeVariables().effSigmaRR()", float, doc="preshower sigmaRR"), | ||
esEnergyOverRawE = Var("superCluster().preshowerEnergy()/superCluster().rawEnergy()", float, doc="ratio of preshower energy to raw supercluster energy"), | ||
) | ||
) | ||
|
||
|
@@ -217,6 +231,7 @@ def make_bitmapVID_docstring(id_modules_working_points_pset): | |
pt = Var("pt*userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')", float, precision=-1, doc="p_{T}"), | ||
energyErr = Var("userFloat('ecalEnergyErrPostCorrNew')",float,doc="energy error of the cluster from regression",precision=6), | ||
eCorr = Var("userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')",float,doc="ratio of the calibrated energy/miniaod energy"), | ||
hoe = Var("hadTowOverEm()",float,doc="H over E (Run2)",precision=8), | ||
) | ||
|
||
#these eras have the energy correction in the mini | ||
|
@@ -331,14 +346,12 @@ def make_bitmapVID_docstring(id_modules_working_points_pset): | |
(run3_nanoAOD_devel).toModify(slimmedPhotonsWithUserData.userInts, | ||
VIDNestedWPBitmap = None,) | ||
(run3_nanoAOD_devel).toModify(slimmedPhotonsWithUserData.userFloats, | ||
mvaID = None, | ||
mvaID_Fall17V1p1 = None) | ||
mvaID = None) | ||
(run3_nanoAOD_devel).toModify(photonTable.variables, | ||
cutBased = None, | ||
cutBased_Fall17V1Bitmap = None, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also the cutBased_Fall17V1 can be removed, no ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, I missed it while rebasing, pushing now |
||
vidNestedWPBitmap = None, | ||
mvaID = None, | ||
mvaID_Fall17V1p1 = None, | ||
mvaID_WP90 = None, | ||
mvaID_WP80 = None, | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to save little more space: CandVars can be moved to P3vars