Skip to content

Instantly share code, notes, and snippets.

View jstrube's full-sized avatar

Jan Strube jstrube

View GitHub Profile
@jstrube
jstrube / tubePlotting.jl
Created August 28, 2021 22:23
Plotting the ZVTop algorithm on three tracks
using GLMakie
const σT = 0.3
function tube(x0, κ, ϕ, x, y)
exp(-0.5*(x*cos(ϕ) + y*sin(ϕ) - x0 - κ*(y*cos(ϕ) - x*sin(ϕ))^2)^2 / σT^2)
end
f1(x, y) = tube(0, 0.01, 1.05, x, y)
@jstrube
jstrube / Gauge Boson Mass Resolution.ipynb
Last active December 4, 2020 04:55
Notebook to investigate the effect of detector resolution on the separation of W and Z bosons
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jstrube
jstrube / LimitsCalculator.ipynb
Last active December 4, 2020 04:52
IJulia notebook to calculate expected upper limits.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jstrube
jstrube / testEvtShapes.jl
Created December 20, 2018 06:33
Test case for julia-1.1-pre performance regression
using StaticArrays
using BenchmarkTools
using LinearAlgebra
function testfoxWolframMoments(entries)
h0 = 0.0
hd = 0.0
# init
h10 = 0.0
h20 = 0.0
@jstrube
jstrube / perfectClustering.jl
Created July 30, 2018 04:21
Starting point for finding the enveloping ellipsoid for a point cloud of calorimeter hits
###
# Compiles a cloud of calorimeter hits for each MCParticle
# Calorimeter cells with multiple hits are assigned to each particle, weighted with the correct energy contribution
###
using LCIO
using DataStructures
using PyPlot
using JuMP
@jstrube
jstrube / print_FC_Storage.py
Created January 4, 2017 12:13
ILCDIRAC script to print the usage at a given StorageElement
#!/usr/bin/env python
""" Prints the storage usage at a given storage element.
Recursively traverses the starting path up to a given depth (default 2)
"""
from DIRAC.Resources.Catalog.FileCatalogClient import FileCatalogClient
from DIRAC.Core.Base import Script
import sys
import Queue
import threading
@jstrube
jstrube / setILCGen_Metadata.py
Last active January 23, 2017 05:09
script to parse log files from SLAC and extract meta data for the DFC.
from DIRAC.Core.Base import Script
Script.initialize()
from DIRAC.Resources.Catalog.FileCatalogClient import FileCatalogClient
from DIRAC import gLogger
from urllib2 import urlopen
import os.path as path
import sys
from pprint import pprint
process Zqq = e1, E1 => u:d:s:c:b, U:D:S:C:B
mb = 0
ms = 0
mc = 0
beams = e1, E1
beams_pol_density = @(-1), @(+1)
beams_pol_fraction = 80%, 30%
sqrts = 91 GeV
# Configuration file for the color ls utility
#
# This file goes in the /etc directory, and must be world readable.
# You can copy this file to .dir_colors in your $HOME directory to override
# the system defaults.
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not
# pipes. 'all' adds color characters to all output. 'none' shuts colorization
# off.
COLOR tty