CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
jetMatch_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 #
4 # Example for a configuration of the MC match
5 #
6 patJetPartonMatch = cms.EDProducer("MCMatcher", # cut on deltaR, deltaPt/Pt; pick best by deltaR
7  src = cms.InputTag("ak4PFJetsCHS"), # RECO objects to match
8  matched = cms.InputTag("genParticles"), # mc-truth particle collection
9  mcPdgId = cms.vint32(1, 2, 3, 4, 5, 21), # one or more PDG ID (quarks except top; gluons)
10  mcStatus = cms.vint32(3,23), # PYTHIA6/Herwig++ status code (3 = hard scattering), 23 in Pythia8
11  checkCharge = cms.bool(False), # False = any value of the charge of MC and RECO is ok
12  maxDeltaR = cms.double(0.4), # Minimum deltaR for the match
13  maxDPtRel = cms.double(3.0), # Minimum deltaPt/Pt for the match
14  resolveAmbiguities = cms.bool(True), # Forbid two RECO objects to match to the same GEN object
15  resolveByMatchQuality = cms.bool(False), # False = just match input in order; True = pick lowest deltaR pair first
16 )
17 
18 patJetGenJetMatch = cms.EDProducer("GenJetMatcher", # cut on deltaR; pick best by deltaR
19  src = cms.InputTag("ak4PFJetsCHS"), # RECO jets (any View<Jet> is ok)
20  matched = cms.InputTag("ak4GenJets"), # GEN jets (must be GenJetCollection)
21  mcPdgId = cms.vint32(), # n/a
22  mcStatus = cms.vint32(), # n/a
23  checkCharge = cms.bool(False), # n/a
24  maxDeltaR = cms.double(0.4), # Minimum deltaR for the match
25  #maxDPtRel = cms.double(3.0), # Minimum deltaPt/Pt for the match (not used in GenJetMatcher)
26  resolveAmbiguities = cms.bool(True), # Forbid two RECO objects to match to the same GEN object
27  resolveByMatchQuality = cms.bool(False), # False = just match input in order; True = pick lowest deltaR pair first
28 )
29 
30 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
31 pp_on_AA.toModify(patJetGenJetMatch,
32  maxDeltaR = 0.4,
33  resolveByMatchQuality = True,
34  src = "akCs4PFJets",
35  )
36 
37 pp_on_AA.toModify(patJetPartonMatch, src = "akCs4PFJets")