Example for running p15.06.00 D0TrigSim and
TrigSimAnalyze on DATA
last update Oct 20, 2003
This is a cookbook-style guide to running
p15.06.00
TrigSim on DATA with trigger list
v12.30 and, as a second step, creating
a ROOT-tuple from the TrigSim output using TrigSimAnalyze.
Notation: lines that begin with "<term>" are what
gets typed into the computer prompt
- Start a new shell window.
- Set up the necessary environment:
<term> setup d0tools
<term> setup D0RunII p15.06.00
- Create a new working area, here called "myworkarea",
and enter it:
<term> newrel -t p15.06.00 myworkarea
<term> cd myworkarea
- Create a subdirectory called "trigsim":
<term> mkdir trigsim
Since you want to use a trigger list other than the default
one provided in the release, you should also create a temporary
directory into which you can unpack the trigger list you want:
<term> mkdir trig_temp
- Download the .tar file containing the *.sim* files for trigger
list v12.30 from the TrigSim web site:
http://www-d0.fnal.gov/computing/trigsim/general/triglists/global_CMT-12.30.tar
(corresponding to the v12.30 trigger list) into the temporary directory.
In most systems this can be done by right-clicking on the link above,
selecting "Save target...", and then completing the path to the
trig_temp directory.
- Go into the trig_temp directory and extract all the sim
files out of the tar file:
<term> tar -xf global_CMT-12.30.tar
Copy the sim files into the trigsim directory:
<term> cp *.sim* ../trigsim/.
and return to the working directory:
<term> cd ..
- Create a new file containing the full pathname of your raw data
file(s). If you only have one data file (let's say it's
/work/gallifrey-clued0/bellavan/data/all_0000173039_001.raw),
an easy way to do this is using echo:
<term>
echo /work/gallifrey-clued0/bellavan/data/all_0000173039_001.raw
> input.dat
If you are using more than one file, use an editor like
emacs and put one file path per line. Your "filelist" file
is now input.dat.
- Run TrigSim, first limiting it to just 10 events to make sure it
is working correctly:
<term> runD0TrigSim -filelist=input.dat
-format=data -l3toollist=auto -num=10
This command creates a new directory whose name is based on the
command line given. In this case, the new directory is called
D0TrigSim_x-p15.06.00-Linux-input-global_CMT-12.30.
If the job finished without errors, you can run your full data
set by removing the -num=10 part of the command. If you
are working on Clued0, use the batch system to run over more than
100 events (option -batch). Using the the command line
below, your results will delete and recreate the output directory
named before:
<term> runD0TrigSim -filelist=input.data
-format=data -l3toollist=auto -batch
- In the TrigSim output directory, the results of interest are
in the file(s) called outputfile_nn, where
nn is two digits. These files are numbered
automatically starting with 00, with one output file
per input file. These files are in the DST format.
- If you want to run TrigSimAnalyze to create a ROOT-tuple, start
by creating a file where you write the full path of the TrigSim
output file(s). This is just like your
input.dat file, so if you just have one output file,
you can again use echo:
<term> echo
$PWD/D0TrigSim_x-p15.06.00-Linux-input-global_CMT-12.30/outputfile_00
> output.dat
- Copy the toollist file that TrigSim created for you (because of the
-l3toollist=auto option) from the TrigSim output directory
into your working directory, renaming it to better identify it:
<term> cp
D0TrigSim_x-p15.06.00-Linux-input-global_CMT-12.30/toollist.txt
./12.30-toollist.txt
- Run TrigSimAnalyze using the following command:
<term> runTrigAnalyze -filelist=output.dat
-format=data -l3toollist=12.30-toollist.txt
This command line will produce the output directory
TrigSimAna_x-p15.06.00-Linux-output which contains the
result ROOT-tuple file trigsim.root.
Thank you to Arnaud Duperrin, who wrote up the original instruction
list for this process.
If you find any bugs or problems with the above instructions,
send an e-mail to bellavan@fnal.gov