Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:00

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from PhysicsTools.PatAlgos.mcMatchLayer0.ootPhotonMatch_cff import *
0004 from PhysicsTools.PatAlgos.producersLayer1.photonProducer_cfi import *
0005 
0006 patOOTPhotons = patPhotons.clone()
0007 patOOTPhotons.photonSource = cms.InputTag("ootPhotons")
0008 patOOTPhotons.embedSuperCluster      = cms.bool(False) ## whether to embed in AOD externally stored supercluster
0009 patOOTPhotons.embedSeedCluster       = cms.bool(False) ## embed in AOD externally stored the photon's seedcluster 
0010 patOOTPhotons.embedBasicClusters     = cms.bool(False) ## embed in AOD externally stored the photon's basic clusters 
0011 patOOTPhotons.embedPreshowerClusters = cms.bool(False) ## embed in AOD externally stored the photon's preshower clusters 
0012 patOOTPhotons.embedRecHits           = cms.bool(False) ## embed in AOD externally stored the RecHits - can be called from the PATPhotonProducer 
0013     
0014 patOOTPhotons.isoDeposits = cms.PSet()
0015 patOOTPhotons.isolationValues = cms.PSet()
0016 
0017 # photon ID
0018 patOOTPhotons.addPhotonID = cms.bool(False)
0019 patOOTPhotons.photonIDSources = cms.PSet()
0020 
0021 # mc matching
0022 patOOTPhotons.addGenMatch = cms.bool(True)
0023 patOOTPhotons.embedGenMatch = cms.bool(False)
0024 
0025 # efficiencies
0026 patOOTPhotons.addEfficiencies = cms.bool(False)
0027 patOOTPhotons.efficiencies    = cms.PSet()
0028 
0029 # resolutions
0030 patOOTPhotons.addResolutions  = cms.bool(False)
0031 patOOTPhotons.resolutions     = cms.PSet()
0032 
0033 # Puppi Iso
0034 patOOTPhotons.addPuppiIsolation = cms.bool(False)
0035 
0036 # PFClusterIso
0037 patOOTPhotons.addPFClusterIso = cms.bool(False)
0038 
0039 # MC Match
0040 patOOTPhotons.genParticleMatch = cms.InputTag("ootPhotonMatch") ## particles source to be used for the matching
0041 
0042 ## for scheduled mode
0043 
0044 makePatOOTPhotonsTask = cms.Task(
0045     ootPhotonMatch,
0046     patOOTPhotons
0047     )
0048 
0049 makePatOOTPhotons = cms.Sequence(makePatOOTPhotonsTask)
0050 
0051 ## For legacy reprocessing
0052 from RecoEgamma.EgammaPhotonProducers.ootPhotonSequence_cff import *
0053 from RecoEgamma.EgammaIsolationAlgos.pfClusterIsolation_cfi import ootPhotonEcalPFClusterIsolationProducer
0054 
0055 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
0056 run2_miniAOD_80XLegacy.toReplaceWith(makePatOOTPhotonsTask, cms.Task(
0057                                      ootPhotonTask,
0058                                      ootPhotonEcalPFClusterIsolationProducer,
0059                                      makePatOOTPhotonsTask.copy()
0060                                      ))
0061 #the OOT are made from scratch in re-miniAOD 
0062 #we could put the PFCluster isolation in there when we initially make them
0063 #but decided to emulate what is done in 80X where the the isolation is only put 
0064 #into the pat object and value maps are saved
0065 #hence we need to have the source to be ootPhotons not ootPhotonsTmp
0066 run2_miniAOD_80XLegacy.toModify(ootPhotonEcalPFClusterIsolationProducer,candidateProducer = cms.InputTag('ootPhotons') )
0067 
0068 run2_miniAOD_80XLegacy.toModify(patOOTPhotons, addPFClusterIso = cms.bool(True),ecalPFClusterIsoMap = cms.InputTag("reducedEgamma", "ootPhoEcalPFClusIso"),hcalPFClusterIsoMap = cms.InputTag("") )
0069