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 ROOT | |
import rat | |
import sys | |
file_ = ROOT.TFile(sys.argv[1]) | |
tree = file_.Get("T") | |
soc = ROOT.RAT.DS.SOC() | |
run_tree = file.Get("runT") | |
tree.SetBranchAddress("soc", soc) | |
for iEntry in range(0, tree.GetEntries()): |
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 <RAT/DS/Root.hh> | |
#include <RAT/DS/EV.hh> | |
#include <RAT/DS/Run.hh> | |
#include <TH1D.h> | |
#include <TTree.h> | |
#include <TFile.h> | |
#include <time.h> | |
using namespace std; |
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
//////////////////////////////////////////////////////// | |
/// Extracts the stopping power of the primary track. | |
/// P G Jones <[email protected]> | |
/// | |
/// 02/01/2013 : New File | |
//////////////////////////////////////////////////////// | |
#include <RAT/DS/Root.hh> | |
#include <RAT/DS/MC.hh> | |
#include <RAT/DS/Run.hh> |
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/env python | |
# Plot the stopping power versus energy, and deposited energy versus distance travelled | |
# Author P G Jones - 13/09/2012 <[email protected]> | |
import ROOT | |
import rat | |
import time | |
import sys | |
import math | |
def plot_file(file_name): |
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
//////////////////////////////////////////////////////// | |
/// My preferred method to load a root file in root. | |
/// Must load in root as .L Load.cc+ | |
/// | |
/// 11/10/2012 : New File | |
//////////////////////////////////////////////////////// | |
#include <RAT/DS/Root.hh> | |
#include <RAT/DS/EV.hh> | |
#include <RAT/DS/Run.hh> |
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
//////////////////////////////////////////////////////// | |
/// Extracts the Nhit histograms and Time histograms, into | |
/// a SNOMAN independent version. | |
/// | |
/// 06/12/10 - New File | |
//////////////////////////////////////////////////////// | |
#include <TH1D.h> | |
#include <TFile.h> | |
#include <TTree.h> |
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/env python | |
# Author P G Jones - 13/07/2012 <[email protected]> | |
# This script parses a ratdb file and loads the information into a python dict | |
import yaml # Needs installing, not part of the standard python library | |
import sys | |
from minify_json import json_minify # Available from https://github.com/getify/JSON.minify | |
def LoadRatDB( fileName ): | |
""" Load a ratdb file and return a dictionary of the contents.""" | |
ratDBFile = open( fileName, "r" ) |
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
/rat/db/set GEO[innerPMT] type "panelbuilder" | |
/rat/db/set GEO[innerPMT] bucket_type "bSNOMAN" | |
/rat/db/set GEO[innerPMT] concentrator_type "cSNOMAN" | |
/rat/db/set GEO[innerPMT] pmt_type "s1408" | |
/rat/db/set PMT[s1408] model_type "PMTOpticsSNOMAN" | |
/rat/db/set PMT[s1408] model_params "PMTOpticsSNOMAN_salt" |
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
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(column-number-mode t) | |
'(inhibit-startup-screen t) | |
'(line-number-mode t) | |
'(load-home-init-file t t) | |
'(package-selected-packages (quote (terraform-mode)))) |
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 | |
CODEFOLDER=/home/jonesph/MCComparison/Electrons/RAT | |
DATAFOLDER=/data/snoplus/jonesph/MCComparisonData | |
TEMPFOLDER=$TMPDIR | |
source /home/jonesph/snoplusenv | |
file[1]=RAT5MeV | |
cd $TEMPFOLDER |