patJetPartonMatch,
    patJetCorrFactors,
    patJets,
)
from HeavyIonsAnalysis.JetAnalysis.inclusiveJetAnalyzer_cff import *
from HeavyIonsAnalysis.JetAnalysis.bTaggers_cff import *
from RecoJets.JetProducers.JetIDParams_cfi import *

ak3PFmatch = patJetGenJetMatch.clone(src=cms.InputTag("ak3PFJets"), matched=cms.InputTag("ak3GenJets"), maxDeltaR=0.3)

ak3PFparton = patJetPartonMatch.clone(src=cms.InputTag("ak3PFJets"))

ak3PFcorr = patJetCorrFactors.clone(
    useNPV=cms.bool(False),
    useRho=cms.bool(False),
    #    primaryVertices = cms.InputTag("hiSelectedVertex"),
    levels=cms.vstring("L2Relative", "L3Absolute"),
    src=cms.InputTag("ak3PFJets"),
    payload="AK3PF_offline",
)

ak3PFJetID = cms.EDProducer("JetIDProducer", JetIDParams, src=cms.InputTag("ak3CaloJets"))

# ak3PFclean   = heavyIonCleanedGenJets.clone(src = cms.InputTag('ak3GenJets'))

ak3PFbTagger = bTaggers("ak3PF", 0.3)

# create objects locally since they dont load properly otherwise
# ak3PFmatch = ak3PFbTagger.match
ak3PFparton = patJetPartonMatch.clone(src=cms.InputTag("ak3PFJets"), matched=cms.InputTag("genParticles"))
ak3PFPatJetFlavourAssociationLegacy = ak3PFbTagger.PatJetFlavourAssociationLegacy
ak3PFPatJetPartons = ak3PFbTagger.PatJetPartons
from HeavyIonsAnalysis.JetAnalysis.bTaggers_cff import *
from RecoJets.JetProducers.JetIDParams_cfi import *

akPu1Calomatch = patJetGenJetMatch.clone(
    src = cms.InputTag("akPu1CaloJets"),
    matched = cms.InputTag("ak1HiGenJets"),
    maxDeltaR = 0.1
    )

akPu1Caloparton = patJetPartonMatch.clone(src = cms.InputTag("akPu1CaloJets")
                                                        )

akPu1Calocorr = patJetCorrFactors.clone(
    useNPV = cms.bool(False),
    useRho = cms.bool(False),
#    primaryVertices = cms.InputTag("hiSelectedVertex"),
    levels   = cms.vstring('L2Relative','L3Absolute'),
    src = cms.InputTag("akPu1CaloJets"),
    payload = "AK1Calo_offline"
    )

akPu1CaloJetID= cms.EDProducer('JetIDProducer', JetIDParams, src = cms.InputTag('akPu1CaloJets'))

#akPu1Caloclean   = heavyIonCleanedGenJets.clone(src = cms.InputTag('ak1HiGenJets'))

akPu1CalobTagger = bTaggers("akPu1Calo",0.1)

#create objects locally since they dont load properly otherwise
#akPu1Calomatch = akPu1CalobTagger.match
akPu1Caloparton = patJetPartonMatch.clone(src = cms.InputTag("akPu1CaloJets"), matched = cms.InputTag("genParticles"))
akPu1CaloPatJetFlavourAssociationLegacy = akPu1CalobTagger.PatJetFlavourAssociationLegacy
akPu1CaloPatJetPartons = akPu1CalobTagger.PatJetPartons
from HeavyIonsAnalysis.JetAnalysis.inclusiveJetAnalyzer_cff import *

ak4PFCHSmatch = patJetGenJetMatch.clone(
    src = cms.InputTag("ak4PFJetsCHS"),
    matched = cms.InputTag("ak4GenJetsNoNu"),
    maxDeltaR = 0.4
    )

ak4PFCHSparton = patJetPartonMatch.clone(src = cms.InputTag("ak4PFJetsCHS"),
                                                        matched = cms.InputTag("genParticles")
                                                        )

ak4PFCHScorr = patJetCorrFactors.clone(
    useNPV = False,
#    primaryVertices = cms.InputTag("hiSelectedVertex"),
    levels   = cms.vstring('L1FastJet','L2Relative','L3Absolute','L2L3Residual'),
    src = cms.InputTag("ak4PFJetsCHS"),
    payload = "AK4PFchs"
    )

ak4PFCHSpatJets = patJets.clone(jetSource = cms.InputTag("ak4PFJetsCHS"),
                                               jetCorrFactorsSource = cms.VInputTag(cms.InputTag("ak4PFCHScorr")),
                                               genJetMatch = cms.InputTag("ak4PFCHSmatch"),
                                               genPartonMatch = cms.InputTag("ak4PFCHSparton"),
                                               jetIDMap = cms.InputTag("ak4PFCHSJetID"),
                                               addBTagInfo         = False,
                                               addTagInfos         = False,
                                               addDiscriminators   = False,
                                               addAssociatedTracks = False,
                                               addJetCharge        = False,
                                               addJetID            = False,
from HeavyIonsAnalysis.JetAnalysis.patHeavyIonSequences_cff import patJetGenJetMatch, patJetPartonMatch, patJetCorrFactors, patJets
from HeavyIonsAnalysis.JetAnalysis.inclusiveJetAnalyzer_cff import *

hltPuAK4CaloJetsIDPassedCorrLmatch = patJetGenJetMatch.clone(
    src = cms.InputTag("hltPuAK4CaloJetsIDPassed"),
    matched = cms.InputTag("ak4HiGenJets"),
    maxDeltaR = 0.4
    )

hltPuAK4CaloJetsIDPassedCorrLparton = patJetPartonMatch.clone(src = cms.InputTag("hltPuAK4CaloJetsIDPassed"),
                                                        matched = cms.InputTag("genParticles")
                                                        )

hltPuAK4CaloJetsIDPassedCorrLcorr = patJetCorrFactors.clone(
    useNPV = False,
    levels   = cms.vstring('L2Relative','L3Absolute'),
    src = cms.InputTag("hltPuAK4CaloJetsIDPassed"),
    payload = "AK4Calo"
    )

hltPuAK4CaloJetsIDPassedCorrLpatJets = patJets.clone(jetSource = cms.InputTag("hltPuAK4CaloJetsIDPassed"),
                                               jetCorrFactorsSource = cms.VInputTag(cms.InputTag("hltPuAK4CaloJetsIDPassedCorrLcorr")),
                                               genJetMatch = cms.InputTag("hltPuAK4CaloJetsIDPassedCorrLmatch"),
                                               genPartonMatch = cms.InputTag("hltPuAK4CaloJetsIDPassedCorrLparton"),
                                               jetIDMap = cms.InputTag("hltPuAK4CaloJetsIDPassedCorrLJetID"),
                                               addBTagInfo         = False,
                                               addTagInfos         = False,
                                               addDiscriminators   = False,
                                               addAssociatedTracks = False,
                                               addJetCharge        = False,
                                               addJetID            = False,
                                               getJetMCFlavour     = False,
    )

akVsFilter6CalomatchGroomed = patJetGenJetMatch.clone(
    src = cms.InputTag("akFilter6GenJets"),
    matched = cms.InputTag("ak6GenJets"),
    resolveByMatchQuality = cms.bool(True),
    maxDeltaR = 0.6
    )

akVsFilter6Caloparton = patJetPartonMatch.clone(src = cms.InputTag("akVsFilter6CaloJets")
                                                        )

akVsFilter6Calocorr = patJetCorrFactors.clone(
    useNPV = cms.bool(False),
    useRho = cms.bool(False),
#    primaryVertices = cms.InputTag("hiSelectedVertex"),
    levels   = cms.vstring('L2Relative','L3Absolute'),
    src = cms.InputTag("akVsFilter6CaloJets"),
    payload = "AK6Calo_offline"
    )

akVsFilter6CaloJetID= cms.EDProducer('JetIDProducer', JetIDParams, src = cms.InputTag('akVsFilter6CaloJets'))

#akVsFilter6Caloclean   = heavyIonCleanedGenJets.clone(src = cms.InputTag('ak6GenJets'))

akVsFilter6CalobTagger = bTaggers("akVsFilter6Calo",0.6)

#create objects locally since they dont load properly otherwise
#akVsFilter6Calomatch = akVsFilter6CalobTagger.match
akVsFilter6Caloparton = patJetPartonMatch.clone(src = cms.InputTag("akVsFilter6CaloJets"), matched = cms.InputTag("genParticles"))
akVsFilter6CaloPatJetFlavourAssociationLegacy = akVsFilter6CalobTagger.PatJetFlavourAssociationLegacy
akVsFilter6CaloPatJetPartons = akVsFilter6CalobTagger.PatJetPartons
    resolveByMatchQuality=cms.bool(False),
    maxDeltaR=0.3)

akPuSoftDrop3PFmatchGroomed = patJetGenJetMatch.clone(
    src=cms.InputTag("akSoftDrop3GenJets"),
    matched=cms.InputTag("ak3GenJets"),
    resolveByMatchQuality=cms.bool(False),
    maxDeltaR=0.3)

akPuSoftDrop3PFparton = patJetPartonMatch.clone(
    src=cms.InputTag("akPuSoftDrop3PFJets"))

akPuSoftDrop3PFcorr = patJetCorrFactors.clone(
    useNPV=cms.bool(False),
    useRho=cms.bool(False),
    #    primaryVertices = cms.InputTag("hiSelectedVertex"),
    levels=cms.vstring('L2Relative', 'L3Absolute'),
    src=cms.InputTag("akPuSoftDrop3PFJets"),
    payload="AKPu3PF_offline")

akPuSoftDrop3PFJetID = cms.EDProducer(
    'JetIDProducer', JetIDParams, src=cms.InputTag('akPuSoftDrop3CaloJets'))

#akPuSoftDrop3PFclean   = heavyIonCleanedGenJets.clone(src = cms.InputTag('ak3GenJets'))

akPuSoftDrop3PFbTagger = bTaggers("akPuSoftDrop3PF", 0.3)

#create objects locally since they dont load properly otherwise
#akPuSoftDrop3PFmatch = akPuSoftDrop3PFbTagger.match
akPuSoftDrop3PFparton = patJetPartonMatch.clone(
    src=cms.InputTag("akPuSoftDrop3PFJets"),
import FWCore.ParameterSet.Config as cms
from HeavyIonsAnalysis.JetAnalysis.patHeavyIonSequences_cff import patJetGenJetMatch, patJetPartonMatch, patJetCorrFactors, patJets
from HeavyIonsAnalysis.JetAnalysis.inclusiveJetAnalyzer_cff import *

hltPuAK4CaloJetsIDPassedCorrLmatch = patJetGenJetMatch.clone(
    src=cms.InputTag("hltPuAK4CaloJetsIDPassed"),
    matched=cms.InputTag("ak4HiGenJets"),
    maxDeltaR=0.4)

hltPuAK4CaloJetsIDPassedCorrLparton = patJetPartonMatch.clone(
    src=cms.InputTag("hltPuAK4CaloJetsIDPassed"),
    matched=cms.InputTag("genParticles"))

hltPuAK4CaloJetsIDPassedCorrLcorr = patJetCorrFactors.clone(
    useNPV=False,
    levels=cms.vstring('L2Relative', 'L3Absolute'),
    src=cms.InputTag("hltPuAK4CaloJetsIDPassed"),
    payload="AK4Calo")

hltPuAK4CaloJetsIDPassedCorrLpatJets = patJets.clone(
    jetSource=cms.InputTag("hltPuAK4CaloJetsIDPassed"),
    jetCorrFactorsSource=cms.VInputTag(
        cms.InputTag("hltPuAK4CaloJetsIDPassedCorrLcorr")),
    genJetMatch=cms.InputTag("hltPuAK4CaloJetsIDPassedCorrLmatch"),
    genPartonMatch=cms.InputTag("hltPuAK4CaloJetsIDPassedCorrLparton"),
    jetIDMap=cms.InputTag("hltPuAK4CaloJetsIDPassedCorrLJetID"),
    addBTagInfo=False,
    addTagInfos=False,
    addDiscriminators=False,
    addAssociatedTracks=False,
    addJetCharge=False,