Skip to content

Instantly share code, notes, and snippets.

View tomeichlersmith's full-sized avatar

Tom Eichlersmith tomeichlersmith

  • University of Minnesota
  • Minneapolis, MN
View GitHub Profile
#!/bin/sh
set -o errexit
set -o nounset
set -o xtrace
# submodules without submodules of their own are easier
for sm in Conditions Ecal Framework Hcal MagFieldMap TrigScint cmake
do
sm_main="$(git -C ${sm} remote show origin | sed -n '/HEAD branch/s/.*: //p')"
@tomeichlersmith
tomeichlersmith / vary_noise.py
Last active March 24, 2023 18:32
draft config for playing with noise and readout threshold of digi emulation and reconstruction
"""digi emulation and reconstruction part of ECal pipeline"""
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument('input_files',nargs='+',help='already simulated files to re-run reco on')
parser.add_argument('--out-dir',help='directory to put output file into (default: same as first input file)')
parser.add_argument('--rothresh',help='number of ADC counts above pedestal to allow readout (default: 3)',default=3,type=float)
@tomeichlersmith
tomeichlersmith / README.md
Last active December 14, 2021 17:49
Decoding and Plotting start-up with UMN HGC ROC test stand

Decoding and Plotting Raw Data

After downloading data taken using pflib on cmslab1, we need to decode it before being able to plot the various quantities of interest. Most of this decoding work has already been implemented in ldmx-sw, so we just need to massage that into our purposes.

In this GitHub gist, I've included this note as well as a ldmx-sw configuration script for running with fire that will decode the raw data for you and put it into an easier-to-analyze form.

@tomeichlersmith
tomeichlersmith / Factory.hpp
Last active January 26, 2022 20:35
A factory for dynamically creating calsses derived from a "prototype" by name.
#ifndef FACTORY_FACTORY_HPP
#define FACTORY_FACTORY_HPP
#include <exception> // to throw not found exceptions
#include <memory> // for the unique_ptr default
#include <string> // for the keys in the library map
#include <unordered_map> // for the library
/**
* factory namespace