test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFBRECO_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # getting the ptrs
4 from RecoParticleFlow.PFProducer.pfLinker_cff import particleFlowPtrs
5 
8 pfPileUpIsoPFBRECO = pfPileUp.clone( PFCandidates = 'particleFlowPtrs' )
9 pfNoPileUpIsoPFBRECO = pfNoPileUp.clone( topCollection = 'pfPileUpIsoPFBRECO',
10  bottomCollection = 'particleFlowPtrs')
11 pfNoPileUpIsoPFBRECOSequence = cms.Sequence(
12  pfPileUpIsoPFBRECO +
13  pfNoPileUpIsoPFBRECO
14  )
15 
17 
18 pfPileUpPFBRECO = pfPileUp.clone( PFCandidates = 'particleFlowPtrs' )
19 pfNoPileUpPFBRECO = pfNoPileUp.clone( topCollection = 'pfPileUpPFBRECO',
20  bottomCollection = 'particleFlowPtrs')
21 pfNoPileUpPFBRECOSequence = cms.Sequence(
22  pfPileUpPFBRECO +
23  pfNoPileUpPFBRECO
24  )
25 
27 pfAllNeutralHadronsPFBRECO = pfAllNeutralHadrons.clone( src = 'pfNoPileUpIsoPFBRECO' )
29 pfAllChargedHadronsPFBRECO = pfAllChargedHadrons.clone( src = 'pfNoPileUpIsoPFBRECO' )
31 pfAllPhotonsPFBRECO = pfAllPhotons.clone( src = 'pfNoPileUpIsoPFBRECO' )
33 pfAllMuonsPFBRECO = pfAllMuons.clone( src = 'pfNoPileUpPFBRECO' )
34 pfAllMuonsClonesPFBRECO = pfAllMuonsClones.clone( src = 'pfAllMuonsPFBRECO' )
36 pfAllElectronsPFBRECO = pfAllElectrons.clone( src = 'pfNoMuonPFBRECO' )
37 pfAllElectronsClonesPFBRECO = pfAllElectronsClones.clone( src = 'pfAllElectronsPFBRECO' )
39 pfAllChargedParticlesPFBRECO = pfAllChargedParticles.clone( src = 'pfNoPileUpIsoPFBRECO' )
41 pfAllNeutralHadronsAndPhotonsPFBRECO = pfAllNeutralHadronsAndPhotons.clone( src = 'pfNoPileUpIsoPFBRECO' )
42 pfPileUpAllChargedParticlesPFBRECO = pfAllChargedParticles.clone( src = 'pfPileUpIsoPFBRECO' )
43 pfSortByTypePFBRECOSequence = cms.Sequence(
44  pfAllNeutralHadronsPFBRECO+
45  pfAllChargedHadronsPFBRECO+
46  pfAllPhotonsPFBRECO+
47  # charged hadrons + electrons + muons
48  pfAllChargedParticlesPFBRECO+
49  # same, but from pile up
50  pfPileUpAllChargedParticlesPFBRECO+
51  pfAllNeutralHadronsAndPhotonsPFBRECO
52 # +
53 # pfAllElectronsPFBRECO+
54 # pfAllMuonsPFBRECO
55  )
56 
57 pfParticleSelectionPFBRECOSequence = cms.Sequence(
58  pfNoPileUpIsoPFBRECOSequence +
59  # In principle JME sequence should go here, but this is used in RECO
60  # in addition to here, and is used in the "first-step" PF process
61  # so needs to go later.
62  #pfNoPileUpJMESequence +
63  pfNoPileUpPFBRECOSequence +
64  pfSortByTypePFBRECOSequence
65  )
66 
68 pfSelectedPhotonsPFBRECO = pfSelectedPhotons.clone( src = 'pfAllPhotonsPFBRECO' )
71 pfIsolatedPhotonsPFBRECO = pfIsolatedPhotons.clone( src = 'pfSelectedPhotonsPFBRECO',
72  isolationValueMapsCharged = cms.VInputTag( cms.InputTag("phPFIsoValueCharged04PFIdPFBRECO") ),
73  isolationValueMapsNeutral = cms.VInputTag( cms.InputTag("phPFIsoValueNeutral04PFIdPFBRECO"),
74  cms.InputTag("phPFIsoValueGamma04PFIdPFBRECO") ),
75  deltaBetaIsolationValueMap = 'phPFIsoValuePU04PFIdPFBRECO' )
76 pfPhotonPFBRECOSequence = cms.Sequence(
77  pfSelectedPhotonsPFBRECO +
78  pfPhotonIsolationPFBRECOSequence +
79  # selecting isolated photons:
80  pfIsolatedPhotonsPFBRECO
81  )
82 
84 pfMuonsFromVertexPFBRECO = pfMuonsFromVertex.clone( src = 'pfAllMuonsPFBRECO' )
86 pfIsolatedMuonsPFBRECO = pfIsolatedMuons.clone( src = 'pfMuonsFromVertexPFBRECO' )
87 pfMuonsPFBRECO = pfIsolatedMuonsPFBRECO.clone(cut = cms.string("pt > 5 & muonRef.isAvailable()"))
88 pfMuonPFBRECOSequence = cms.Sequence(
89  pfAllMuonsPFBRECO +
90  pfMuonsFromVertexPFBRECO +
91  pfIsolatedMuonsPFBRECO+
92  pfMuonsPFBRECO
93  )
94 
96 pfElectronsFromVertexPFBRECO = pfElectronsFromVertex.clone( src = 'pfAllElectronsPFBRECO' )
98 pfIsolatedElectronsPFBRECO = pfIsolatedElectrons.clone( src = 'pfElectronsFromVertexPFBRECO' )
99 pfElectronsPFBRECO = pfIsolatedElectronsPFBRECO.clone( cut = cms.string(" pt > 5 & gsfElectronRef.isAvailable() & gsfTrackRef.hitPattern().numberOfLostHits('MISSING_INNER_HITS')<2"))
100 pfElectronPFBRECOSequence = cms.Sequence(
101  pfAllElectronsPFBRECO +
102  pfElectronsFromVertexPFBRECO +
103  pfIsolatedElectronsPFBRECO +
104  pfElectronsPFBRECO
105  )
106 
107 from CommonTools.ParticleFlow.Tools.jetTools import jetAlgo
108 pfJetsPFBRECO = jetAlgo('AK4')
109 pfJetsPFBRECO.src = 'pfNoElectronJMEPFBRECO'
110 pfJetsPtrsPFBRECO = cms.EDProducer("PFJetFwdPtrProducer",
111  src=cms.InputTag("pfJetsPFBRECO")
112  )
113 pfJetPFBRECOSequence = cms.Sequence(
114  pfJetsPFBRECO +
115  pfJetsPtrsPFBRECO
116  )
117 
119 
121 pfMETPFBRECO = pfMET.clone( jets = 'pfJetsPFBRECO' )
122 
123 ##delta beta weighting
124 #from CommonTools.ParticleFlow.deltaBetaWeights_cfi import *
125 #pfWeightedPhotonsPFBRECO = pfWeightedPhotons.clone( src = 'pfAllPhotonsPFBRECO',
126  #chargedFromPV = 'pfAllChargedParticlesPFBRECO',
127  #chargedFromPU = 'pfPileUpAllChargedParticlesPFBRECO' )
128 #pfWeightedNeutralHadronsPFBRECO = pfWeightedNeutralHadrons.clone( src = 'pfAllNeutralHadronsPFBRECO',
129  #chargedFromPV = 'pfAllChargedParticlesPFBRECO',
130  #chargedFromPU = 'pfPileUpAllChargedParticlesPFBRECO' )
131 #pfDeltaBetaWeightingPFBRECOSequence = cms.Sequence(pfWeightedPhotonsPFBRECO+pfWeightedNeutralHadronsPFBRECO)
132 
133 # sequential top projection cleaning
135 pfNoMuonPFBRECO = pfNoMuon.clone( topCollection = 'pfIsolatedMuonsPFBRECO',
136  bottomCollection = 'pfNoPileUpPFBRECO' )
137 pfNoMuonJMEPFBRECO = pfNoMuonJME.clone( topCollection = 'pfIsolatedMuonsPFBRECO' )
139 pfNoElectronPFBRECO = pfNoElectron.clone( topCollection = 'pfIsolatedElectronsPFBRECO',
140  bottomCollection = 'pfNoMuonPFBRECO' )
141 pfNoElectronJMEPFBRECO = pfNoElectronJME.clone( topCollection = 'pfIsolatedElectronsPFBRECO',
142  bottomCollection = 'pfNoMuonJMEPFBRECO' )
143 pfNoElectronJMEClonesPFBRECO = pfNoElectronJMEClones.clone( src = 'pfNoElectronJMEPFBRECO' )
145 pfNoJetPFBRECO = pfNoJet.clone( topCollection = 'pfJetsPtrsPFBRECO',
146  bottomCollection = 'pfNoElectronJMEPFBRECO' )
148 pfNoTauPFBRECO = pfNoTau.clone ( bottomCollection = 'pfJetsPtrsPFBRECO' )
149 pfNoTauClonesPFBRECO = pfNoTauClones.clone ( src = 'pfNoTauPFBRECO' )
150 
151 # generator tools
153 
154 PFBRECO = cms.Sequence(
155  particleFlowPtrs +
156  pfParticleSelectionPFBRECOSequence +
157  pfNoPileUpJMESequence +
158 # pfDeltaBetaWeightingPFBRECOSequence +
159  pfPhotonPFBRECOSequence +
160  pfMuonPFBRECOSequence +
161  pfNoMuonPFBRECO +
162  pfNoMuonJMEPFBRECO +
163  pfElectronPFBRECOSequence +
164  pfNoElectronPFBRECO +
165  pfNoElectronJMEPFBRECO +
166  pfNoElectronJMEClonesPFBRECO+
167  pfJetPFBRECOSequence +
168  pfNoJetPFBRECO +
169  pfTauSequence +
170  pfNoTauPFBRECO +
171  pfMETPFBRECO
172  )
def jetAlgo
Definition: jetTools.py:3