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)
9 patOOTPhotons.embedSeedCluster = cms.bool(False)
10 patOOTPhotons.embedBasicClusters = cms.bool(False)
11 patOOTPhotons.embedPreshowerClusters = cms.bool(False)
12 patOOTPhotons.embedRecHits = cms.bool(False)
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(False)
38 
39 # MC Match
40 patOOTPhotons.genParticleMatch = cms.InputTag("ootPhotonMatch")
41 
42 
43 
44 makePatOOTPhotonsTask = cms.Task(
45  ootPhotonMatch,
46  patOOTPhotons
47  )
48 
49 makePatOOTPhotons = cms.Sequence(makePatOOTPhotonsTask)
50 
51 
53 from RecoEgamma.EgammaIsolationAlgos.pfClusterIsolation_cfi import ootPhotonEcalPFClusterIsolationProducer
54 
55 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff import run2_miniAOD_80XLegacy
56 run2_miniAOD_80XLegacy.toReplaceWith(makePatOOTPhotonsTask, cms.Task(
57  ootPhotonTask,
58  ootPhotonEcalPFClusterIsolationProducer,
59  makePatOOTPhotonsTask.copy()
60  ))
61 #the OOT are made from scratch in re-miniAOD
62 #we could put the PFCluster isolation in there when we initially make them
63 #but decided to emulate what is done in 80X where the the isolation is only put
64 #into the pat object and value maps are saved
65 #hence we need to have the source to be ootPhotons not ootPhotonsTmp
66 run2_miniAOD_80XLegacy.toModify(ootPhotonEcalPFClusterIsolationProducer,candidateProducer = cms.InputTag('ootPhotons') )
67 
68 run2_miniAOD_80XLegacy.toModify(patOOTPhotons, addPFClusterIso = cms.bool(True),ecalPFClusterIsoMap = cms.InputTag("reducedEgamma", "ootPhoEcalPFClusIso"),hcalPFClusterIsoMap = cms.InputTag("") )
69 
For legacy reprocessing.