Reading SLAD output

SLAD output is a set of DSTs (data summary tapes), readable by plain old ROOT. No DarkArt files necessary! The list of variables in the various SLAD files is provided in SLAD variables.

SLAD output makes use of friend trees. It allows different variables to live in different TTrees (which need not be in the same files!), while allowing access to those variables from a single TTree. Default SLAD output includes 3 files with suffixes: .root, _chan.root, and _allpulses.root. The main TTree is called events and lives in the .root file. The _chan.root file contains channel-level information for S1, S2, pulses, etc. And the _allpulses.root file contains information on ALL pulses. Also available are xy files: _masas_xy.root, _xylocator_xy.root (Jason's xy), and _aww_xy.root.

Example macros

Please see below for Example macros for SLAD version v2.3.2.

Detailed example macros are available on at /scratch/darkside/aldenf/sladReaderExample/ (the /scratch/darkside directory is only available on ds50srv01).
Make a copy that directory. There are two macros: example1.C and example2.C along with a sample data file.

To use these macros on, you will need to use ROOT. Get access to ROOT by doing

source /ds50/app/ds50/setup_highlevel


This example macro shows how to apply cuts and build histograms with very few lines of code. It uses the TTree::Draw() method. It is ideal for quick 'n dirty analysis.

It can be run in interpreted or in compiled mode:

root -b -q example1.C
root -b -q example1.C+

It produces a ROOT file, example1.root, with output histograms.

  • Requires minimal amount of coding per histogram
  • Fast and easy to run when not too many histograms
  • Becomes slow with large numbers of histograms
  • Some cuts or variables cannot be expressed using the TTree::Draw() method


This example shows how to apply cuts and build histograms using an event loop. This method is slightly slower but is more powerful and scales well to large numbers of histograms.

It can also be run in interpreted or in compiled mode. Compiled mode is faster, especially when dealing with a large number of events.

root -b -q example2.C
root -b -q example2.C+

It produces a ROOT file, example2.root, with output histograms.

  • Allows for more complex analysis
  • Scales well to large numbers of histograms
  • Easy to run
  • Requires some extra programming (but still manageable)
  • Slightly slower

Example macros for SLAD v2.3.2

(Last update on 07/10/2016 by Masa)
Code ( written by Luca P. can be found at the bottom of this page. ROOT version 6 is required.
To set up ROOT version 6, please use following command

setup root v6_06_04b -q e10:prof

Accessing DSTs

SLAD DSTs for most runs are available on at /scratch/darkside/slad. There is one set of DSTs for each run. One set consists of (for SLAD v2.3):
  • RunXXXXXX.root
  • RunXXXXXX_chan.root
  • RunXXXXXX_allpulses.root
  • RunXXXXXX_masas_xy.root
  • RunXXXXXX_xylocator_xy.root
  • RunXXXXXX_aww_xy.root

You will often want to join multiple runs together for your analysis. To do so, you may use ROOT's hadd tool. Suppose you want to join the DSTs for runs 5372 and 5375 together into a single file, called combo.root. Then do:

export SLADDATA=/scratch/darkside/slad/v2.3
hadd combo.root $SLADDATA/Run005372.root $SLADDATA/Run005375.root
hadd combo_chan.root $SLADDATA/Run005372_chan.root $SLADDATA/Run005375_chan.root
hadd combo_allpulses.root $SLADDATA/Run005372_allpulses.root $SLADDATA/Run005375_allpulses.root
hadd combo_masas_xy.root $SLADDATA/Run005372_masas_xy.root $SLADDATA/Run005375_masas_xy.root
hadd combo_xylocator_xy.root $SLADDATA/Run005372_xylocator_xy.root $SLADDATA/Run005375_xylocator_xy.root
hadd combo_aww_xy.root $SLADDATA/Run005372_aww_xy.root $SLADDATA/Run005375_aww_xy.root

It is important to preserve the filename suffixes. The example macros look for them.