Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:24:58

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #
0004 # sequence to make photons from clusters in ECAL
0005 #
0006 # photon producer
0007 from RecoEgamma.EgammaPhotonProducers.gedPhotonCore_cfi import *
0008 from RecoEgamma.EgammaPhotonProducers.gedPhotons_cfi import *
0009 
0010 import RecoEgamma.EgammaPhotonProducers.gedPhotons_cfi 
0011 
0012 gedPhotonsTmp = RecoEgamma.EgammaPhotonProducers.gedPhotons_cfi.gedPhotons.clone(
0013     photonProducer         = "gedPhotonCore",
0014     candidateP4type        = "fromEcalEnergy",
0015     outputPhotonCollection = "",
0016     reconstructionStep     = "tmp",
0017     #Photon PFID DNN model configuration
0018     PhotonDNNPFid = dict(
0019         modelsFiles = [ "RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/Run3Summer21_120X/EB/barrel_modelDNN.pb",
0020                         "RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/Run3Summer21_120X/EE/endcap_modelDNN.pb"],
0021         scalersFiles = [
0022                     "RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/Run3Summer21_120X/EB/barrel_scaler.txt",
0023                     "RecoEgamma/PhotonIdentification/data/Photon_PFID_dnn/Run3Summer21_120X/EE/endcap_scaler.txt"]
0024     )
0025 )
0026 del gedPhotonsTmp.regressionConfig
0027 
0028 gedPhotonTaskTmp = cms.Task(gedPhotonCore, gedPhotonsTmp)
0029 gedPhotonSequenceTmp = cms.Sequence(gedPhotonTaskTmp)
0030 
0031 gedPhotons = RecoEgamma.EgammaPhotonProducers.gedPhotons_cfi.gedPhotons.clone(
0032     photonProducer         = "gedPhotonsTmp",
0033     outputPhotonCollection = "",
0034     reconstructionStep     = "final",
0035     pfECALClusIsolation    = cms.InputTag("photonEcalPFClusterIsolationProducer"),
0036     pfHCALClusIsolation    = cms.InputTag("photonHcalPFClusterIsolationProducer"),
0037     pfIsolCfg = cms.PSet(
0038         chargedHadronIso = cms.InputTag("photonIDValueMaps","phoChargedIsolation"),
0039         neutralHadronIso = cms.InputTag("photonIDValueMaps","phoNeutralHadronIsolation"),
0040         photonIso        = cms.InputTag("photonIDValueMaps","phoPhotonIsolation"),
0041         chargedHadronWorstVtxIso = cms.InputTag("photonIDValueMaps","phoWorstChargedIsolation"),
0042         chargedHadronWorstVtxGeomVetoIso = cms.InputTag("photonIDValueMaps","phoWorstChargedIsolationConeVeto"),
0043         chargedHadronPFPVIso     = cms.InputTag("egmPhotonIsolationCITK:h+-DR030-"),
0044         ),
0045 )
0046 gedPhotonTask    = cms.Task(gedPhotons)
0047 gedPhotonSequence    = cms.Sequence(gedPhotonTask)
0048 
0049 from Configuration.ProcessModifiers.egamma_lowPt_exclusive_cff import egamma_lowPt_exclusive
0050 egamma_lowPt_exclusive.toModify(gedPhotons,
0051                            minSCEtBarrel = 1.0,
0052                            minSCEtEndcap = 1.0)
0053 egamma_lowPt_exclusive.toModify(gedPhotonsTmp,
0054                            minSCEtBarrel = 1.0,
0055                            minSCEtEndcap = 1.0)
0056 
0057 
0058 # Activate the Egamma PFID dnn only for Run3
0059 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0060 run3_common.toModify(gedPhotonsTmp.PhotonDNNPFid,
0061     enabled = True
0062 )