View example.tex
This file contains 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
\documentclass[11pt]{article} | |
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots. | |
\geometry{letterpaper} % ... or a4paper or a5paper or ... | |
%\geometry{landscape} % Activate for for rotated page geometry | |
%\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent | |
\usepackage{graphicx} | |
\usepackage{amssymb} | |
\usepackage{epstopdf} | |
\usepackage[ |
View gist:24f6b1f4074b65dd34f0
This file contains 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
from IPython.display import HTML | |
try: | |
myf = open('custom.css') | |
htmlstring = "<style>%s </style>" %(myf.read()) | |
HTML(htmlstring) | |
except IOError: | |
print "no file" |
View gist:96c4930b87b98387a11a
This file contains 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
javascript:(function%20()%20%7Bvar%20els%20=%20%5B'div',%20'p',%20'span',%20'td',%20'th',%20'tr',%20'body',%20'section'%5D;%20for%20(var%20k%20=%200;%20k%20%3C%20els.length;%20++k)%20%7B%20$(els%5Bk%5D).css('font-family',%20'Arial');%7D%7D)(); |
View RooBSplineExample.py
This file contains 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 as np | |
def makeBSpline(w,interpParam, observable, pdfList, paramPoints): | |
# source code for these classes can be found here: | |
# https://github.com/svenkreiss/roostats/tree/development/roofit/histfactory | |
#if you don't have this class in your ROOT library, but have it locally | |
ROOT.gROOT.ProcessLine(".L RooBSpline.cxx+") | |
paramVec = ROOT.TVectorD(len(paramPoints)) |
View RooMomentMorphExample.C
This file contains 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
#for python, look here: https://gist.github.com/cranmer/46fff8d22015e5a26619 | |
void testMM(){ | |
// #Make statistical model | |
w = new RooWorkspace("w"); | |
w->factory("Exponential::e(x[-5,15],tau[-.15,-3,0])"); | |
x = w->var("x"); | |
w->factory("mu[0,10]"); | |
mu = w->var("mu"); | |
frame = x->frame(); | |
RooArgList pdfs; |
View RooMomentMorphExample.py
This file contains 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
#for C++ look here: https://gist.github.com/cranmer/b67830e46d53d5f7cf2d | |
import ROOT | |
import numpy as np | |
def testMomentMorph(): | |
#Going to make a few statistical models we want to interpolate | |
#initialize workspace with some common background part | |
w = ROOT.RooWorkspace('w') | |
w.factory('Exponential::e(x[-5,15],tau[-.15,-3,0])') | |
x = w.var('x') |