from wgFakeLeptonModule import *

from PhysicsTools.NanoAODTools.postprocessing.modules.common.countHistogramsModule import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.PrefireCorr import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.puWeightProducer import *

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

#p=PostProcessor(".",inputFiles(),None,"wg_fake_lepton_keep_and_drop.txt",[countHistogramsModule(),wgFakeLeptonModule()],provenance=True,justcount=False,noOut=False,fwkJobReport=True, jsonInput=runsAndLumis(), outputbranchsel = "wg_fake_lepton_output_branch_selection.txt")

p = PostProcessor(".",
                  inputFiles(),
                  None,
                  "wg_fake_lepton_keep_and_drop.txt", [
                      countHistogramsModule(),
                      wgFakeLeptonModule(),
                      puWeight_2016(),
                      PrefCorr()
                  ],
                  provenance=True,
                  justcount=False,
                  noOut=False,
                  fwkJobReport=True,
                  jsonInput=runsAndLumis(),
                  outputbranchsel="wg_fake_lepton_output_branch_selection.txt")

p.run()

print "DONE"
Beispiel #2
0
    infilelist = [args.infile]
    jsoninput = None
    fwkjobreport = False

    if args.mode == 'condor':
        infilelist.append(search.getValidSite(args.file)+args.file) 
    else:
        infilelist = [args.infile]
else:
    from PhysicsTools.NanoAODTools.postprocessing.framework.crabhelper import inputFiles,runsAndLumis
    infilelist = inputFiles()
    jsoninput = runsAndLumis()
    fwkjobreport = True

if args.isdata:
       Modules = [countHistogramsModule(),jmeCorrections_ak4_Data(),WWG_Module()]
else:
       if args.year=='2016':
          Modules = [countHistogramsModule(),jmeCorrections_ak4_MC(),btagSF(),WWG_Module(),puWeight_2016(),PrefCorr_2016()]
       if args.year=='2017':
          Modules = [countHistogramsModule(),jmeCorrections_ak4_MC(),btagSF(),WWG_Module(),puWeight_2017(),PrefCorr_2017()]
       if args.year=='2018':
          Modules = [countHistogramsModule(),jmeCorrections_ak4_MC(),btagSF(),WWG_Module(),puWeight_2018()]

p=PostProcessor(".",infilelist,
                branchsel="WWG_keep_and_drop.txt",
                modules = Modules,
                provenance=True,
                justcount=False,
                noOut=False,
                fwkJobReport=fwkjobreport, 
Beispiel #3
0
ROOT.PyConfig.IgnoreCommandLineOptions = True
from importlib import import_module
from PhysicsTools.NanoAODTools.postprocessing.framework.postprocessor import PostProcessor

from wgFakePhotonModule import *

from PhysicsTools.NanoAODTools.postprocessing.modules.common.countHistogramsModule import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.PrefireCorr import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.puWeightProducer import *

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

p = PostProcessor(
    ".",
    inputFiles(),
    None,
    "wg_fake_photon_keep_and_drop.txt",
    [countHistogramsModule(), wgFakePhotonModule()],
    provenance=True,
    justcount=False,
    noOut=False,
    fwkJobReport=True,
    jsonInput=runsAndLumis(),
    outputbranchsel="wg_fake_photon_output_branch_selection.txt")

#p=PostProcessor(".",inputFiles(),None,"wg_fake_photon_keep_and_drop.txt",[countHistogramsModule(),wgFakePhotonModule(),PrefCorr(),puWeight_2017()],provenance=True,justcount=False,noOut=False,fwkJobReport=True,jsonInput=runsAndLumis(),outputbranchsel = "wg_fake_photon_output_branch_selection.txt")

p.run()

print "DONE"
#!/usr/bin/env python
import os, sys
import ROOT
ROOT.PyConfig.IgnoreCommandLineOptions = True
from importlib import import_module
from PhysicsTools.NanoAODTools.postprocessing.framework.postprocessor import PostProcessor

from  wgFakeLeptonModule import *

from PhysicsTools.NanoAODTools.postprocessing.modules.common.countHistogramsModule import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.PrefireCorr import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.puWeightProducer import *

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

p=PostProcessor(".",inputFiles(),None,"wg_fake_lepton_keep_and_drop.txt",[countHistogramsModule(),wgFakeLeptonModule()],provenance=True,justcount=False,noOut=False,fwkJobReport=True, jsonInput=runsAndLumis(), outputbranchsel = "wg_fake_lepton_output_branch_selection.txt")

#p=PostProcessor(".",inputFiles(),None,"wg_fake_lepton_keep_and_drop.txt",[countHistogramsModule(),wgFakeLeptonModule(),puWeight_2017(),PrefCorr()],provenance=True,justcount=False,noOut=False,fwkJobReport=True, jsonInput=runsAndLumis(), outputbranchsel = "wg_fake_lepton_output_branch_selection.txt")

p.run()

print "DONE"
Beispiel #5
0
else:
    from PhysicsTools.NanoAODTools.postprocessing.framework.crabhelper import inputFiles, runsAndLumis
    infilelist = inputFiles()
    jsoninput = runsAndLumis()
    fwkjobreport = True

from PhysicsTools.NanoAODTools.postprocessing.modules.common.PrefireCorr import *
PrefCorr_2016 = lambda: PrefCorr(
    "L1prefiring_jetpt_2016BtoH.root", "L1prefiring_jetpt_2016BtoH",
    "L1prefiring_photonpt_2016BtoH.root", "L1prefiring_photonpt_2016BtoH")
PrefCorr_2017 = lambda: PrefCorr(
    "L1prefiring_jetpt_2017BtoF.root", "L1prefiring_jetpt_2017BtoF",
    "L1prefiring_photonpt_2017BtoF.root", "L1prefiring_photonpt_2017BtoF")

if args.isdata:
    Modules = [countHistogramsModule(), WWG_Module()]
else:
    if args.year == '2016':
        Modules = [
            countHistogramsModule(),
            WWG_Module(),
            puWeight_2016(),
            PrefCorr_2016()
        ]
    if args.year == '2017':
        Modules = [
            countHistogramsModule(),
            WWG_Module(),
            puWeight_2017(),
            PrefCorr_2017()
        ]
Beispiel #6
0
else:
    from PhysicsTools.NanoAODTools.postprocessing.framework.crabhelper import inputFiles, runsAndLumis
    infilelist = inputFiles()
    jsoninput = runsAndLumis()
    fwkjobreport = True

from PhysicsTools.NanoAODTools.postprocessing.modules.common.PrefireCorr import *
PrefCorr_2016 = lambda: PrefCorr(
    "L1prefiring_jetpt_2016BtoH.root", "L1prefiring_jetpt_2016BtoH",
    "L1prefiring_photonpt_2016BtoH.root", "L1prefiring_photonpt_2016BtoH")
PrefCorr_2017 = lambda: PrefCorr(
    "L1prefiring_jetpt_2017BtoF.root", "L1prefiring_jetpt_2017BtoF",
    "L1prefiring_photonpt_2017BtoF.root", "L1prefiring_photonpt_2017BtoF")

if args.isdata:
    Modules = [countHistogramsModule(), WWGfakelepton_Module()]
else:
    if args.year == '2016':
        Modules = [
            countHistogramsModule(),
            WWGfakelepton_Module(),
            puWeight_2016(),
            PrefCorr_2016()
        ]
    if args.year == '2017':
        Modules = [
            countHistogramsModule(),
            WWGfakelepton_Module(),
            puWeight_2017(),
            PrefCorr_2017()
        ]
parser.add_argument('-f',dest='infile',help="if an input file is not provide, assume this is a crab job")
parser.add_argument('-d',dest='isdata',action='store_true',default=False)
parser.add_argument('-y', dest='year', default='2018', help='year')

args = parser.parse_args()

from PhysicsTools.NanoAODTools.postprocessing.framework.postprocessor import PostProcessor

from  DY_Template_Module import *

from PhysicsTools.NanoAODTools.postprocessing.modules.common.countHistogramsModule import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.PrefireCorr import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.puWeightProducer import *

if args.isdata:
    Modules = [countHistogramsModule(),DYTestModule()]
else:
    if args.year == '2018':
        Modules = [countHistogramsModule(),DYTestModule(),puWeight_2018()]
    if args.year == '2017':
        Modules = [countHistogramsModule(),DYTestModule(),puWeight_2017(),PrefCorr()]
    if args.year == '2016':
        Modules = [countHistogramsModule(),DYTestModule(),puWeight_2016(),PrefCorr()]

if args.infile:
    infilelist = [args.infile]
    jsoninput = None
    fwkjobreport = False
else:
    from PhysicsTools.NanoAODTools.postprocessing.framework.crabhelper import inputFiles,runsAndLumis
    infilelist = inputFiles()
Beispiel #8
0
#!/usr/bin/env python
import os, sys
import ROOT
ROOT.PyConfig.IgnoreCommandLineOptions = True
from importlib import import_module
from PhysicsTools.NanoAODTools.postprocessing.framework.postprocessor import PostProcessor

from wgModule import *
from wgFiducialModule import *
from wgFilterModule import *
from countHistogramsFiducialModule import *

from PhysicsTools.NanoAODTools.postprocessing.modules.common.countHistogramsModule import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.PrefireCorr import *
from PhysicsTools.NanoAODTools.postprocessing.modules.common.puWeightProducer import *

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

#p=PostProcessor(".",inputFiles(),None,"wg_keep_and_drop.txt",[countHistogramsModule(),wgModule(),wgFilterModule()],provenance=True,justcount=False,fwkJobReport=True,jsonInput=runsAndLumis(),noOut=False,outputbranchsel = "wg_output_branch_selection.txt")

p=PostProcessor(".",inputFiles(),None,"wg_keep_and_drop.txt",[countHistogramsModule(),wgModule(),wgFilterModule(),puWeight_2016(),PrefCorr()],provenance=True,justcount=False,fwkJobReport=True,jsonInput=runsAndLumis(),noOut=False,outputbranchsel = "wg_output_branch_selection.txt")

#p=PostProcessor(".",inputFiles(),None,"wg_keep_and_drop.txt",[countHistogramsModule(),wgFiducialModule(),countHistogramsFiducialModule(),wgModule(),wgFilterModule(),puWeight_2016(),PrefCorr()],provenance=True,justcount=False,fwkJobReport=True,jsonInput=runsAndLumis(),noOut=False,outputbranchsel = "wg_output_branch_selection.txt")

p.run()

print "DONE"