diff --git a/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py b/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py index 85e17b26b78fb..9c39b40f52930 100644 --- a/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py +++ b/PhysicsTools/NanoAOD/python/nanoDQM_cfi.py @@ -599,6 +599,7 @@ NoPlot('electronIdx'), Plot1D('electronVeto', 'electronVeto', 2, -0.5, 1.5, 'pass electron veto'), Plot1D('energyErr', 'energyErr', 20, 0, 300, 'energy error of the cluster from regression'), + Plot1D('energyRaw', 'energyRaw', 100, 0, 300, 'raw energy of photon supercluster'), Plot1D('eta', 'eta', 20, -3, 3, 'eta'), Plot1D('genPartFlav', 'genPartFlav', 14, -0.5, 13.5, 'Flavour of genParticle for MC matching to status==1 photons or electrons: 1 = prompt photon, 13 = prompt electron, 0 = unknown or unmatched'), NoPlot('genPartIdx'), @@ -608,9 +609,11 @@ NoPlot('jetIdx'), NoPlot('mass'), Plot1D('mvaID', 'mvaID', 20, -1, 1, 'MVA ID score'), - Plot1D('mvaID_Fall17V1p1', 'mvaID_Fall17V1p1', 20, -1, 1, 'MVA ID score, Fall17V1p1'), Plot1D('mvaID_WP80', 'mvaID_WP80', 2, -0.5, 1.5, 'MVA ID WP80'), Plot1D('mvaID_WP90', 'mvaID_WP90', 2, -0.5, 1.5, 'MVA ID WP90'), + Plot1D('pfPhoIso03', 'pfPhoIso03', 100, 0, 1, 'PF absolute isolation dR=0.3, photon component (uncorrected)'), + Plot1D('pfChargedIsoPFPV', 'pfChargedIsoPFPV', 100, 0, 5, 'PF absolute isolation dR=0.3, charged component (PF PV only)'), + Plot1D('pfChargedIsoWorstVtx', 'pfChargedIsoWorstVtx', 100, 0, 10,'PF absolute isolation dR=0.3, charged component (Vertex with largest isolation)'), Plot1D('pdgId', 'pdgId', 1, 21.5, 22.5, 'PDG code assigned by the event reconstruction (not by MC truth)'), Plot1D('pfRelIso03_all', 'pfRelIso03_all', 20, 0, 2, 'PF relative isolation dR=0.3, total (with rho*EA PU corrections)'), Plot1D('pfRelIso03_chg', 'pfRelIso03_chg', 20, 0, 2, 'PF relative isolation dR=0.3, charged component (with rho*EA PU corrections)'), @@ -619,11 +622,21 @@ Plot1D('pt', 'pt', 20, 0, 200, 'pt (corrected)'), Plot1D('r9', 'r9', 20, 0, 1.1, 'R9 of the supercluster, calculated with full 5x5 region'), Plot1D('seedGain', 'seedGain', 12, 0.5, 12.5, 'Gain of the seed crystal'), - Plot1D('sieie', 'sieie', 20, 0, 0.05, 'sigma_IetaIeta of the supercluster, calculated with full 5x5 region'), + Plot1D('sieie', 'sieie', 100, 0, 0.05, 'sigma_IetaIeta of the supercluster, calculated with full 5x5 region'), + Plot1D('sipip', 'sipip', 100, 0, 0.05, 'sigmaIphiIphi of the supercluster'), + Plot1D('sieip', 'sieip', 100, -0.0002, 0.0002, 'sigma_IetaIphi of the supercluster, calculated with full 5x5 region'), + Plot1D('s4', 's4', 100, 0.4, 1, 'e2x2/e5x5 of the supercluster, calculated with full 5x5 region'), + Plot1D('etaWidth', 'etaWidth', 100, 0, 0.03, 'Width of the photon supercluster in eta'), + Plot1D('phiWidth', 'phiWidth', 100, 0, 0.1, 'Width of the photon supercluster in phi'), Plot1D('dEscaleUp', 'dEscaleUp', 100, -0.01, 0.01, '#Delta E scaleUp'), Plot1D('dEscaleDown', 'dEscaleDown', 100, -0.01, 0.01, '#Delta E scaleDown'), Plot1D('dEsigmaUp', 'dEsigmaUp', 100, -0.1, 0.1, '#Delta E sigmaUp'), Plot1D('dEsigmaDown', 'dEsigmaDown', 100, -0.1, 0.1, '#Delta E sigmaDown'), + Plot1D('x_calo', 'x_calo', 100, -150, 150, 'photon supercluster position on calorimeter, x coordinate (cm)'), + Plot1D('y_calo', 'y_calo', 100, -150, 150, 'photon supercluster position on calorimeter, y coordinate (cm)'), + Plot1D('z_calo', 'z_calo', 100, -330, 330, 'photon supercluster position on calorimeter, y coordinate (cm)'), + Plot1D('esEffSigmaRR', 'esEffSigmaRR', 100, 0, 10, 'preshower sigmaRR'), + Plot1D('esEnergyOverRawE', 'esEnergyOverRawE', 100, 0, 0.2, 'ratio of preshower energy to raw supercluster energy'), NoPlot('vidNestedWPBitmap'), ) ), diff --git a/PhysicsTools/NanoAOD/python/photons_cff.py b/PhysicsTools/NanoAOD/python/photons_cff.py index 2383f6c5de7cc..090601f2c4c67 100644 --- a/PhysicsTools/NanoAOD/python/photons_cff.py +++ b/PhysicsTools/NanoAOD/python/photons_cff.py @@ -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"), 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), 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, vidNestedWPBitmap = None, mvaID = None, - mvaID_Fall17V1p1 = None, mvaID_WP90 = None, mvaID_WP80 = None, )