CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gedPhotonSequence_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #
4 # sequence to make photons from clusters in ECAL
5 #
6 # photon producer
9 
11 
12 gedPhotonsTmp = RecoEgamma.EgammaPhotonProducers.gedPhotons_cfi.gedPhotons.clone(
13  photonProducer = "gedPhotonCore",
14  candidateP4type = "fromEcalEnergy",
15  outputPhotonCollection = "",
16  reconstructionStep = "tmp",
17  #Photon PFID DNN model configuration
18  PhotonDNNPFid = dict(
19  modelsFiles = [ "RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/Run3Summer21_120X/EB/barrel_modelDNN.pb",
20  "RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/Run3Summer21_120X/EE/endcap_modelDNN.pb"],
21  scalersFiles = [
22  "RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/Run3Summer21_120X/EB/barrel_scaler.txt",
23  "RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/Run3Summer21_120X/EE/endcap_scaler.txt"]
24  )
25 )
26 del gedPhotonsTmp.regressionConfig
27 
28 gedPhotonTaskTmp = cms.Task(gedPhotonCore, gedPhotonsTmp)
29 gedPhotonSequenceTmp = cms.Sequence(gedPhotonTaskTmp)
30 
31 gedPhotons = RecoEgamma.EgammaPhotonProducers.gedPhotons_cfi.gedPhotons.clone(
32  photonProducer = "gedPhotonsTmp",
33  outputPhotonCollection = "",
34  reconstructionStep = "final",
35  pfECALClusIsolation = cms.InputTag("photonEcalPFClusterIsolationProducer"),
36  pfHCALClusIsolation = cms.InputTag("photonHcalPFClusterIsolationProducer"),
37  pfIsolCfg = cms.PSet(
38  chargedHadronIso = cms.InputTag("photonIDValueMaps","phoChargedIsolation"),
39  neutralHadronIso = cms.InputTag("photonIDValueMaps","phoNeutralHadronIsolation"),
40  photonIso = cms.InputTag("photonIDValueMaps","phoPhotonIsolation"),
41  chargedHadronWorstVtxIso = cms.InputTag("photonIDValueMaps","phoWorstChargedIsolation"),
42  chargedHadronWorstVtxGeomVetoIso = cms.InputTag("photonIDValueMaps","phoWorstChargedIsolationConeVeto"),
43  chargedHadronPFPVIso = cms.InputTag("egmPhotonIsolationCITK:h+-DR030-"),
44  ),
45 )
46 gedPhotonTask = cms.Task(gedPhotons)
47 gedPhotonSequence = cms.Sequence(gedPhotonTask)
48 
49 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
50 egamma_lowPt_exclusive.toModify(gedPhotons,
51  minSCEtBarrel = 1.0,
52  minSCEtEndcap = 1.0)
53 egamma_lowPt_exclusive.toModify(gedPhotonsTmp,
54  minSCEtBarrel = 1.0,
55  minSCEtEndcap = 1.0)
56 
57 
58 # Activate the Egamma PFID dnn only for Run3
59 from Configuration.Eras.Modifier_run3_common_cff import run3_common
60 run3_common.toModify(gedPhotonsTmp.PhotonDNNPFid,
61  enabled = True
62 )