-
Notifications
You must be signed in to change notification settings - Fork 17
/
SetupShapeOnly.sh
executable file
·367 lines (274 loc) · 13.6 KB
/
SetupShapeOnly.sh
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
if [ -z $CMSSW_BASE ]; then
echo "======================================="
echo "No CMS environment detected; stopping..."
echo "======================================="
exit 1
fi
source $CMSSW_BASE/src/LatinosSetup/Functions.sh
if [[ "$CMSSW_VERSION" == CMSSW_5_*_* ]]; then
echo "======================================="
echo " running with $CMSSW_VERSION - this is an 8 TeV setup!"
echo " Current Time:" $(date)
echo " checking out additional repositories; this could take a while ..."
echo " Only shape analysis toolkit will be setup"
echo " Please use Setup.sh for the full package"
echo " export SCRAM_ARCH=slc5_amd64_gcc472"
echo "======================================="
echo " - Basic Code"
github-addext latinos/HWWAnalysis.git HWWAnalysis
github-addext latinos/HiggsAnalysis-CombinedLimit.git HiggsAnalysis/CombinedLimit HiggsAnalysis-CombinedLimit-V02-06-00
echo "======================================="
echo " ... Done. "
echo "Current Time:" $(date)
echo "======================================="
elif [[ "$CMSSW_VERSION" == CMSSW_7_*_* ]]; then
echo "======================================="
echo " running with $CMSSW_VERSION - this is an 13 TeV setup!"
echo " Current Time:" $(date)
echo " checking out additional repositories; this could take a while ..."
echo " Only shape analysis toolkit will be setup"
echo " Please use Setup.sh for the full package"
echo " export SCRAM_ARCH=???"
echo "======================================="
echo " - Basic Code"
github-addext latinos/LatinoAnalysis.git LatinoAnalysis
echo " - Setup MELA"
git clone [email protected]:cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement
cd ZZMatrixElement
echo " checking out MELA release v2.0.1 ..."
git checkout tags/v2.0.1
cd -
echo " ...done."
source ZZMatrixElement/setup.sh -j 12
echo "======================================="
echo " ... Done. "
echo "Current Time:" $(date)
echo "======================================="
elif [[ "$CMSSW_VERSION" == CMSSW_8_*_* ]]; then
echo "======================================="
echo "running with $CMSSW_VERSION - this is a 13 TeV setup!"
echo "Current time:" $(date)
echo "checking out additional repositories; this could take a while ..."
echo "======================================="
echo " - Basic Code"
github-addext latinos/LatinoAnalysis.git LatinoAnalysis
echo " - get recaster for MELA"
git clone [email protected]:usarica/MelaAnalytics.git
echo " - Setup MELA"
git clone [email protected]:cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement
cd ZZMatrixElement
echo " checking out MELA release v2.1.1 ..."
git checkout tags/v2.1.1
cd -
echo " ...done."
source ZZMatrixElement/setup.sh -j 12
echo " - Plotting Tools"
git clone [email protected]:yiiyama/multidraw.git LatinoAnalysis/MultiDraw
cd LatinoAnalysis/MultiDraw
git checkout 2.0.12 2>/dev/null
./mkLinkDef.py --cmssw
elif [[ "$CMSSW_VERSION" == CMSSW_9_*_* ]]; then
echo "======================================="
echo "running with $CMSSW_VERSION - this is a 13 TeV setup!"
echo "Current time:" $(date)
echo "checking out additional repositories; this could take a while ..."
echo "======================================="
echo " - Basic Code"
github-addext latinos/LatinoAnalysis.git LatinoAnalysis
echo " - Nano Tools"
git clone [email protected]:cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools
echo " - Plotting Tools"
git clone [email protected]:yiiyama/multidraw.git LatinoAnalysis/MultiDraw
cd LatinoAnalysis/MultiDraw
git checkout 2.0.8 2>/dev/null
./mkLinkDef.py --cmssw
cd ../..
echo " - MELA"
git clone [email protected]:MELALabs/MelaAnalytics.git MelaAnalytics
cd MelaAnalytics ; git checkout -b from-v21 v2.1 ; cd ..
git clone https://github.com/cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement
cd ZZMatrixElement ; git checkout -b from-v223 v2.2.3 ; source setup.sh -j 12 ; cd ..
elif [[ "$CMSSW_VERSION" == CMSSW_10_*_* ]]; then
echo "======================================="
echo "running with $CMSSW_VERSION - this is a 13 TeV setup!"
echo "Current time:" $(date)
echo "checking out additional repositories; this could take a while ..."
echo "======================================="
echo "++++++++++++ WARNING: Assuming UL setup: using UL_production branch +++++++++++++"
echo " - Basic Code"
git clone [email protected]:latinos/LatinoAnalysis.git LatinoAnalysis
cd LatinoAnalysis
git checkout UL_production
cd -
echo " - Nano Tools"
git clone [email protected]:cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools
# cd PhysicsTools/NanoAODTools
# git checkout a4b3c03
# cd -;
cp LatinoAnalysis/Tools/data/JECs/*txt PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/Tools/data/JECs/*tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/Tools/data/JERs/Summer19UL17_JRV2_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Summer16_25nsV1b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Fall17_V3b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Autumn18_V7b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
echo " - Plotting Tools"
git clone [email protected]:yiiyama/multidraw.git LatinoAnalysis/MultiDraw
cd LatinoAnalysis/MultiDraw
git checkout 2.0.12 2>/dev/null
./mkLinkDef.py --cmssw
cd ../..
echo " - MELA new version"
git clone [email protected]:MELALabs/MelaAnalytics.git MelaAnalytics
cd MelaAnalytics ; git checkout -b from-v22 v2.2 ; cd ..
git clone https://github.com/JHUGen/JHUGenMela.git JHUGenMELA
cd JHUGenMELA; git checkout -b from-v235 v2.3.5 ; source setup.sh -j 12 ; cd ..
scram b -j 8
echo " - Correction Lib"
git clone ssh://[email protected]:7999/cms-nanoAOD/jsonpog-integration.git
git clone --recursive [email protected]:cms-nanoAOD/correctionlib.git
cd correctionlib
echo " - enabling python2 bindings"
cd pybind11
git checkout v2.9.2
cd ..
make PYTHON=python
make install
cp -R correctionlib $CMSSW_BASE/src/LatinoAnalysis/NanoGardener/python/modules
cd -
elif [[ "$CMSSW_VERSION" == CMSSW_11_0_* ]]; then
echo "======================================="
echo "running with $CMSSW_VERSION - this is a 13 TeV setup!"
echo "Current time:" $(date)
echo "checking out additional repositories; this could take a while ..."
echo "======================================="
echo "++++++++++++ WARNING: Assuming UL setup: using UL_production branch +++++++++++++"
echo " - Basic Code"
#github-addext latinos/LatinoAnalysis.git LatinoAnalysis
git clone [email protected]:latinos/LatinoAnalysis.git LatinoAnalysis
cd LatinoAnalysis
git checkout UL_production
cd -
echo " - Nano Tools"
git clone [email protected]:cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools
# cd PhysicsTools/NanoAODTools
# git checkout a4b3c03
# cd -;
cp LatinoAnalysis/Tools/data/JECs/*txt PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/Tools/data/JECs/*tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/Tools/data/JERs/Summer19UL17_JRV2_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Summer16_25nsV1b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Fall17_V3b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Autumn18_V7b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
echo " - Plotting Tools"
git clone [email protected]:yiiyama/multidraw.git LatinoAnalysis/MultiDraw
cd LatinoAnalysis/MultiDraw
git checkout 2.0.12 2>/dev/null
./mkLinkDef.py --cmssw
cd ../..
echo " - MELA"
git clone [email protected]:MELALabs/MelaAnalytics.git MelaAnalytics
cd MelaAnalytics ; git checkout -b from-v22 v2.2 ; cd ..
git clone https://github.com/JHUGen/JHUGenMela.git JHUGenMELA
cd JHUGenMELA; git checkout -b from-v235 v2.3.5 ; source setup.sh -j 12 ; cd ..
scram b -j 8
echo " - Correction Lib"
git clone ssh://[email protected]:7999/cms-nanoAOD/jsonpog-integration.git
git clone --recursive [email protected]:cms-nanoAOD/correctionlib.git
cd correctionlib
echo " - enabling python2 bindings"
cd pybind11
git checkout v2.9.2
cd ..
make PYTHON=python
make install
cp -R correctionlib $CMSSW_BASE/src/LatinoAnalysis/NanoGardener/python/modules
elif [[ "$CMSSW_VERSION" == CMSSW_11_3_* ]]; then
echo "======================================="
echo "running with $CMSSW_VERSION - this is a 13 TeV setup!"
echo "Current time:" $(date)
echo "checking out additional repositories; this could take a while ..."
echo "======================================="
echo "++++++++++++ WARNING: Assuming UL setup: using UL_production branch +++++++++++++"
echo " - Basic Code"
#github-addext latinos/LatinoAnalysis.git LatinoAnalysis
git clone [email protected]:latinos/LatinoAnalysis.git LatinoAnalysis
cd LatinoAnalysis
git checkout UL_production
cd -
echo " - Nano Tools"
git clone [email protected]:cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools
#should not be needed anymore for UL
#cd PhysicsTools/NanoAODTools
#git checkout a4b3c03
#cd -;
cp LatinoAnalysis/Tools/data/JECs/*txt PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/Tools/data/JECs/*tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/Tools/data/JERs/Summer19UL17_JRV2_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Summer16_25nsV1b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Fall17_V3b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Autumn18_V7b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
echo " - Plotting Tools"
git clone [email protected]:yiiyama/multidraw.git LatinoAnalysis/MultiDraw
cd LatinoAnalysis/MultiDraw
git checkout 2.0.12 2>/dev/null
./mkLinkDef.py --cmssw
cd ../..
echo " - MELA"
git clone [email protected]:MELALabs/MelaAnalytics.git MelaAnalytics
cd MelaAnalytics ; git checkout -b from-v21 v2.1 ; cd ..
git clone https://github.com/cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement
cd ZZMatrixElement ; git checkout -b from-v223 v2.2.3 ; source setup.sh -j 12 ; cd ..
# git clone [email protected]:MELALabs/MelaAnalytics.git MelaAnalytics
# cd MelaAnalytics ; git checkout -b from-v22 v2.2 ; cd ..
# git clone https://github.com/JHUGen/JHUGenMela.git JHUGenMELA
# cd JHUGenMELA; git checkout -b from-v235 v2.3.5 ; source setup.sh -j 12 ; cd ..
echo " - Correction Lib"
git clone ssh://[email protected]:7999/cms-nanoAOD/jsonpog-integration.git
elif [[ "$CMSSW_VERSION" == CMSSW_12_*_* ]]; then
echo "======================================="
echo "running with $CMSSW_VERSION - this is a 13 TeV setup!"
echo "Current time:" $(date)
echo "checking out additional repositories; this could take a while ..."
echo "======================================="
echo "++++++++++++ WARNING: Assuming UL setup: using UL_production branch +++++++++++++"
echo " - Basic Code"
#github-addext latinos/LatinoAnalysis.git LatinoAnalysis
git clone [email protected]:latinos/LatinoAnalysis.git LatinoAnalysis
cd LatinoAnalysis
git checkout UL_production
cd -
echo " - Nano Tools"
git clone [email protected]:cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools
#should not be needed anymore for UL
#cd PhysicsTools/NanoAODTools
#git checkout a4b3c03
#cd -;
cp LatinoAnalysis/Tools/data/JECs/*txt PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/Tools/data/JECs/*tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/Tools/data/JERs/Summer19UL17_JRV2_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Summer16_25nsV1b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Fall17_V3b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
cp LatinoAnalysis/NanoGardener/python/data/Autumn18_V7b_MC.tgz PhysicsTools/NanoAODTools/data/jme/
echo " - Plotting Tools"
git clone [email protected]:yiiyama/multidraw.git LatinoAnalysis/MultiDraw
cd LatinoAnalysis/MultiDraw
git checkout 2.0.12 2>/dev/null
./mkLinkDef.py --cmssw
cd ../..
echo " - MELA"
git clone [email protected]:MELALabs/MelaAnalytics.git MelaAnalytics
cd MelaAnalytics ; git checkout -b from-v21 v2.1 ; cd ..
git clone https://github.com/cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement
cd ZZMatrixElement ; git checkout -b from-v223 v2.2.3 ; source setup.sh -j 12 ; cd ..
# git clone [email protected]:MELALabs/MelaAnalytics.git MelaAnalytics
# cd MelaAnalytics ; git checkout -b from-v22 v2.2 ; cd ..
# git clone https://github.com/JHUGen/JHUGenMela.git JHUGenMELA
# cd JHUGenMELA; git checkout -b from-v235 v2.3.5 ; source setup.sh -j 12 ; cd ..
echo " - Correction Lib"
git clone ssh://[email protected]:7999/cms-nanoAOD/jsonpog-integration.git
else
echo "======================================="
echo "You are using release $CMSSW_VERSION which is not supported by this script."
echo "A with CMSSW_5_*_* release is suggested for shape"
echo "======================================="
fi;