![]() |
Tools for Reactor-Antineutrino Studies in RAT-PAC
1.2.0
Code for running and analyzing reactor-IBD simulations
|
~ Mark J. Duvall ~ mjduvall at hawaii dot edu ~ 05/2023 ~
This is a user’s guide for the set of software within Tools for Reactor-Neutrino Studies in RAT-PAC (github.com/duvall3/rat-pac) that implements our algorithm for matching experimental datasets to reference distributions. See user/root_macros/doc/html/index.html in this repository for more information on the entire toolset.
Parameters
These instructions will make the following assumptions:
$RATDIR – often simply $HOME/rat-pac, for example.RAT-PAC experiment is located in the directory $DETECTOR – for example, DETECTOR=$RATDIR/data/some_experiment$REFDATA, $TESTDIR, and $TESTDATA, respectively. For example:REFDATA=$DETECTOR/REFTESTDIR=$REFDATA/TEST_RUNSTESTDATA=$TESTDIR/TestRun0$TESTDATA inside $REFDATA is recommendedangle_multibatch.sh (run angle_multibatch -h for details).Summary
angle_multibatch.shextractRef.cxxangle_multibatch.shextractTest.cxxcompareRef.cxx KSSummary.cxx TKSMultiRes $DETECTOR.Example:
cd $DETECTOR
angle_multibatch.sh ReferenceRun0 30 10000 50
# wait for runs to finish
mkdir -p REF
mv -t REF/ ReferenceRun0*
cd REF
REFDATA=$PWD$REFDATA and open ROOT.extractRef.cxx on the batch run’s name prefix. Example:
cd $REFDATA
rootextractRef("ReferenceRun0");$DETECTOR.Example:
cd $DETECTOR
angle_multibatch.sh TestRun0 30 1000 50
mkdir -p REF/TEST_RUNS
mkdir TestRun0
mv -t TestRun0/ TestRun0??*
mv -t REF/TEST_RUNS/ TestRun0/
cd REF/TEST_RUNS
TESTDIR=$PWD
cd TestRun0
TESTDATA=$PWD$TESTDATA and open ROOT.extractTest.cxx on the batch run’s name prefix. Example:
cd $TESTDATA
rootextractTest("TestRun0");$REFDATA and run ref_compare.sh on the relative path to $TESTDATA.ref_compare.sh script can also accept arguments to run on an individual file, to use the Anderson-Darling test instead of Kolmogorov-Smirnov, and to look for a variable other than “phi”; its full parameters and default values are as follows:ref_compare.sh <FILE|DIRECTORY> [ANDERSON_TF=false] [VARNAME=phi] Example:
cd $REFDATA
ref_compare.sh TEST_RUNS/TestRun0$TESTDATA.ROOT and run the macro KSSummary.cxx; the default parameters should work, so you can run it without arguments. This macro creates the following output files: KSSummary.root: a ROOT file containing the full results matrix and related plots;KSSummary.png: an exported PNG of the plots from the ROOT file;KSSummary.txt: a nicely-formatted ASCII view of the results matrix, with column labels included.KSSummary output files (.root, .png, and .txt) to your system (via, e.g., scp).Example:
cd $TESTDATA
rootKSSummary();
.q# on your local machine, in whatever output directory you like:
REMOTE_HOST="mtc-b" # for example
scp $REMOTE_HOST:$TESTDATA/KSSummary.{root,png,txt} .If you have completed multiple test runs, you can combine their results to analyze the detector’s performance over the aggregate dataset using TKSMultiRes as follows:
$TESTDIR.ROOT.SetRibbon() method to turn the ribbon plot on [default] or off).Run() method.Save() method.Example:
cd $TESTDIR
rootTKSMultiRes M;
//M.SetRibbon(kFALSE); // deactivate ribbon plot if desired
M.Run();
M.Save();-~- Last Updated 06/29/2023 -~-