Instructions for Running NuDST Related Code
Getting Setup to Start
single Full NuDST
multiple NuDSTs using SAM
Making micro NuDSTs
Standard Histogram Sets
Running the UK Matrix Method
This page describes how to run the various
parts of the code, ranging from creation of the NuDSTs through to
creating standards sets of pre-defined histograms.
Read this page to learn more about NuDSTs ntuples themselves:
Getting Setup to Start
Right from the top...
The MINOS software is mostly described here (although there is probably
too much non-relevant information for you if you are reading this page):
Within that page there is a link to get MINOS software setup at FNAL,
There is mention of a "test release":
which you will have to set up to use the NuMuBar and NtupleUtils
To get the latest and greatest code then you should checkout the
packages from minoscvs to your test release. Having the code in the
test release will also allow you to apply your own customisations. To
add the packages and compile the code do:
> cd yourtestrelease
> srt_setup -a
> addpkg -h NuMuBar
> addpkg -h NtupleUtils
> gmake clean
> gmake all
There is a general overview of the NuMuBar and NtupleUtils "NuDST"
(links within state where to find NuMuBar group approved
Making a single Full NuDST
Firstly, determine the file that you want to process, then in generic
loon -bq path/to/NuMuBar/macros/makeDst.C sntpfile.root
An example when running on minos04.fnal.gov is:
If you have a bunch of files on your local machine then wildcards work,
loon -bq path/to/NuMuBar/macros/makeDst.C f210*.root
The resulting output will be a single NuDST ntuple in a single file
(providing that the output does not exceed the 2GB default file size
Making multiple Full
NuDSTs using SAM
The basic command is:
loon -bq 'path/to/NuMuBar/macros/makeDstSam.C("projectName",maxFiles)'
The main benefit of using SAM is that you don't have to know where the
data is and you don't have to do nearly as much bookeeping.
In order to use SAM you
basically have to run jobs at Fermilab.
A SAM "dataset" is essentially just a definition (e.g. sntp-near files
between 2005 and 2006). A SAM dataset can be used to create a
"snapshot", which is the list of files that satified the criteria given
by the definition at the time that the snapshot was created (e.g. if
additional files were processed and declared to SAM after the first
snapshot was taken then you will have to create a second snapshot to
pick them up).
Once you have a snapshot then you can create a "project". Each loon job
is given the name of the project and the maximum number of files to
process. The loon job asks the project to supply it with files up to
the maximum specified. In order to process all the files in a project
the number of loon jobs is simply: number of files in the project
divided by maximum files per job.
In the NuMuBar/tools directory there is a sam.pl script which can be
used to create the datasets, snapshots and projects. Furthermore,
sam.pl can actually be used to submit the jobs to the batch farm.
Concatenating Full NuDSTs
To avoid having hundreds of files to shift around they can be
loon -bq 'path/to/NuMuBar/macros/concatenateDSTs.C("NuDST*.root")'
This job is smart enough to take care of the POT counting as well as
other metadata. It loops over the entire tree and is I/O bound during
Micro DSTs have just the pre-selection cuts appied to them.
These are better for working with to optimise your own cuts. You can
make them from the Full or Concatenated DSTs.
For the NuMuBar Charge Separation Systematics study we used this macro:
loon -bq 'path/to/NuMuBar/macros/microDstCSS.C("NuDSTFull*.root")'
To make a NuDST with all the CC-analysis pre-selection cuts applied
(basically everything except NC-PID) do:
loon -bq 'path/to/NuMuBar/macros/microDstCC.C("NuDSTFull*.root")'
Making anti-neutrino NuDSTs
To be written...
Making Standard Histogram
There are two jobs to create standard sets of histograms.
with CC-analysis cuts:
loon -bq 'path/to/NuMuBar/macros/dstAnaCC.C("NuDSTFull*.root")'
and one with NuMuBar-analysis cuts:
loon -bq 'path/to/NuMuBar/macros/dstAnaNMB.C("NuDSTFull*.root")'
Plotting Standard Histograms
There is a suite of macros available for making
standard plots using the standard
histograms. The plotting macros access the standard histograms via
NuMuBar/macros/FileListSpecial.C. Within this macro there are two
functions of interest:
FileListSpecial::AddDataFile() and FileListSpecial::AddMCFile().
You should edit these functions so that they point at your standard
Here is the sequence of steps to take:
1.) Add the name of your standard histogram file, say
Note that it doesn't actually have to be a data file. You can always
put the MC file in AddDataFile().
2.) Run the various macros:
3.) Take the name of your second standard histogram file, say
NMBSumAna00011231.root, and add it to:
Note that it doesn't have to always be a MC file. It can be a data file
(although it depends on the macro).
4.) Run the various macros in data+MC mode with a "1":
You can save the canvases you want in the usual way from the File menu
at the top right. There are many macros available in the NuMuBar/macros
directory. Just try running them to see what they do.
Make sure you have NuMuBar in your test release (as detailed
above). Then have a look at NuMuBar/NuDSTAna::StdNMBAna(). You can put
your own cuts in the loops in that function.
Running the UK Matrix Method
Please see the separate webpage dedicated to Running the UK Matrix Method that
describes all the steps involved and also how to create the standard
files for the systematic studies.
Please email Jeff Hartnell (j.j.hartnell AT sussex.ac.uk) with