Beispiel #1
0
            process.path *= getattr(
                process,
                "{}PF{}pileupJetIdCalculator".format(_jet_algo_radius.upper(),
                                                     _PU_method))
            process.path *= getattr(
                process,
                "{}PF{}pileupJetIdEvaluator".format(_jet_algo_radius.upper(),
                                                    _PU_method))

######################
# Configure PAT Jets #
######################

from Kappa.Skimming.KPatJets_miniAOD_cff import setup_PatJets

patJets = setup_PatJets(process, options.isData)

# -- set up PAT jets

# go through all combinations of jet radius and PU subtraction algorithms
for _jet_radius in (4, 8):
    for _PU_method in ("", "CHS", "Puppi"):
        _jet_collection_name = "ak%dPFJets%s" % (_jet_radius, _PU_method)
        _patJet_collection_name = "AK%dPF%s" % (_jet_radius, _PU_method)

        # add KAPPA PatJet config to KAPPA Tuple
        setattr(
            process.kappaTuple.PatJets, _jet_collection_name,
            cms.PSet(src=cms.InputTag('selectedPatJets' +
                                      _patJet_collection_name)))
jetSequence = 'sequence'
jetToolbox( process, 'ak4', jetSequence+'ak4CHS',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='CHS',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False, addPUJetID=True) 
process.path *= process.sequenceak4CHS
process.path *= process.AK4PFCHSpileupJetIdCalculator*process.AK4PFCHSpileupJetIdEvaluator
jetToolbox( process, 'ak4', jetSequence+'ak4Puppi',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='Puppi',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak4Puppi
jetToolbox( process, 'ak4', jetSequence+'ak4',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='None',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak4
jetToolbox( process, 'ak8', jetSequence+'ak8CHS',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='CHS',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak8CHS
jetToolbox( process, 'ak8', jetSequence+'ak8Puppi',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='Puppi',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak8Puppi
jetToolbox( process, 'ak8', jetSequence+'ak8',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='None',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak8
from Kappa.Skimming.KPatJets_miniAOD_cff import setup_PatJets
patJets = setup_PatJets(process, data)
	# create Jet variants
for param in (4, 8):
	for algo in ["", "CHS", "Puppi"]:
		variant_name = "ak%dPFJets%s" % (param, algo)
		variant_patJet_name = "AK%dPF%s" % (param, algo)
		process.path *= patJets[variant_patJet_name]
		# Full Kappa jet definition
		kappa_jets[variant_name] = cms.PSet(
			src = cms.InputTag('selectedPatJets'+variant_patJet_name)
			)
		# GenJets
	if not data:
			variant_name = "ak%sGenJetsNoNu" % (param)
				# GenJets are just KLVs
			process.kappaTuple.LV.whitelist += cms.vstring(variant_name)
jetSequence = 'sequence'
jetToolbox( process, 'ak4', jetSequence+'ak4CHS',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='CHS',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False, addPUJetID=True) 
process.path *= process.sequenceak4CHS
process.path *= process.AK4PFCHSpileupJetIdCalculator*process.AK4PFCHSpileupJetIdEvaluator
jetToolbox( process, 'ak4', jetSequence+'ak4Puppi',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='Puppi',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak4Puppi
jetToolbox( process, 'ak4', jetSequence+'ak4',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='None',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak4
jetToolbox( process, 'ak8', jetSequence+'ak8CHS',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='CHS',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak8CHS
jetToolbox( process, 'ak8', jetSequence+'ak8Puppi',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='Puppi',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak8Puppi
jetToolbox( process, 'ak8', jetSequence+'ak8',  'out', miniAOD=True, runOnMC= not data, JETCorrPayload = "None", PUMethod='None',  addPruning=False, addSoftDrop=False , addPrunedSubjets=False,  addNsub=False, maxTau=6, addTrimming=False, addFiltering=False, addNsubSubjets=False) 
process.path *= process.sequenceak8
from Kappa.Skimming.KPatJets_miniAOD_cff import setup_PatJets
patJets = setup_PatJets(process, data)
	# create Jet variants
for param in (4, 8):
	for algo in ["", "CHS", "Puppi"]:
		variant_name = "ak%dPFJets%s" % (param, algo)
		variant_patJet_name = "AK%dPF%s" % (param, algo)
		process.path *= patJets[variant_patJet_name]
		# Full Kappa jet definition
		kappa_jets[variant_name] = cms.PSet(
			src = cms.InputTag('selectedPatJets'+variant_patJet_name)
			)
		# GenJets
	if not data:
			variant_name = "ak%sGenJetsNoNu" % (param)
				# GenJets are just KLVs
			process.kappaTuple.LV.whitelist += cms.vstring(variant_name)