CMS 3D CMS Logo

ootPhotonProducer_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 patOOTPhotons = patPhotons.clone()
7 patOOTPhotons.photonSource = cms.InputTag("ootPhotons")
8 patOOTPhotons.embedSuperCluster = cms.bool(False) ## whether to embed in AOD externally stored supercluster
9 patOOTPhotons.embedSeedCluster = cms.bool(False) ## embed in AOD externally stored the photon's seedcluster
10 patOOTPhotons.embedBasicClusters = cms.bool(False) ## embed in AOD externally stored the photon's basic clusters
11 patOOTPhotons.embedPreshowerClusters = cms.bool(False) ## embed in AOD externally stored the photon's preshower clusters
12 patOOTPhotons.embedRecHits = cms.bool(False) ## embed in AOD externally stored the RecHits - can be called from the PATPhotonProducer
13 
14 patOOTPhotons.isoDeposits = cms.PSet()
15 patOOTPhotons.isolationValues = cms.PSet()
16 
17 # photon ID
18 patOOTPhotons.addPhotonID = cms.bool(False)
19 patOOTPhotons.photonIDSources = cms.PSet()
20 
21 # mc matching
22 patOOTPhotons.addGenMatch = cms.bool(True)
23 patOOTPhotons.embedGenMatch = cms.bool(False)
24 
25 # efficiencies
26 patOOTPhotons.addEfficiencies = cms.bool(False)
27 patOOTPhotons.efficiencies = cms.PSet()
28 
29 # resolutions
30 patOOTPhotons.addResolutions = cms.bool(False)
31 patOOTPhotons.resolutions = cms.PSet()
32 
33 # Puppi Iso
34 patOOTPhotons.addPuppiIsolation = cms.bool(False)
35 
36 # PFClusterIso
37 patOOTPhotons.addPFClusterIso = cms.bool(True)
38 patOOTPhotons.ecalPFClusterIsoMap = cms.InputTag("reducedEgamma", "ootPhoEcalPFClusIso")
39 patOOTPhotons.hcalPFClusterIsoMap = cms.InputTag("reducedEgamma", "ootPhoHcalPFClusIso")
40 
41 # MC Match
42 patOOTPhotons.genParticleMatch = cms.InputTag("ootPhotonMatch") ## particles source to be used for the matching
43 
44 ## for scheduled mode
45 
46 makePatOOTPhotonsTask = cms.Task(
47  ootPhotonMatch,
48  patOOTPhotons
49  )
50 
51 makePatOOTPhotons = cms.Sequence(makePatOOTPhotonsTask)
52 
53 ## For legacy reprocessing
55 from RecoEgamma.EgammaIsolationAlgos.pfClusterIsolation_cfi import ootPhotonEcalPFClusterIsolationProducer
56 
57 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
58 run2_miniAOD_80XLegacy.toReplaceWith(makePatOOTPhotonsTask, cms.Task(
59  ootPhotonTask,
60  ootPhotonEcalPFClusterIsolationProducer,
61  makePatOOTPhotonsTask.copy()
62  ))
63 
64 run2_miniAOD_80XLegacy.toModify(patOOTPhotons, hcalPFClusterIsoMap = "")
For legacy reprocessing.