From b285e4ac42d7bf923d5329bf197c0f9dcfa4a65c Mon Sep 17 00:00:00 2001 From: amassiro Date: Thu, 24 Oct 2019 09:56:31 +0200 Subject: [PATCH 1/7] update and preparation for instructions --- README.md | 8 +++++++- SetupShapeOnly.sh | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a6e31c7..e87dfe5 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ And run the setup script source LatinosSetup/Setup.sh -For datacard maker setup only: +For datacard maker (and nanoaod post-processing) setup only: source LatinosSetup/SetupShapeOnly.sh @@ -42,6 +42,8 @@ Do a git commit (or maybe git add first; see general git infos). Make sure everything is how you wanted it (e.g. look at the commit history). +If possible make a pull request. + Do a git push to push the changes to GitHub. If you want to put major changes in externals, please ask for the best way to do this. @@ -55,4 +57,8 @@ in particular: https://github.com/latinos/LatinoTrees/tree/master/AnalysisStep/test +# How to perform the post-processing + + https://github.com/latinos/LatinoAnalysis/tree/master/NanoGardener + diff --git a/SetupShapeOnly.sh b/SetupShapeOnly.sh index ed4d14d..2f25aa7 100755 --- a/SetupShapeOnly.sh +++ b/SetupShapeOnly.sh @@ -140,7 +140,8 @@ elif [[ "$CMSSW_VERSION" == CMSSW_10_*_* ]]; then cd LatinoAnalysis/MultiDraw git checkout 2.0.8 2>/dev/null ./mkLinkDef.py --cmssw - + cd ../../ + else echo "=======================================" echo "You are using release $CMSSW_VERSION which is not supported by this script." From adc41827489ca4b5c02bedc95c9c97ff2aab7120 Mon Sep 17 00:00:00 2001 From: amassiro Date: Thu, 24 Oct 2019 10:06:29 +0200 Subject: [PATCH 2/7] update and preparation for instructions --- Setup.sh | 4 ++-- SetupShapeOnly.sh | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Setup.sh b/Setup.sh index dbdaa4c..690f2ed 100755 --- a/Setup.sh +++ b/Setup.sh @@ -285,7 +285,7 @@ elif [[ "$CMSSW_VERSION" == CMSSW_8_*_* ]]; then git clone git@github.com:yiiyama/multidraw.git LatinoAnalysis/MultiDraw cd LatinoAnalysis/MultiDraw - git checkout 2.0.8 2>/dev/null + git checkout 2.0.9 2>/dev/null ./mkLinkDef.py --cmssw elif [[ "$CMSSW_VERSION" == CMSSW_9_*_* ]]; then @@ -309,7 +309,7 @@ elif [[ "$CMSSW_VERSION" == CMSSW_9_*_* ]]; then git clone git@github.com:yiiyama/multidraw.git LatinoAnalysis/MultiDraw cd LatinoAnalysis/MultiDraw - git checkout 2.0.8 2>/dev/null + git checkout 2.0.9 2>/dev/null ./mkLinkDef.py --cmssw else diff --git a/SetupShapeOnly.sh b/SetupShapeOnly.sh index 2f25aa7..719c50b 100755 --- a/SetupShapeOnly.sh +++ b/SetupShapeOnly.sh @@ -86,7 +86,7 @@ elif [[ "$CMSSW_VERSION" == CMSSW_8_*_* ]]; then git clone git@github.com:yiiyama/multidraw.git LatinoAnalysis/MultiDraw cd LatinoAnalysis/MultiDraw - git checkout 2.0.8 2>/dev/null + git checkout 2.0.9 2>/dev/null ./mkLinkDef.py --cmssw elif [[ "$CMSSW_VERSION" == CMSSW_9_*_* ]]; then @@ -115,9 +115,9 @@ elif [[ "$CMSSW_VERSION" == CMSSW_9_*_* ]]; then echo " - MELA" git clone git@github.com:usarica/MelaAnalytics.git MelaAnalytics - cd MelaAnalytics ; git checkout -b from-v11 v1.1 ; cd .. + cd MelaAnalytics ; git checkout -b from-v19 v1.9 ; cd .. git clone https://github.com/cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement - cd ZZMatrixElement ; git checkout -b from-v215 v2.1.5 ; source setup.sh -j 12 ; cd .. + cd ZZMatrixElement ; git checkout -b from-v222 v2.2.2 ; source setup.sh -j 12 ; cd .. elif [[ "$CMSSW_VERSION" == CMSSW_10_*_* ]]; then echo "=======================================" @@ -138,10 +138,17 @@ elif [[ "$CMSSW_VERSION" == CMSSW_10_*_* ]]; then git clone git@github.com:yiiyama/multidraw.git LatinoAnalysis/MultiDraw cd LatinoAnalysis/MultiDraw - git checkout 2.0.8 2>/dev/null + git checkout 2.0.9 2>/dev/null ./mkLinkDef.py --cmssw cd ../../ - + + echo " - MELA" + + git clone git@github.com:usarica/MelaAnalytics.git MelaAnalytics + cd MelaAnalytics ; git checkout -b from-v19 v1.9 ; cd .. + git clone https://github.com/cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement + cd ZZMatrixElement ; git checkout -b from-v222 v2.2.2 ; source setup.sh -j 12 ; cd .. + else echo "=======================================" echo "You are using release $CMSSW_VERSION which is not supported by this script." From 9a125d35f98ed478fd71797aedb2620506ba69df Mon Sep 17 00:00:00 2001 From: amassiro Date: Thu, 24 Oct 2019 10:20:33 +0200 Subject: [PATCH 3/7] cmssw version added --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index e87dfe5..e66fe9f 100644 --- a/README.md +++ b/README.md @@ -62,3 +62,8 @@ in particular: https://github.com/latinos/LatinoAnalysis/tree/master/NanoGardener +# Suggested cmssw version for 13 TeV, Full Run II + + 2019, Oct 24: CMSSW_10_2_15_patch2 + + \ No newline at end of file From 29b2169558cbf1e257121ff672efbbb1932d7a98 Mon Sep 17 00:00:00 2001 From: amassiro Date: Mon, 9 Dec 2019 10:21:19 +0100 Subject: [PATCH 4/7] first commit --- SetupShapeOnlyHTTP.sh | 158 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) create mode 100755 SetupShapeOnlyHTTP.sh diff --git a/SetupShapeOnlyHTTP.sh b/SetupShapeOnlyHTTP.sh new file mode 100755 index 0000000..f27419a --- /dev/null +++ b/SetupShapeOnlyHTTP.sh @@ -0,0 +1,158 @@ +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 git@github.com: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 git@github.com:usarica/MelaAnalytics.git + + echo " - Setup MELA" + git clone git@github.com: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 git@github.com:yiiyama/multidraw.git LatinoAnalysis/MultiDraw + cd LatinoAnalysis/MultiDraw + git checkout 2.0.9 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 git@github.com:cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools + + echo " - Plotting Tools" + + git clone git@github.com:yiiyama/multidraw.git LatinoAnalysis/MultiDraw + cd LatinoAnalysis/MultiDraw + git checkout 2.0.8 2>/dev/null + ./mkLinkDef.py --cmssw + cd ../.. + + echo " - MELA" + + git clone git@github.com:usarica/MelaAnalytics.git MelaAnalytics + cd MelaAnalytics ; git checkout -b from-v19 v1.9 ; cd .. + git clone https://github.com/cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement + cd ZZMatrixElement ; git checkout -b from-v222 v2.2.2 ; 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 " - Basic Code" + + github-addext latinos/LatinoAnalysis.git LatinoAnalysis + + echo " - Nano Tools" + + git clone https://github.com/cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools + + echo " - Plotting Tools" + + git clone https://github.com/yiiyama/multidraw.git LatinoAnalysis/MultiDraw + cd LatinoAnalysis/MultiDraw + git checkout 2.0.9 2>/dev/null + ./mkLinkDef.py --cmssw + cd ../../ + + echo " - MELA" + +# git clone https://github.com/usarica/MelaAnalytics.git MelaAnalytics +# cd MelaAnalytics ; git checkout -b from-v19 v1.9 ; cd .. +# git clone https://github.com/cms-analysis/HiggsAnalysis-ZZMatrixElement.git ZZMatrixElement +# cd ZZMatrixElement ; git checkout -b from-v222 v2.2.2 ; source setup.sh -j 12 ; cd .. + +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; From 4424065df3099106307982c260cd6f572800a355 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 10 Dec 2019 16:11:07 +0100 Subject: [PATCH 5/7] update per cmsdas2019 --- Functions.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Functions.sh b/Functions.sh index 30723ab..410dd84 100644 --- a/Functions.sh +++ b/Functions.sh @@ -10,4 +10,18 @@ github-addext() { ) fi -} \ No newline at end of file +} + + +github-addext-http() { + + git clone --quiet https://github.com/$1 $2 + if [ ! -z $3 ]; then + ( + cd $2 + git checkout --quiet $3 + ) + fi + +} + From 9fc612fb0ec7c01d434e5315b9fba24af9588f05 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 10 Dec 2019 16:19:12 +0100 Subject: [PATCH 6/7] fix per cmsdas2019 --- SetupShapeOnlyHTTP.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SetupShapeOnlyHTTP.sh b/SetupShapeOnlyHTTP.sh index f27419a..e75bdf4 100755 --- a/SetupShapeOnlyHTTP.sh +++ b/SetupShapeOnlyHTTP.sh @@ -128,7 +128,7 @@ elif [[ "$CMSSW_VERSION" == CMSSW_10_*_* ]]; then echo " - Basic Code" - github-addext latinos/LatinoAnalysis.git LatinoAnalysis + github-addext-http latinos/LatinoAnalysis.git LatinoAnalysis echo " - Nano Tools" From c7fff12f074a06842a76b6f332e808dba963eb86 Mon Sep 17 00:00:00 2001 From: amassiro Date: Tue, 10 Dec 2019 16:45:14 +0100 Subject: [PATCH 7/7] again ... --- SetupShapeOnlyHTTP.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SetupShapeOnlyHTTP.sh b/SetupShapeOnlyHTTP.sh index e75bdf4..c3191bd 100755 --- a/SetupShapeOnlyHTTP.sh +++ b/SetupShapeOnlyHTTP.sh @@ -128,7 +128,7 @@ elif [[ "$CMSSW_VERSION" == CMSSW_10_*_* ]]; then echo " - Basic Code" - github-addext-http latinos/LatinoAnalysis.git LatinoAnalysis + git clone https://github.com/latinos/LatinoAnalysis.git LatinoAnalysis echo " - Nano Tools"