This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from __future__ import print_function | |
import argparse | |
import os | |
import re | |
import ssl | |
import sys | |
import urllib | |
from xml.dom import minidom |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Test RooDataSet handling of TTree branch aliases. | |
The TTree::SetAlias method allows you to create "branch aliases", names that | |
point to formulas of other branches. | |
It seems RooFit will not load alias branches when importing a TTree in to a | |
RooDatSet, filling the variable with zeros. | |
This script demonstrates that, firstly by fitting the non-aliased branch 'x', | |
which works fine, and then fitting the alias to x, 'y', which fails because the | |
values are all zero. |

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this directory to PATH | |
import sys | |
import os | |
sys.path.append(os.getcwd()) | |
from Configurables import ( | |
DaVinci, | |
DecayTreeTuple, | |
GaudiSequencer, | |
ProcStatusCheck, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\begin{tikzpicture} | |
\pgfdeclareplotmark{cross} { | |
\pgfpathmoveto{\pgfpoint{-0.3\pgfplotmarksize}{\pgfplotmarksize}} | |
\pgfpathlineto{\pgfpoint{+0.3\pgfplotmarksize}{\pgfplotmarksize}} | |
\pgfpathlineto{\pgfpoint{+0.3\pgfplotmarksize}{0.3\pgfplotmarksize}} | |
\pgfpathlineto{\pgfpoint{+1\pgfplotmarksize}{0.3\pgfplotmarksize}} | |
\pgfpathlineto{\pgfpoint{+1\pgfplotmarksize}{-0.3\pgfplotmarksize}} | |
\pgfpathlineto{\pgfpoint{+0.3\pgfplotmarksize}{-0.3\pgfplotmarksize}} | |
\pgfpathlineto{\pgfpoint{+0.3\pgfplotmarksize}{-1.\pgfplotmarksize}} | |
\pgfpathlineto{\pgfpoint{-0.3\pgfplotmarksize}{-1.\pgfplotmarksize}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ROOT as R | |
from ROOT import RooFit as RF | |
# 'Unblind' or 'Blind' | |
# BLINDING = 'Blind' | |
BLINDING = 'Unblind' | |
BLIND_STR = '6LJgnoyA4Zr95gec' | |
def roovar_value(rv): | |
'''Return a pretty-printed central value and uncertainty of rv. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/roofit/roofitcore/src/RooBanner.cxx b/roofit/roofitcore/src/RooBanner.cxx | |
index 89c0338..8cc41b9 100644 | |
--- a/roofit/roofitcore/src/RooBanner.cxx | |
+++ b/roofit/roofitcore/src/RooBanner.cxx | |
@@ -10,6 +10,7 @@ | |
// END_HTML | |
// | |
+#define __ROOFIT_NOBANNER | |
using namespace std; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g++ -c -o obj/TMVAClassification.o src/TMVAClassification.cxx -g -O0 -I./include/ -Wall -std=c++11 -fPIC -pthread -stdlib=libc++ -std=c++11 -m64 -I/usr/local/Cellar/root6/6.02.04/include/root | |
g++ -c -o obj/AnyWriter.o src/AnyWriter.cxx -g -O0 -I./include/ -Wall -std=c++11 -fPIC -pthread -stdlib=libc++ -std=c++11 -m64 -I/usr/local/Cellar/root6/6.02.04/include/root | |
g++ -c -o obj/DConfig.o src/DConfig.cxx -g -O0 -I./include/ -Wall -std=c++11 -fPIC -pthread -stdlib=libc++ -std=c++11 -m64 -I/usr/local/Cellar/root6/6.02.04/include/root | |
g++ -c -o obj/MyUtils.o src/MyUtils.cxx -g -O0 -I./include/ -Wall -std=c++11 -fPIC -pthread -stdlib=libc++ -std=c++11 -m64 -I/usr/local/Cellar/root6/6.02.04/include/root | |
g++ -c -o obj/BDTTools.o src/BDTTools.cxx -g -O0 -I./include/ -Wall -std=c++11 -fPIC -pthread -stdlib=libc++ -std=c++11 -m64 -I/usr/local/Cellar/root6/6.02.04/include/root | |
rootcint -f dict/MyDict.cxx -c -p include/ROOTex.h include/LinkDef.h | |
g++ -c -o obj/ROOTex.o dict/MyDict.cxx -I./ -g -O0 -I./include/ -Wall -std=c+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ROOT | |
import numpy | |
f = ROOT.TFile('alias.root', 'recreate') | |
t = ROOT.TTree('t', 't') | |
a = numpy.zeros(1, dtype=float) | |
t.Branch('a', a, 'a/D') | |
for i in range(10): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ROOT | |
# Replace with location to your favourite ntuple | |
f = ROOT.TFile(( | |
'/Users/apearce/Physics/Data/CharmProduction2010/Reprocessed' | |
'/DVntuple.2010.12.MagUp.root' | |
), 'read') | |
t = f.Get('TupleD0Tohh/DecayTree') | |
h1 = ROOT.TH1F('h1', 'h1', 170, 1780, 1950) | |
h2 = ROOT.TH1F('h2', 'h2', 170, 1780, 1950) |