CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
photons_cff Namespace Reference

Functions

def make_bitmapVID_docstring
 

Variables

tuple _withSpring16V2p2_Task = cms.Task(bitmapVIDForPhoSpring16V2p2)
 
tuple _withUpdatePho_Task = cms.Task(egmPhotonIsolation,photonIDValueMapProducer,slimmedPhotonsTo106X)
 
tuple bitmapVIDForPho
 
tuple bitmapVIDForPhoSpring16V2p2
 
tuple calibratedPatPhotonsNano
 
tuple correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain")
 
 cutBased = None,
 
 cutBased_Fall17V1Bitmap = None,
 
tuple cutBased_Spring16V2p2
 
tuple dEscaleDown = Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energyScaleDownNew')", float, doc="ecal energy scale shifted 1 sigma down (adding gain/stat/syst in quadrature)", precision=8)
 
tuple dEscaleUp = Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energyScaleUpNew')", float, doc="ecal energy scale shifted 1 sigma up (adding gain/stat/syst in quadrature)", precision=8)
 adding 4 most imp scale & smearing variables to table More...
 
tuple dEsigmaDown = Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energySigmaDownNew')", float, doc="ecal energy smearing value shifted 1 sigma up", precision=8)
 
tuple dEsigmaUp = Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energySigmaUpNew')", float, doc="ecal energy smearing value shifted 1 sigma up", precision=8)
 
tuple EAFile_PFIso_Chg = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfChargedHadrons_90percentBased.txt")
 
tuple EAFile_PFIso_Neu = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased.txt")
 
tuple EAFile_PFIso_Pho = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfPhotons_90percentBased.txt")
 
tuple ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyErrPostCorr")
 
tuple ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyPostCorr")
 
tuple ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyPreCorr")
 
tuple eCorr = Var("userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')",float,doc="ratio of the calibrated energy/miniaod energy")
 
tuple energyErr = Var("userFloat('ecalEnergyErrPostCorrNew')",float,doc="energy error of the cluster from regression",precision=6)
 
tuple energyScaleDownNew = cms.InputTag("calibratedPatPhotonsNano","energyScaleDown")
 
tuple energyScaleUpNew = cms.InputTag("calibratedPatPhotonsNano","energyScaleUp")
 
tuple energySigmaDownNew = cms.InputTag("calibratedPatPhotonsNano","energySigmaDown")
 
tuple energySigmaUpNew = cms.InputTag("calibratedPatPhotonsNano","energySigmaUp")
 
tuple finalPhotons
 
tuple isoForPho
 
 mvaID = None,
 
 mvaID_Fall17V1p1 = None,
 
tuple mvaID_Spring16nonTrigV1
 
 mvaID_WP80 = None,
 
 mvaID_WP90 = None,
 
tuple photon_id_modules_WorkingPoints_nanoAOD
 
tuple photon_id_modules_WorkingPoints_nanoAOD_Spring16V2p2
 
tuple photonMCTable
 
tuple photonMCTask = cms.Task(photonsMCMatchForTable, photonMCTable)
 
tuple photonsMCMatchForTable
 
tuple photonTable
 
tuple photonTablesTask = cms.Task(photonTable)
 
tuple photonTask = cms.Task(bitmapVIDForPho, isoForPho, seedGainPho, calibratedPatPhotonsNano, slimmedPhotonsWithUserData, finalPhotons)
 
tuple pt = Var("pt*userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')", float, precision=-1, doc="p_{T}")
 
tuple seedGainPho = cms.EDProducer("PhotonSeedGainProducer", src = cms.InputTag("slimmedPhotons"))
 
tuple slimmedPhotonsTo106X
 
tuple slimmedPhotonsWithUserData
 
 VIDNestedWPBitmap = None,)
 TEMPORARY as no ID for Run3 yet. More...
 
 vidNestedWPBitmap = None,
 
tuple VIDNestedWPBitmap_Spring16V2p2 = cms.InputTag("bitmapVIDForPhoSpring16V2p2")
 
tuple vidNestedWPBitmap_Spring16V2p2
 

Function Documentation

def photons_cff.make_bitmapVID_docstring (   id_modules_working_points_pset)

Definition at line 32 of file photons_cff.py.

References reco.ceil(), DeadROC_duringRun.dir, join(), log, and submitPVValidationJobs.split().

32 
33 def make_bitmapVID_docstring(id_modules_working_points_pset):
34  pset = id_modules_working_points_pset
35 
36  for modname in pset.modules:
37  ids = __import__(modname, globals(), locals(), ['idName','cutFlow'])
38  for name in dir(ids):
39  _id = getattr(ids,name)
40  if hasattr(_id,'idName') and hasattr(_id,'cutFlow'):
41  if (len(pset.WorkingPoints)>0 and _id.idName == pset.WorkingPoints[0].split(':')[-1]):
42  cut_names = ','.join([cut.cutName.value() for cut in _id.cutFlow])
43  n_bits_per_cut = int(ceil(log(len(pset.WorkingPoints)+1,2)))
44  return 'VID compressed bitmap (%s), %d bits per cut'%(cut_names, n_bits_per_cut)
45  raise ValueError("Something is wrong in the photon ID modules parameter set!")
constexpr int32_t ceil(float num)
static std::vector< std::string > checklist log
def make_bitmapVID_docstring
Definition: photons_cff.py:32
static std::string join(char **cmd)
Definition: RemoteFile.cc:19

Variable Documentation

tuple photons_cff._withSpring16V2p2_Task = cms.Task(bitmapVIDForPhoSpring16V2p2)

Definition at line 353 of file photons_cff.py.

tuple photons_cff._withUpdatePho_Task = cms.Task(egmPhotonIsolation,photonIDValueMapProducer,slimmedPhotonsTo106X)

Definition at line 346 of file photons_cff.py.

tuple photons_cff.bitmapVIDForPho
Initial value:
1 = cms.EDProducer("PhoVIDNestedWPBitmapProducer",
2  src = cms.InputTag("slimmedPhotons"),
3  WorkingPoints = photon_id_modules_WorkingPoints_nanoAOD.WorkingPoints,
4 )

Definition at line 46 of file photons_cff.py.

tuple photons_cff.bitmapVIDForPhoSpring16V2p2
Initial value:
1 = cms.EDProducer("PhoVIDNestedWPBitmapProducer",
2  src = cms.InputTag("slimmedPhotons"),
3  WorkingPoints = photon_id_modules_WorkingPoints_nanoAOD_Spring16V2p2.WorkingPoints,
4 )

Definition at line 51 of file photons_cff.py.

tuple photons_cff.calibratedPatPhotonsNano
Initial value:
1 = RecoEgamma.EgammaTools.calibratedEgammas_cff.calibratedPatPhotons.clone(
2  produceCalibratedObjs = False,
3  correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain"),
4 )

Definition at line 78 of file photons_cff.py.

tuple photons_cff.correctionFile = cms.string("EgammaAnalysis/ElectronTools/data/ScalesSmearings/Run2016_UltraLegacy_preVFP_RunFineEtaR9Gain")

Definition at line 84 of file photons_cff.py.

photons_cff.cutBased = None,

Definition at line 333 of file photons_cff.py.

photons_cff.cutBased_Fall17V1Bitmap = None,

Definition at line 334 of file photons_cff.py.

tuple photons_cff.cutBased_Spring16V2p2
Initial value:
1 = Var(
2  "userInt('cutID_Spring16_loose')+userInt('cutID_Spring16_medium')+userInt('cutID_Spring16_tight')",
3  int,
4  doc="cut-based ID bitmap, Spring16V2p2, (0:fail, 1:loose, 2:medium, 3:tight)"
5  )

Definition at line 244 of file photons_cff.py.

tuple photons_cff.dEscaleDown = Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energyScaleDownNew')", float, doc="ecal energy scale shifted 1 sigma down (adding gain/stat/syst in quadrature)", precision=8)

Definition at line 305 of file photons_cff.py.

tuple photons_cff.dEscaleUp = Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energyScaleUpNew')", float, doc="ecal energy scale shifted 1 sigma up (adding gain/stat/syst in quadrature)", precision=8)

adding 4 most imp scale & smearing variables to table

Definition at line 304 of file photons_cff.py.

tuple photons_cff.dEsigmaDown = Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energySigmaDownNew')", float, doc="ecal energy smearing value shifted 1 sigma up", precision=8)

Definition at line 307 of file photons_cff.py.

tuple photons_cff.dEsigmaUp = Var("userFloat('ecalEnergyPostCorrNew') - userFloat('energySigmaUpNew')", float, doc="ecal energy smearing value shifted 1 sigma up", precision=8)

Definition at line 306 of file photons_cff.py.

tuple photons_cff.EAFile_PFIso_Chg = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfChargedHadrons_90percentBased.txt")

Definition at line 69 of file photons_cff.py.

tuple photons_cff.EAFile_PFIso_Neu = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased.txt")

Definition at line 70 of file photons_cff.py.

tuple photons_cff.EAFile_PFIso_Pho = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Spring16/effAreaPhotons_cone03_pfPhotons_90percentBased.txt")

Definition at line 71 of file photons_cff.py.

photons_cff.ecalEnergyErrPostCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyErrPostCorr")

Definition at line 150 of file photons_cff.py.

photons_cff.ecalEnergyPostCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyPostCorr")

Definition at line 152 of file photons_cff.py.

photons_cff.ecalEnergyPreCorrNew = cms.InputTag("calibratedPatPhotonsNano","ecalEnergyPreCorr")

Definition at line 151 of file photons_cff.py.

tuple photons_cff.eCorr = Var("userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')",float,doc="ratio of the calibrated energy/miniaod energy")

Definition at line 225 of file photons_cff.py.

tuple photons_cff.energyErr = Var("userFloat('ecalEnergyErrPostCorrNew')",float,doc="energy error of the cluster from regression",precision=6)

Definition at line 224 of file photons_cff.py.

photons_cff.energyScaleDownNew = cms.InputTag("calibratedPatPhotonsNano","energyScaleDown")

Definition at line 154 of file photons_cff.py.

photons_cff.energyScaleUpNew = cms.InputTag("calibratedPatPhotonsNano","energyScaleUp")

Definition at line 153 of file photons_cff.py.

photons_cff.energySigmaDownNew = cms.InputTag("calibratedPatPhotonsNano","energySigmaDown")

Definition at line 156 of file photons_cff.py.

photons_cff.energySigmaUpNew = cms.InputTag("calibratedPatPhotonsNano","energySigmaUp")

Definition at line 155 of file photons_cff.py.

tuple photons_cff.finalPhotons
Initial value:
1 = cms.EDFilter("PATPhotonRefSelector",
2  src = cms.InputTag("slimmedPhotonsWithUserData"),
3  cut = cms.string("pt > 5 ")
4 )

Definition at line 171 of file photons_cff.py.

tuple photons_cff.isoForPho
Initial value:
1 = cms.EDProducer("PhoIsoValueMapProducer",
2  src = cms.InputTag("slimmedPhotons"),
3  relative = cms.bool(False),
4  rho_PFIso = cms.InputTag("fixedGridRhoFastjetAll"),
5  mapIsoChg = cms.InputTag("photonIDValueMapProducer:phoChargedIsolation"),
6  mapIsoNeu = cms.InputTag("photonIDValueMapProducer:phoNeutralHadronIsolation"),
7  mapIsoPho = cms.InputTag("photonIDValueMapProducer:phoPhotonIsolation"),
8  EAFile_PFIso_Chg = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfChargedHadrons_90percentBased_V2.txt"),
9  EAFile_PFIso_Neu = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfNeutralHadrons_90percentBased_V2.txt"),
10  EAFile_PFIso_Pho = cms.FileInPath("RecoEgamma/PhotonIdentification/data/Fall17/effAreaPhotons_cone03_pfPhotons_90percentBased_V2.txt"),
11 )

Definition at line 56 of file photons_cff.py.

photons_cff.mvaID = None,

Definition at line 329 of file photons_cff.py.

photons_cff.mvaID_Fall17V1p1 = None,

Definition at line 330 of file photons_cff.py.

photons_cff.mvaID_Spring16nonTrigV1
Initial value:
1 = Var(
2  "userFloat('mvaID_Spring16nonTrigV1')",
3  float,
4  doc="MVA ID score, Spring16nonTrigV1",
5  precision=10
6  )

Definition at line 254 of file photons_cff.py.

photons_cff.mvaID_WP80 = None,

Definition at line 339 of file photons_cff.py.

photons_cff.mvaID_WP90 = None,

Definition at line 338 of file photons_cff.py.

tuple photons_cff.photon_id_modules_WorkingPoints_nanoAOD
Initial value:
1 = cms.PSet(
2  modules = cms.vstring(
3  'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V1_TrueVtx_cff',
4  'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Fall17_94X_V2_cff',
5  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V1p1_cff',
6  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Fall17_94X_V2_cff',
7  'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff',
8  'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff',
9  ),
10  WorkingPoints = cms.vstring(
11  "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-loose",
12  "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-medium",
13  "egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-tight",
14  )
15 )

Definition at line 8 of file photons_cff.py.

tuple photons_cff.photon_id_modules_WorkingPoints_nanoAOD_Spring16V2p2
Initial value:
1 = cms.PSet(
2  modules = photon_id_modules_WorkingPoints_nanoAOD.modules,
3  WorkingPoints = cms.vstring(
4  "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-loose",
5  "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-medium",
6  "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-tight",
7  )
8 )

Definition at line 23 of file photons_cff.py.

tuple photons_cff.photonMCTable
Initial value:
1 = cms.EDProducer("CandMCMatchTableProducer",
2  src = photonTable.src,
3  mcMap = cms.InputTag("photonsMCMatchForTable"),
4  objName = photonTable.name,
5  objType = photonTable.name, #cms.string("Photon"),
6  branchName = cms.string("genPart"),
7  docString = cms.string("MC matching to status==1 photons or electrons"),
8 )

Definition at line 274 of file photons_cff.py.

tuple photons_cff.photonMCTask = cms.Task(photonsMCMatchForTable, photonMCTable)

Definition at line 320 of file photons_cff.py.

tuple photons_cff.photonsMCMatchForTable
Initial value:
1 = cms.EDProducer("MCMatcher", # cut on deltaR, deltaPt/Pt; pick best by deltaR
2  src = photonTable.src, # final reco collection
3  matched = cms.InputTag("finalGenParticles"), # final mc-truth particle collection
4  mcPdgId = cms.vint32(11,22), # one or more PDG ID (11 = el, 22 = pho); absolute values (see below)
5  checkCharge = cms.bool(False), # True = require RECO and MC objects to have the same charge
6  mcStatus = cms.vint32(1), # PYTHIA status code (1 = stable, 2 = shower, 3 = hard scattering)
7  maxDeltaR = cms.double(0.3), # Minimum deltaR for the match
8  maxDPtRel = cms.double(0.5), # Minimum deltaPt/Pt for the match
9  resolveAmbiguities = cms.bool(True), # Forbid two RECO objects to match to the same GEN object
10  resolveByMatchQuality = cms.bool(True), # False = just match input in order; True = pick lowest deltaR pair first
11 )

Definition at line 262 of file photons_cff.py.

tuple photons_cff.photonTable

Definition at line 176 of file photons_cff.py.

tuple photons_cff.photonTablesTask = cms.Task(photonTable)

Definition at line 319 of file photons_cff.py.

tuple photons_cff.photonTask = cms.Task(bitmapVIDForPho, isoForPho, seedGainPho, calibratedPatPhotonsNano, slimmedPhotonsWithUserData, finalPhotons)

Definition at line 318 of file photons_cff.py.

tuple photons_cff.pt = Var("pt*userFloat('ecalEnergyPostCorrNew')/userFloat('ecalEnergyPreCorrNew')", float, precision=-1, doc="p_{T}")

Definition at line 223 of file photons_cff.py.

tuple photons_cff.seedGainPho = cms.EDProducer("PhotonSeedGainProducer", src = cms.InputTag("slimmedPhotons"))

Definition at line 74 of file photons_cff.py.

tuple photons_cff.slimmedPhotonsTo106X
Initial value:
1 = cms.EDProducer("ModifiedPhotonProducer",
2  src = cms.InputTag("slimmedPhotons"),
3  modifierConfig = cms.PSet( modifications = cms.VPSet(egamma9X105XUpdateModifier) )
4 )

Definition at line 285 of file photons_cff.py.

tuple photons_cff.slimmedPhotonsWithUserData
Initial value:
1 = cms.EDProducer("PATPhotonUserDataEmbedder",
2  src = cms.InputTag("slimmedPhotons"),
3  userFloats = cms.PSet(
4  mvaID = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRunIIFall17v2Values"),
5  mvaID_Fall17V1p1 = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRunIIFall17v1p1Values"),
6  mvaID_Spring16nonTrigV1 = cms.InputTag("photonMVAValueMapProducer:PhotonMVAEstimatorRun2Spring16NonTrigV1Values"),
7  PFIsoChg = cms.InputTag("isoForPho:PFIsoChg"),
8  PFIsoAll = cms.InputTag("isoForPho:PFIsoAll"),
9  ),
10  userIntFromBools = cms.PSet(
11  cutbasedID_loose = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-loose"),
12  cutbasedID_medium = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-medium"),
13  cutbasedID_tight = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V2-tight"),
14  mvaID_WP90 = cms.InputTag("egmPhotonIDs:mvaPhoID-RunIIFall17-v2-wp90"),
15  mvaID_WP80 = cms.InputTag("egmPhotonIDs:mvaPhoID-RunIIFall17-v2-wp80"),
16  cutbasedIDV1_loose = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-loose"),
17  cutbasedIDV1_medium = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-medium"),
18  cutbasedIDV1_tight = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Fall17-94X-V1-tight"),
19  cutID_Spring16_loose = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-loose"),
20  cutID_Spring16_medium = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-medium"),
21  cutID_Spring16_tight = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-tight"),
22  mvaID_Spring16nonTrigV1_WP90 = cms.InputTag("egmPhotonIDs:mvaPhoID-Spring16-nonTrig-V1-wp90"),
23  mvaID_Spring16nonTrigV1_WP80 = cms.InputTag("egmPhotonIDs:mvaPhoID-Spring16-nonTrig-V1-wp80"),
24  ),
25  userInts = cms.PSet(
26  VIDNestedWPBitmap = cms.InputTag("bitmapVIDForPho"),
27  seedGain = cms.InputTag("seedGainPho"),
28  )
29 )

Definition at line 117 of file photons_cff.py.

photons_cff.VIDNestedWPBitmap = None,)

TEMPORARY as no ID for Run3 yet.

Definition at line 327 of file photons_cff.py.

photons_cff.vidNestedWPBitmap = None,

Definition at line 335 of file photons_cff.py.

tuple photons_cff.VIDNestedWPBitmap_Spring16V2p2 = cms.InputTag("bitmapVIDForPhoSpring16V2p2")

Definition at line 239 of file photons_cff.py.

tuple photons_cff.vidNestedWPBitmap_Spring16V2p2
Initial value:
1 = Var(
2  "userInt('VIDNestedWPBitmap_Spring16V2p2')",
3  int,
4  doc="Spring16V2p2 " + make_bitmapVID_docstring(photon_id_modules_WorkingPoints_nanoAOD_Spring16V2p2)
5  )
def make_bitmapVID_docstring
Definition: photons_cff.py:32

Definition at line 249 of file photons_cff.py.