Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:23:55

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #
0004 # Example for a configuration of the MC match
0005 #
0006 patJetPartonMatch = cms.EDProducer("MCMatcher",      # cut on deltaR, deltaPt/Pt; pick best by deltaR
0007     src         = cms.InputTag("ak4PFJetsCHS"),      # RECO objects to match
0008     matched     = cms.InputTag("genParticles"),      # mc-truth particle collection
0009     mcPdgId     = cms.vint32(1, 2, 3, 4, 5, 21),     # one or more PDG ID (quarks except top; gluons)
0010     mcStatus    = cms.vint32(3,23),                  # PYTHIA6/Herwig++ status code (3 = hard scattering), 23 in Pythia8
0011     checkCharge = cms.bool(False),                   # False = any value of the charge of MC and RECO is ok
0012     maxDeltaR   = cms.double(0.4),                   # Minimum deltaR for the match
0013     maxDPtRel   = cms.double(3.0),                   # Minimum deltaPt/Pt for the match
0014     resolveAmbiguities    = cms.bool(True),          # Forbid two RECO objects to match to the same GEN object
0015     resolveByMatchQuality = cms.bool(False),         # False = just match input in order; True = pick lowest deltaR pair first
0016 )
0017 
0018 patJetGenJetMatch = cms.EDProducer("GenJetMatcher",  # cut on deltaR; pick best by deltaR
0019     src         = cms.InputTag("ak4PFJetsCHS"),      # RECO jets (any View<Jet> is ok)
0020     matched     = cms.InputTag("ak4GenJets"),        # GEN jets  (must be GenJetCollection)
0021     mcPdgId     = cms.vint32(),                      # n/a
0022     mcStatus    = cms.vint32(),                      # n/a
0023     checkCharge = cms.bool(False),                   # n/a
0024     maxDeltaR   = cms.double(0.4),                   # Minimum deltaR for the match
0025     #maxDPtRel   = cms.double(3.0),                  # Minimum deltaPt/Pt for the match (not used in GenJetMatcher)
0026     resolveAmbiguities    = cms.bool(True),          # Forbid two RECO objects to match to the same GEN object
0027     resolveByMatchQuality = cms.bool(False),         # False = just match input in order; True = pick lowest deltaR pair first
0028 )
0029 
0030 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0031 pp_on_AA.toModify(patJetGenJetMatch,
0032                                            maxDeltaR = 0.4,
0033                                            resolveByMatchQuality = True,
0034                                            src = "akCs4PFJets",
0035                                        )
0036 
0037 pp_on_AA.toModify(patJetPartonMatch, src = "akCs4PFJets")