Skip to content

Instantly share code, notes, and snippets.

BEGIN YODA_HISTO1D /MonoH_Truth/jets
Path=/MonoH_Truth/jets
ScaledBy=9.76669596976556591e+02
Title=
Type=Histo1D
XLabel=
YLabel=
# Mean: 2.554401e+00
# Area: 1.000000e+00
# ID ID sumw sumw2 sumwx sumwx2 numEntries
Jets bjets, recon_jets; //note: here you create 2 empty containers "bjets" and "recon_jets"
foreach(const Jet & jet, jets) { //loop over non-empty container jets (from the projection) assign to variable "jet"
if(jet.containsBottom()){
bjets.push_back(jet);}
else{
recon_jets.push_back(jet);
}
}
source /cvmfs/sft.cern.ch/lcg/releases/LCG_87/gcc/4.9.3/x86_64-slc6/setup.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_87/Python/2.7.10/x86_64-slc6-gcc49-opt/Python-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_87/numpy/1.11.0/x86_64-slc6-gcc49-opt/numpy-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_87/matplotlib/1.5.1//x86_64-slc6-gcc49-opt/matplotlib-env.sh
source /cvmfs/sft.cern.ch/lcg/releases/LCG_87/MCGenerators/rivet/2.5.4/x86_64-slc6-gcc49-opt/rivetenv.sh
export PATH=/afs/cern.ch/user/a/atlaspo/workspace/texlive/2011/bin/x86_64-linux:$PATH
rivet-mkhtml Rivet.yoda
{"rules": [{"type": "offset", "id": "3a4c107e-9731-4b60-9bf3-1c4a1ab519d0", "rule": {"dependencies": {"dependency_type": "jsonpath_ready", "expressions": ["makews"]}, "type": "JsonStage", "name": "plot", "scheduler": {"step": {"process": {"interpreter": "bash", "process_type": "interpolated-script-cmd", "script": "source /usr/local/bin/thisroot.sh\nhfquickplot write_vardef {combined_model} combined nominal_vals.yml\nhfquickplot plot_channel {combined_model} combined channel1 x nominal_vals.yml -c qcd,mc2,mc1,signal -o {prefit_plot}\nhfquickplot fit {combined_model} combined fitresults.yml\nhfquickplot plot_channel {combined_model} combined channel1 x fitresults.yml -c qcd,mc2,mc1,signal -o {postfit_plot}\n"}, "environment": {"workdir": null, "imagetag": "latest", "par_mounts": [], "image": "lukasheinrich/dummyanalysis", "envscript": "", "resources": [], "env": {}, "environment_type": "docker-encapsulated"}, "publisher": {"publisher_type": "frompar-pub", "outputmap": {"postfit": "postfit_plot", "prefit": "pref
source setup.sh
./scripts/launch_histfitter_bkgfit ++config config/mbj_singlebin.json ++script python/3b.py ++generatePatchJSON
HistFitter.py -wtf -D "before,after,corrMatrix" -F bkg python/3b.py ++config config/mbj_singlebin.json patch0.json ++inputFiles /data/Bkg_21.2.18_mc16a.diboson.root /data/Bkg_21.2.18_mc16a.dijet.root /data/Bkg_21.2.18_mc16a.singletop.root /data/Bkg_21.2.18_mc16a.topEW.root /data/Bkg_21.2.18_mc16a.ttbar.root /data/Bkg_21.2.18_mc16a.W_jets.root /data/Bkg_21.2.18_mc16a.Z_jets.root /data/Data_21.2.18_20152016.root /data/Data_21.2.18_2017.root /data/Sig_21.2.18_mc16a.Gbb.root /data/Sig_21.2.18_mc16a.Gtb.root /data/Sig_21.2.18_mc16a.Gtt.root
mv results/* /outresults/
python python/pullPlot.py ++config config/mbj_singlebin.json ++resultsDir /outresults ++outDir_plots /outplots/
diff --git a/pyhf/readxml.py b/pyhf/readxml.py
index 9a3a27f..9ec8bd5 100644
--- a/pyhf/readxml.py
+++ b/pyhf/readxml.py
@@ -1,5 +1,6 @@
import os
import xml.etree.ElementTree as ET
+import numpy as np
def import_root_histogram(rootdir, filename, path, name):
0 {16,11,-12} | 0.1785 | tau-_nu_taunu_ebe-.dat;
1 {16,13,-14} | 0.1736 | tau-_nu_taunu_mubmu-.dat;
2 {16,-211} | 0.109 | tau-_pi-nu_tau.dat;
3 {16,-321} | 0.00696 | tau-_K-nu_tau.dat;
4 {16,-211,111} | 0.255 | tau-_pi-pinu_tau.dat;
5 {16,-321,310} | 0.0007 | tau-_K-KSnu_tau.dat;
6 {16,-321,130} | 0.0007 | tau-_K-KLnu_tau.dat;
7 {16,-211,310} | 0.0042 | tau-_KSpi-nu_tau.dat;
8 {16,-211,130} | 0.0042 | tau-_pi-KLnu_tau.dat;
9 {16,-321,111} | 0.0045 | tau-_K-pinu_tau.dat;
token = "TOKEN"
projname = 'testtemplaterepo9'
import gitlab
import subprocess
from cookiecutter.main import cookiecutter
gl = gitlab.Gitlab("https://gitlab.cern.ch",token,api_version=4)
- name: ground_truth_20180515_202114_b0328df7-8b40-4a26-8d84-c9d7f6039c7f
why: many final state particles where you need to get the momenta right
- name: ground_truth_20180515_202146_77c27a83-a2cb-4709-a8c7-56fe1ad8c85b
why: somewhat merged three-prong decay K- pi+ pi-
- name: ground_truth_20180515_202321_a90f52f5-2be1-4947-9ace-bc7d17fe1fbf
why: lots! of particles (10) with secondary decays (3 charged pi, 2 neutral pi -> gamgam)
apk add automake autoconf libtool && apk add python-dev musl-dev libffi-dev && apk add python-dev musl-dev libffi-dev gcc && apk add autoconf curl gcc ipset ipset-dev iptables iptables-dev libnfnetlink libnfnetlink-dev libnl3 libnl3-dev make musl-dev openssl openssl-dev && curl https://bootstrap.pypa.io/get-pip.py | python -
apk add graphviz graphviz-dev imagemagick
pip install yadage[viz] pydotplus
export PACKTIVITY_DOCKER_CMD_MOD="-u root"
yadage-run workdir workflow.yml -t gitlab-cern:lheinric/susydemor_wflow --parameter message_string="myfirstworkflow" --visualize