Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
// Asymmetrical Gaussian with exponential tails | |
// parameters: | |
// mean - position at maximum | |
// sigma - sigma of the Gaussian | |
// asym - asymmetry of the Gaussian ( sigmaLeft = sigma * (1 - asym), sigmaRight = sigma * (1 + asym) ) | |
// rhoL - number of sigmas from mean where left tail starts: mean - rhoL * sigmaLeft | |
// rhoR - number of sigmas from mean where right tail starts: mean + rhoR * sigmaRight | |
// | |
// Allowed values of parameters: sigma > 0, -1 < asym < 1, rhoL > 0, rhoR > 0 |
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
#!/bin/sh | |
echo 'Provisioning acron VM' | |
# Install what we'll need | |
sudo yum install -y cern-config-users cern-get-keytab arc-server | |
# Make sure we ready for Kerberos-authenticated jobs | |
sudo cern-get-keytab --force |
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 numpy as np | |
import matplotlib.pyplot as plt | |
def normfactor(hist, edges): | |
a = np.sum(hist)*(edges[1:] - edges[:-1]) | |
return a | |
def gauss(xs, loc=0.0, scale=1.0): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from distutils.spawn import find_executable | |
import logging as log | |
import os | |
import shutil | |
from subprocess import call | |
import tempfile | |
class open_eos(object): | |
"""An EOS file wrapper that acts like the native `open`. |
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 | |
"""Inspect ROOT files.""" | |
from __future__ import print_function | |
import argparse | |
import sys | |
parser = argparse.ArgumentParser(description=__doc__) | |
parser.add_argument('files', metavar='file', nargs='+', | |
help='ROOT file to inspect (ending in .root)') |
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
# Name of the delta mass variable in the workspace | |
dmass_var = 'Dst_delta_M' | |
# Species of the PDF we're about to build | |
species = 'sig' | |
workspace.factory('mu_dm_{0}[141, 146]'.format(species)) | |
workspace.factory('sigma_one_dm_{0}[1, 0, 5]'.format(species)) | |
workspace.factory('nsigma_two_dm_{0}[1.5, 1, 3]'.format(species)) | |
workspace.factory('nsigma_three_dm_{0}[1.5, 1, 3]'.format(species)) | |
workspace.factory(( | |
'expr::sigma_two_dm_{0}(' |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
from math import sqrt, sin | |
from array import array | |
import ROOT | |
# Proton mass in MeV | |
PROTON_MASS = 938.27 |