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
#ifndef SIGNAL_MAKER_H | |
#define SIGNAL_MAKER_H | |
#include "HistoAnalyzer.h" | |
#include "vendor/loguru.h" | |
class SignalMaker : public HistoAnalyzer { | |
protected: |
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
#include "StEvent/StTriggerData2016.h" | |
// "event" is a class object storing the data into an nTuple | |
void StVpdPicoDstMaker::analyzeEvent(){ | |
StMuEvent *muEvent = muDst->event(); | |
const StTriggerData2016 *td = (StTriggerData2016*)muEvent->triggerData(); |
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
#define pythia_cxx | |
#include "pythia.h" | |
#include <TH2.h> | |
#include <TStyle.h> | |
#include <TCanvas.h> | |
void pythia::Loop() | |
{ | |
// In a ROOT session, you can do: | |
// root> .L pythia.C |
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
void calcCholesky( int nP, double * fCov, double* fCovSqrt ){ | |
double *C = fCovSqrt; | |
double *V = fCov; | |
// calculate sqrt(V) as lower diagonal matrix | |
for( int i = 0; i < nP; ++i ) { | |
for( int j = 0; j < nP; ++j ) { | |
C[i*nP+j] = 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
#!/usr/bin/python | |
# for command line args | |
import sys | |
# for regex | |
import re | |
#for JSON parsing | |
import json | |
# for dir searching | |
import glob |
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
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script> | |
<script type="text/x-mathjax-config"> | |
MathJax.Hub.Config({ | |
tex2jax: { | |
inlineMath: [ ['$','$'], ["\\(","\\)"] ], | |
displayMath: [ ['$$','$$'], ["\\[","\\]"] ], | |
processEscapes: true, | |
processEnvironments: true | |
}, | |
// Center justify equations in code and markdown cells. Elsewhere |
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
// SEE : notebook/notebook/static/notebook/js/outputarea.js | |
// around line 632 | |
var append_markdown = function(markdown, md, element) { | |
var type = MIME_MARKDOWN; | |
var toinsert = this.create_output_subarea(md, "output_markdown rendered_html", type); | |
var text_and_math = mathjaxutils.remove_math(markdown); | |
var text = text_and_math[0]; | |
var math = text_and_math[1]; | |
marked(text, function (err, html) { | |
html = mathjaxutils.replace_math(html, math); |
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/bash | |
docker exec -ti $1 /bin/bash |
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 subprocess as sp | |
import os | |
from multiprocessing import Pool, Queue | |
def nbd( npp, k ) : | |
cmd_template = """root4star -b -q 'macros/doNbdFitMaker.C("all_mb_fit_center_{npp}_{k}.root", 1000000, "all_mb.root", "hNCollNPart/hNCollNPart_nominal.root", "B_hRefMult_center", 50, {npp}, {k}, 0.12, 0.05, 1.0, 0 )'""" | |
print cmd_template.format( npp=npp, k=k ) | |
os.system( cmd_template.format( npp=npp, k=k ) ) |
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
#include <map> | |
#include <unordered_map> | |
#include <vector> | |
map<int, bool> runNumbers; | |
vector<int> runNumbersInFile( string fn ) { | |
TFile * f = new TFile( fn.c_str(), "READ" ); |