Skip to content

Instantly share code, notes, and snippets.

View edvb's full-sized avatar

Ed van Bruggen edvb

View GitHub Profile
@edvb
edvb / h5meta
Created July 6, 2023 20:17
Display metadata for H5 run file
#!/usr/bin/env python3
"""
Created on June 22, 2023
@author: Ed van Bruggen (evanbruggen@umass.edu)
"""
import sys
import h5py
import pprint
read snippets/PPCollider.in
read FRModel.model
### me_pdf_commands
## Configure LO PDF set for the hard process
# set /Herwig/Partons/HardLOPDF:PDFName NNPDF23_lo_as_0130_qed
# set /Herwig/Partons/HardLOPDF:Member 0
# set /Herwig/Partons/HardLOPDF:MaxFlav 5
# set /Herwig/Partons/HardLOPDF:RemnantHandler /Herwig/Partons/HadronRemnants
read snippets/PPCollider.in
read FRModel.model
set /Herwig/Partons/RemnantDecayer:AllowTop Yes
### me_pdf_commands
## Configure LO PDF set for the hard process
# set /Herwig/Partons/HardLOPDF:PDFName NNPDF23_lo_as_0130_qed
# set /Herwig/Partons/HardLOPDF:Member 0
# set /Herwig/Partons/HardLOPDF:MaxFlav 5
stages:
- dependencies:
- init
name: madanalysis5
scheduler:
parameters:
hepmc:
output: hepmc
step: init
ma5_recast_card:
# Uncomment the line below to skip this analysis altogether
# @MG5aMC skip_analysis
@MG5aMC stdout_lvl=INFO
# Recasting functionalities based on DelphesMA5tune turned off. Please type
# install MadAnalysis5 --update --with_delphesMA5tune
# in the MG5 interpereter to turn them on.
@MG5aMC inputs = *.hepmc, *.hep, *.stdhep, *.lhco, *.fifo
4900001:m0 = 5000
4900002:m0 = 5000
4900003:m0 = 5000
4900004:m0 = 5000
4900005:m0 = 5000
4900006:m0 = 5000
4900011:m0 = 5000
4900012:m0 = 5000
4900013:m0 = 5000
4900014:m0 = 5000
@edvb
edvb / slant.css
Last active December 28, 2020 06:42
Add slants to edge of a HTML element
/*
* Add slants to edge of a HTML element
* To use simply add class="slant-up" to your HTML element
*/
.slant-up {
clip-path: polygon(0 5vw, 100% 0, 100% calc(100% - 5vw), 0 100%);
}
.slant-down {
#!/bin/sh
# setup environment
export ALRB_localConfigDir="/etc/hepix/sh/GROUP/zp/alrb";
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase;
source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh;
source $ATLAS_LOCAL_ROOT_BASE/packageSetups/localSetup.sh "root 6.20.06-x86_64-centos7-gcc8-opt"
# fix soem bug
export LD_LIBRARY_PATH=/afs/cern.ch/user/e/evanbrug/public/MG5_aMC_v2_7_3/HEPTools/lhapdf6/lib:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=/afs/cern.ch/user/e/evanbrug/public/MG5_aMC_v2_7_3/HEPTools/madanalysis5/madanalysis5/tools/delphes/external:$ROOT_INCLUDE_PATH
#!/usr/bin/env python3
import numpy as np
import seaborn as sns
import matplotlib.pylab as plt
import os
import sys
np.set_printoptions(threshold=sys.maxsize, linewidth=np.inf)
exp_data = np.zeros((6,7))
@edvb
edvb / cp-output.sh
Last active December 1, 2020 08:20
#!/usr/bin/env bash
SCANDIR="/eos/user/e/evanbrug/monosbb-scan-full"
END=32
for i in $(seq 1 $END)
do
MHS=$(grep mhs $SCANDIR/Events/run_${i}/run_${i}_tag_1_banner.txt | awk '{print $2}')
printf -v MHS "%.f" "$MHS"
MHS=${MHS%.*}