-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathcondor_SUEP_ggF.py
61 lines (52 loc) · 1.74 KB
/
condor_SUEP_ggF.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import argparse
import os
# Import coffea specific features
from coffea import processor
from coffea.processor import Runner, futures_executor, run_uproot_job
from workflows import SUEP_coffea
# SUEP Repo Specific
from workflows.utils import merger
# Begin argparse
parser = argparse.ArgumentParser("")
parser.add_argument("--isMC", type=int, default=1, help="")
parser.add_argument("--jobNum", type=int, default=1, help="")
parser.add_argument("--era", type=str, default="2018", help="")
parser.add_argument("--doSyst", type=int, default=1, help="")
parser.add_argument("--infile", required=True, type=str, default=None, help="")
parser.add_argument("--dataset", type=str, default="X", help="")
parser.add_argument("--nevt", type=str, default=-1, help="")
parser.add_argument("--doInf", type=int, default=0, help="")
options = parser.parse_args()
out_dir = os.getcwd()
modules_era = []
modules_era.append(
SUEP_coffea.SUEP_cluster(
isMC=options.isMC,
era=str(options.era),
scouting=0,
do_syst=options.doSyst,
syst_var="",
sample=options.dataset,
weight_syst="",
flag=False,
do_inf=options.doInf,
output_location=out_dir,
accum="pandas_merger",
)
)
for instance in modules_era:
runner = processor.Runner(
executor=processor.FuturesExecutor(compression=None, workers=1),
schema=processor.NanoAODSchema,
xrootdtimeout=60,
chunksize=1000000,
)
runner.automatic_retries(
retries=3,
skipbadfiles=False,
func=runner.run,
fileset={options.dataset: [options.infile]},
treename="Events",
processor_instance=instance,
)
merger.merge(options, pattern="ntuple_*.hdf5", outFile="out.hdf5")