goodTau = lambda x: susy_tau_extraloose(x)

    goodLepProducer = collectionMerger(input=["Electron", "Muon"],
                                       output="LepGood",
                                       maxObjects=10,
                                       selector=dict([("Electron", goodElec),
                                                      ("Muon", goodMuon)]))

    goodTauProducer = collectionMerger(input=["Tau"],
                                       output="TauGood",
                                       maxObjects=10,
                                       selector=dict([("Tau", goodTau)]))

    from PhysicsTools.NanoAODTools.postprocessing.framework.crabhelper import inputFiles, runsAndLumis

    skimRecoLeps = SkimRecoLeps(sampOpt['isData'] == True)
    mod = [goodLepProducer, goodTauProducer, skimRecoLeps]

    splitMass = splitSMSmasses(sampOpt["LSPID"], sampOpt["NLSPID1"])
    ISRReweight = ISRReWeighting(
        {
            (0, 50): 1,
            (50, 100): 1.052,
            (100, 150): 1.179,
            (150, 200): 1.150,
            (200, 300): 1.057,
            (300, 400): 1.000,
            (400, 600): 0.912,
            (600, 30000): 0.783
        }, sampOpt["NLSPID1"], sampOpt["NLSPID2"])
    mod = mod + [splitMass, ISRReweight]
    goodTau = lambda x: susy_tau_extraloose(x)

    goodLepProducer = collectionMerger(input=["Electron", "Muon"],
                                       output="LepGood",
                                       maxObjects=10,
                                       selector=dict([("Electron", goodElec),
                                                      ("Muon", goodMuon)]))

    goodTauProducer = collectionMerger(input=["Tau"],
                                       output="TauGood",
                                       maxObjects=10,
                                       selector=dict([("Tau", goodTau)]))

    from PhysicsTools.NanoAODTools.postprocessing.framework.crabhelper import inputFiles, runsAndLumis

    skimRecoLeps = SkimRecoLeps(sample.options['isData'] == True)
    mod = [goodLepProducer, goodTauProducer, skimRecoLeps]

    if not sample.options['isData']:
        # add pile-up weight before any skim
        mod = [puAutoWeight2018()] + mod

        ## add jet met uncertainties
        from PhysicsTools.NanoAODTools.postprocessing.modules.jme.jetmetUncertainties import jetmetUncertainties2018All, jetmetUncertainties2018
        jmeUncert = jetmetUncertainties2018All()
        jmeUncert.metBranchName = 'MET'
        mod.extend([jmeUncert])
        from PhysicsTools.NanoAODTools.postprocessing.modules.WZ_EWK.jetMetCorrelator import jetMetCorrelations2018
        mod.extend([jetMetCorrelations2018()])

        ## add xsec branch