forked from fgolf/ProjectMetis
-
Notifications
You must be signed in to change notification settings - Fork 10
/
makemc.py
62 lines (57 loc) · 1.91 KB
/
makemc.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
62
from metis.CMSSWTask import CMSSWTask
from metis.Sample import DirectorySample
from metis.Path import Path
from metis.StatsParser import StatsParser
import time
lhe = CMSSWTask(
sample = DirectorySample(
location="/hadoop/cms/store/user/namin/lhe_Apr1/",
globber="*seed6*.lhe",
dataset="/stop-stop/procv2/LHE",
),
events_per_output = 20,
total_nevents = 100,
pset = "mcmaking/pset_gensim.py",
cmssw_version = "CMSSW_7_1_20_patch3",
split_within_files = True,
)
raw = CMSSWTask(
sample = DirectorySample(
location = lhe.get_outputdir(),
dataset = lhe.get_sample().get_datasetname().replace("LHE","RAW"),
),
open_dataset = True,
files_per_output = 1,
pset = "mcmaking/pset_raw.py",
cmssw_version = "CMSSW_8_0_21",
)
aod = CMSSWTask(
sample = DirectorySample(
location = raw.get_outputdir(),
dataset = raw.get_sample().get_datasetname().replace("RAW","AOD"),
),
open_dataset = True,
files_per_output = 1,
pset = "mcmaking/pset_aod.py",
cmssw_version = "CMSSW_8_0_21",
)
miniaod = CMSSWTask(
sample = DirectorySample(
location = aod.get_outputdir(),
dataset = aod.get_sample().get_datasetname().replace("AOD","MINIAOD"),
),
open_dataset = True,
flush = True,
files_per_output = 2,
pset = "mcmaking/pset_miniaod.py",
cmssw_version = "CMSSW_8_0_21",
)
for _ in range(25):
total_summary = {}
for task in [lhe,raw,aod,miniaod]:
# for task in [miniaod]:
task.process()
summary = task.get_task_summary()
total_summary[task.get_sample().get_datasetname()] = summary
StatsParser(data=total_summary, webdir="~/public_html/dump/metis/").do()
time.sleep(600)