- Go to https://github.com/cms-sw/cmsdist
- Fork the repository into your user space by clicking on the "Fork" bottom at the top right. If you don't have a personal GitHub account yet, please create one and create the fork.
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 | |
""" | |
Lightweight Python implementation of the Run 2 MET phi (type II) correction, following | |
https://lathomas.web.cern.ch/lathomas/METStuff/XYCorrections/XYMETCorrection_withUL17andUL18andUL16.h, | |
taken from https://twiki.cern.ch/twiki/bin/view/CMS/MissingETRun2Corrections?rev=72. | |
Downloadable source at https://mrieger.web.cern.ch/snippets/met_phi_correction.py, | |
gist at https://gist.github.com/riga/951076bcde6ea7cb4da2bf7c7417379a. |
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
INC = -I${TF_INSTALL_PATH}/include | |
LIB = -L${TF_INSTALL_PATH}/xla_aot_runtime_src | |
LIBS = -lpthread -ltf_xla_runtime | |
CXXFLAGS = -D_GLIBCXX_USE_CXX11_ABI=0 | |
.phony: all clean | |
all: test_model | |
test_model: test_model.cc my_model.o |
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 array import array | |
from scinum import Number | |
import ROOT | |
ROOT.PyConfig.IgnoreCommandLineOptions = True | |
ROOT.gROOT.SetBatch() | |
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
<? | |
// CHANGE ME: add your local www root here | |
$local_root = "/eos/home-i03/m/mrieger/www"; | |
// extensions to scan | |
$additional_extensions = array("pdf", "cxx", "eps", "root", "txt"); | |
// mode for showing hits when searching | |
// "all", "any" or empty | |
$search_pattern_mode = "any"; |
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 | |
""" | |
Helpers for loading remote files from CERN EOS. | |
""" | |
import os | |
import subprocess | |
import six |
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 | |
# import root into a cage | |
import ROOT | |
ROOT.PyConfig.IgnoreCommandLineOptions = True | |
ROOT.gROOT.SetBatch() | |
# preps | |
canvas = ROOT.TCanvas() |
This gist demonstrates how to prepare CMS TDR documents to work on Overleaf.
All of the following files should be copied to the root directory of your project:
build.sh
: Compiles the document once and saves a tex document (and the current pdf) to a new directory, named "overleaf" by default, which can be used as a root document on Overleaf. Please note that changes to this document get lost once this build script is executed again.build_docker.sh
: Executes the build script in a docker container using the official tdr build image.latexmkrc
: Tells the LaTeX compiler on Overleaf where to find the tdr tool.
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 | |
# This script showcases a few examples on how to simplify working with ROOT objects within law. | |
# | |
# Scope: | |
# 1. Usage of the low-level GuardedTFile | |
# 2. Reading and writing ROOT files via target formatters | |
# 3. Merging ROOT files with hadd_task | |
import law |
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 | |
""" | |
Example gist to be used with the cms_gist_runner. Execute via | |
> ~mrieger/public/bin/cms_gist_runner 522d2d08dab617a46444213fe202d919 -v CMSSW_11_1_2 -t | |
""" | |
import tensorflow as tf | |