-
Notifications
You must be signed in to change notification settings - Fork 36
/
Snakefile
88 lines (82 loc) · 2.67 KB
/
Snakefile
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Note that if you are working on the analysis development locally, i.e. outside
# of the REANA platform, you can proceed as follows:
#
# $ cd reana-demo-cms-h4l
# $ mkdir snakemake-local-run
# $ cd snakemake-local-run
# $ virtualenv ~/.virtualenvs/cms-h4l-snakemake
# $ source ~/.virtualenvs/cms-h4l-snakemake/bin/activate
# $ pip install snakemake
# $ cp -a ../code ../data .
# $ snakemake -s ../workflow/snakemake/Snakefile -p --cores 4 --use-singularity
# --configfile ../workflow/snakemake/input.yaml
rule all:
input:
"results/mass4l_combine_userlvl3.pdf"
rule scram:
input:
config["data"],
config["code"]
output:
touch("results/scramdone.txt")
container:
"docker://docker.io/cmsopendata/cmssw_5_3_32"
shell:
"source /opt/cms/cmsset_default.sh "
"&& scramv1 project CMSSW CMSSW_5_3_32 "
"&& cd CMSSW_5_3_32/src "
"&& eval `scramv1 runtime -sh` "
"&& cp -r ../../code/HiggsExample20112012 . "
"&& cd HiggsExample20112012/HiggsDemoAnalyzer "
"&& scram b "
"&& cd ../Level3 "
"&& mkdir -p ../../../../results "
rule analyze_data:
input:
config["data"],
config["code"],
"results/scramdone.txt"
output:
"results/DoubleMuParked2012C_10000_Higgs.root"
container:
"docker://docker.io/cmsopendata/cmssw_5_3_32"
shell:
"source /opt/cms/cmsset_default.sh "
"&& cd CMSSW_5_3_32/src "
"&& eval `scramv1 runtime -sh` "
"&& cd HiggsExample20112012/HiggsDemoAnalyzer "
"&& cd ../Level3 "
"&& cmsRun demoanalyzer_cfg_level3data.py"
rule analyze_mc:
input:
config["data"],
config["code"],
"results/scramdone.txt"
output:
"results/Higgs4L1file.root"
container:
"docker://docker.io/cmsopendata/cmssw_5_3_32"
shell:
"source /opt/cms/cmsset_default.sh "
"&& cd CMSSW_5_3_32/src "
"&& eval `scramv1 runtime -sh` "
"&& cd HiggsExample20112012/HiggsDemoAnalyzer "
"&& cd ../Level3 "
"&& cmsRun demoanalyzer_cfg_level3MC.py"
rule make_plot:
input:
config["data"],
config["code"],
"results/DoubleMuParked2012C_10000_Higgs.root",
"results/Higgs4L1file.root"
output:
"results/mass4l_combine_userlvl3.pdf"
container:
"docker://docker.io/cmsopendata/cmssw_5_3_32"
shell:
"source /opt/cms/cmsset_default.sh "
"&& cd CMSSW_5_3_32/src "
"&& eval `scramv1 runtime -sh` "
"&& cd HiggsExample20112012/HiggsDemoAnalyzer "
"&& cd ../Level3 "
"&& root -b -l -q ./M4Lnormdatall_lvl3.cc"