Skip to content

Commit 1b25f3d

Browse files
committed
Merge pull request #202 from EmyrClement/mergeTau
Merge tau unfolding into run 2 branch
2 parents 19be6a1 + 5bd93dc commit 1b25f3d

52 files changed

Lines changed: 2020 additions & 152 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ env:
1111
- ROOT=5-34-18
1212
- ROOT=6-00-00
1313
global:
14-
- CLANG_VERSION=3.4
14+
- CLANG_VERSION=3.7
15+
- GCC_VERSION=4.9
16+
- BOOST_VERSION=1.55
1517

18+
before_install: source ci/before_install.sh
1619
install: source ci/install.sh
1720
script: bash ci/test.sh
1821
cache: apt

ci/before_install.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/bin/bash
2+
# This script is meant to be called by the "before_install" step defined in
3+
# .travis.yml. See http://docs.travis-ci.com/ for more details.
4+
# The behaviour of the script is controlled by environment variabled defined
5+
# in the .travis.yml in the top level folder of the project.
6+
7+
#set -e
8+
9+
# Check if we are running Python 2 or 3. This is needed for the apt-get package names
10+
if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then
11+
export PYTHON_SUFFIX="3";
12+
fi
13+
14+
sudo add-apt-repository --yes ppa:kalakris/cmake
15+
# add repositories for gcc ${GCC_VERSION} and clang $CLANG_VERSION (set in .travis.yml)
16+
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
17+
sudo add-apt-repository --yes 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main'
18+
sudo add-apt-repository --yes 'deb http://ppa.launchpad.net/boost-latest/ppa/ubuntu precise main'
19+
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
20+
# Needed because sometimes travis' repositories get out of date
21+
sudo apt-get update -q
22+
# Install the dependencies we need
23+
time sudo apt-get -q install cmake clang-${CLANG_VERSION} libclang-${CLANG_VERSION}-dev gcc-${GCC_VERSION} g++-${GCC_VERSION} boost${BOOST_VERSION} libboost${BOOST_VERSION}-dev libboost-test${BOOST_VERSION}-dev \
24+
python${PYTHON_SUFFIX}-numpy python${PYTHON_SUFFIX}-sphinx python${PYTHON_SUFFIX}-nose python${PYTHON_SUFFIX}-pip cython${PYTHON_SUFFIX}
25+
if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then
26+
time sudo apt-get install -qq python-matplotlib python-tables;
27+
fi
28+
29+
pip install nose --upgrade
30+
nosetests -V
31+
32+
# setup newer compilers ( we need gcc >= 4.7 for c++11
33+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 50;
34+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} 50;
35+
sudo update-alternatives --set gcc /usr/bin/gcc-${GCC_VERSION};
36+
sudo update-alternatives --set g++ /usr/bin/g++-${GCC_VERSION};
37+
38+
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${CLANG_VERSION} 50;
39+
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-${CLANG_VERSION} 50;
40+
sudo update-alternatives --set clang /usr/bin/clang-${CLANG_VERSION};
41+
sudo update-alternatives --set clang++ /usr/bin/clang++-${CLANG_VERSION};

ci/install.sh

Lines changed: 9 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,7 @@
44
# The behavior of the script is controlled by environment variabled defined
55
# in the .travis.yml in the top level folder of the project.
66

7-
#set -e
8-
9-
# Check if we are running Python 2 or 3. This is needed for the apt-get package names
10-
if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then
11-
export PYTHON_SUFFIX="3";
12-
fi
13-
14-
# add repositories for gcc 4.8 and clang $CLANG_VERSION (set in .travis.yml)
15-
sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
16-
sudo add-apt-repository --yes 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise main'
17-
wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
18-
# Needed because sometimes travis' repositories get out of date
19-
time sudo apt-get update -qq
20-
21-
# Install the dependencies we need
22-
time sudo apt-get -qq install clang-${CLANG_VERSION} libclang-${CLANG_VERSION}-dev gcc-4.8 g++-4.8
23-
time sudo apt-get install -qq python${PYTHON_SUFFIX}-numpy python${PYTHON_SUFFIX}-sphinx python${PYTHON_SUFFIX}-nose python${PYTHON_SUFFIX}-pip cython${PYTHON_SUFFIX}
24-
# matplotlib and PyTables are not available for Python 3 as packages from the main repo yet.
25-
if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then
26-
time sudo apt-get install -qq python-matplotlib python-tables;
27-
fi
7+
set -e
288

299
# Install a ROOT binary that we custom-built in a 64-bit Ubuntu VM
3010
# for the correct python / ROOT version
@@ -38,38 +18,16 @@ source root/bin/thisroot.sh
3818
root -l -q
3919
python -c "import ROOT; ROOT.TBrowser()"
4020

41-
# setup newer compilers for ROOT 6
42-
if [[ $ROOT == '6-00-00' ]]; then
43-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50;
44-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50;
45-
sudo update-alternatives --set gcc /usr/bin/gcc-4.8; sudo update-alternatives --set g++ /usr/bin/g++-4.8;
46-
fi
47-
48-
# setup vpython with all packages
49-
# being standalone.sh
5021
#DailyPythonTools location
5122
export base=`pwd`
5223

24+
# setup vpython with all packages
5325
# package list from FinalStateAnalysis
5426
# (https://github.com/uwcms/FinalStateAnalysis/blob/master/recipe/install_python.sh)
55-
echo "Installing yolk"
56-
time sudo pip install -U yolk
57-
echo "Installing ipython"
58-
time sudo pip install -U ipython
59-
echo "Installing termcolor"
60-
time sudo pip install -U termcolor
6127
echo "Installing uncertainties <-- awesome error propagation"
62-
time sudo pip install -U uncertainties
63-
echo "Install progressbar"
64-
time sudo pip install -U progressbar
65-
echo "Installing argparse"
66-
time sudo pip install -U argparse
67-
echo "Installing pudb <-- interactive debugging"
68-
time sudo pip install -U pudb
69-
echo "Installing dateutil"
70-
time sudo pip install python-dateutil
71-
echo "Installing PrettyTable"
72-
time sudo pip install PrettyTable
28+
time pip install -U uncertainties
29+
echo "Installing tabulate (latex table printing, etc)"
30+
pip install tabulate
7331

7432
echo "Installing rootpy"
7533
time pip install --user -e $base/external/rootpy
@@ -82,7 +40,8 @@ if [ ! -d "$base/external/lib" ]; then
8240
mkdir $base/external/lib
8341
echo "Building RooUnfold"
8442
cd $base/external/RooUnfold/
85-
make -j4
43+
cmake CMakeLists.txt
44+
make
8645
#remove tmp folder
8746
rm -fr $base/external/RooUnfold/tmp
8847
mv $base/external/RooUnfold/libRooUnfold.so $base/external/lib/.
@@ -92,7 +51,7 @@ if [ ! -d "$base/external/lib" ]; then
9251

9352
echo "Building TopAnalysis"
9453
cd $base/external/TopAnalysis/
95-
make -j4
54+
make
9655
# remove tmp folder
9756
rm -fr $base/external/TopAnalysis/tmp
9857
mv $base/external/TopAnalysis/libTopSVDUnfold.so $base/external/lib/.
@@ -102,6 +61,6 @@ fi
10261

10362
cd $base
10463
export PATH=$PATH:$base/bin
105-
# end standalone.sh
64+
10665
# add base path from setup_standalone to PYTHONPATH
10766
export PYTHONPATH=$PYTHONPATH:$base
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"config_for" : "src/unfolding_tests/get_best_regularisation.py",
3+
"truth" : {
4+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
5+
"histogram": "unfolding_HT_analyser_electron_channel/truth"
6+
},
7+
"gen_vs_reco" : {
8+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
9+
"histogram": "unfolding_HT_analyser_electron_channel/response_without_fakes"
10+
},
11+
"measured" : {
12+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
13+
"histogram": "unfolding_HT_analyser_electron_channel/measured"
14+
},
15+
"data" : {
16+
"file": "data/absolute_eta_M3_angle_bl/7TeV/HT/fit_results/central/fit_results_electron_patType1CorrectedPFMet.txt",
17+
"histogram": "TTJet"
18+
},
19+
"output_folder": "plots/7TeV/unfolding_tests",
20+
"output_format": ["png", "pdf"],
21+
"centre-of-mass energy" : 7,
22+
"channel": "electron",
23+
"variable": "HT"
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"config_for" : "src/unfolding_tests/get_best_regularisation.py",
3+
"truth" : {
4+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
5+
"histogram": "unfolding_HT_analyser_muon_channel/truth"
6+
},
7+
"gen_vs_reco" : {
8+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
9+
"histogram": "unfolding_HT_analyser_muon_channel/response_without_fakes"
10+
},
11+
"measured" : {
12+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
13+
"histogram": "unfolding_HT_analyser_muon_channel/measured"
14+
},
15+
"data" : {
16+
"file": "data/absolute_eta_M3_angle_bl/7TeV/HT/fit_results/central/fit_results_muon_patType1CorrectedPFMet.txt",
17+
"histogram": "TTJet"
18+
},
19+
"output_folder": "plots/7TeV/unfolding_tests",
20+
"output_format": ["png", "pdf"],
21+
"centre-of-mass energy" : 7,
22+
"channel": "muon",
23+
"variable": "HT"
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"config_for" : "src/unfolding_tests/get_best_regularisation.py",
3+
"truth" : {
4+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
5+
"histogram": "unfolding_HT_analyser_electron_channel/truth"
6+
},
7+
"gen_vs_reco" : {
8+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
9+
"histogram": "unfolding_HT_analyser_electron_channel/response_without_fakes"
10+
},
11+
"measured" : {
12+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
13+
"histogram": "unfolding_HT_analyser_electron_channel/measured"
14+
},
15+
"data" : {
16+
"file": "data/absolute_eta_M3_angle_bl/8TeV/HT/fit_results/central/fit_results_electron_patType1CorrectedPFMet.txt",
17+
"histogram": "TTJet"
18+
},
19+
"output_folder": "plots/8TeV/unfolding_tests",
20+
"output_format": ["png", "pdf"],
21+
"centre-of-mass energy" : 8,
22+
"channel": "electron",
23+
"variable": "HT"
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"config_for" : "src/unfolding_tests/get_best_regularisation.py",
3+
"truth" : {
4+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
5+
"histogram": "unfolding_HT_analyser_muon_channel/truth"
6+
},
7+
"gen_vs_reco" : {
8+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
9+
"histogram": "unfolding_HT_analyser_muon_channel/response_without_fakes"
10+
},
11+
"measured" : {
12+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
13+
"histogram": "unfolding_HT_analyser_muon_channel/measured"
14+
},
15+
"data" : {
16+
"file": "data/absolute_eta_M3_angle_bl/8TeV/HT/fit_results/central/fit_results_muon_patType1CorrectedPFMet.txt",
17+
"histogram": "TTJet"
18+
},
19+
"output_folder": "plots/8TeV/unfolding_tests",
20+
"output_format": ["png", "pdf"],
21+
"centre-of-mass energy" : 8,
22+
"channel": "muon",
23+
"variable": "HT"
24+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"config_for" : "src/unfolding_tests/get_best_regularisation.py",
3+
"truth" : {
4+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
5+
"histogram": "unfolding_MET_analyser_electron_channel_patType1CorrectedPFMet/truth"
6+
},
7+
"gen_vs_reco" : {
8+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
9+
"histogram": "unfolding_MET_analyser_electron_channel_patType1CorrectedPFMet/response_without_fakes"
10+
},
11+
"measured" : {
12+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
13+
"histogram": "unfolding_MET_analyser_electron_channel_patType1CorrectedPFMet/measured"
14+
},
15+
"data" : {
16+
"file": "data/absolute_eta_M3_angle_bl/7TeV/MET/fit_results/central/fit_results_electron_patType1CorrectedPFMet.txt",
17+
"histogram": "TTJet"
18+
},
19+
"output_folder": "plots/7TeV/unfolding_tests",
20+
"output_format": ["png", "pdf"],
21+
"centre-of-mass energy" : 7,
22+
"channel": "electron",
23+
"variable": "MET",
24+
"n_toy": 1000,
25+
"n_tau_scan_points": 100
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"config_for" : "src/unfolding_tests/get_best_regularisation.py",
3+
"truth" : {
4+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
5+
"histogram": "unfolding_MET_analyser_muon_channel_patType1CorrectedPFMet/truth"
6+
},
7+
"gen_vs_reco" : {
8+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
9+
"histogram": "unfolding_MET_analyser_muon_channel_patType1CorrectedPFMet/response_without_fakes"
10+
},
11+
"measured" : {
12+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/7TeV/unfolding/unfolding_TTJets_7TeV_asymmetric.root",
13+
"histogram": "unfolding_MET_analyser_muon_channel_patType1CorrectedPFMet/measured"
14+
},
15+
"data" : {
16+
"file": "data/absolute_eta_M3_angle_bl/7TeV/MET/fit_results/central/fit_results_muon_patType1CorrectedPFMet.txt",
17+
"histogram": "TTJet"
18+
},
19+
"output_folder": "plots/7TeV/unfolding_tests",
20+
"output_format": ["png", "pdf"],
21+
"centre-of-mass energy" : 7,
22+
"channel": "muon",
23+
"variable": "MET",
24+
"n_toy": 1000,
25+
"n_tau_scan_points": 100
26+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"config_for" : "src/unfolding_tests/get_best_regularisation.py",
3+
"truth" : {
4+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
5+
"histogram": "unfolding_MET_analyser_electron_channel_patType1CorrectedPFMet/truth"
6+
},
7+
"gen_vs_reco" : {
8+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
9+
"histogram": "unfolding_MET_analyser_electron_channel_patType1CorrectedPFMet/response_without_fakes"
10+
},
11+
"measured" : {
12+
"file": "/hdfs/TopQuarkGroup/results/histogramfiles/AN-14-071_6th_draft/8TeV/unfolding/unfolding_TTJets_8TeV_asymmetric.root",
13+
"histogram": "unfolding_MET_analyser_electron_channel_patType1CorrectedPFMet/measured"
14+
},
15+
"data" : {
16+
"file": "data/absolute_eta_M3_angle_bl/8TeV/MET/fit_results/central/fit_results_electron_patType1CorrectedPFMet.txt",
17+
"histogram": "TTJet"
18+
},
19+
"output_folder": "plots/8TeV/unfolding_tests",
20+
"output_format": ["png", "pdf"],
21+
"centre-of-mass energy" : 8,
22+
"channel": "electron",
23+
"variable": "MET",
24+
"n_toy": 1000,
25+
"n_tau_scan_points": 100
26+
}

0 commit comments

Comments
 (0)