HOWTO save tracking results to an HDDM or EVIO file for later playback

From GlueXWiki
Revision as of 01:01, 1 April 2015 by Marki (Talk | contribs) (Text replacement - "/" to "/")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PLEASE NOTE that these instructions are deprecated. More current instructions are available at this page.


Full reconstruction of GlueX data is dominated by charged track reconstruction. As such, it is useful to save the (expensively produced) results from tracking to an output file that can be re-read later. Recently (May 2010) two mechanisms were checked into the repository to meet this need. One writes out HDDM formatted files (the format used by the GlueX Simulation) and the other writes out EVIO formatted files (the format that the DAQ system will store the raw data in). This HOWTO documents how to save and read in files of both types.

Saving to an HDDM File

One can write out HDDM formatted files with reconstructed charged tracks (DTrackTimeBased objects) using the danahddm plugin. For example:

hd_ana -PPLUGINS=phys_tree,danahddm hdgeant_smeared.hddm


The plugin is not currently built by default, but may be in the near future once it has been deemed more stable. The source code for the plugin is kept in:


To build the plugin, make sure you have a recent version of the source code (rev. 6363 or later) and, (re)build the entire source tree, and then do a "make" in the danahddm directory. It is important to build the full source tree since the data model was modified to contain a reconView branch to hold reconstructied data. This first incarnation only saves DTrackTimeBased objects, but presumably others will be added later.

HDDM input files ONLY : This plugin works by getting the pointer to the s_HDDM_t structure from the event source itself and modifying it by adding the DTrackTimeBased objects. If the input file is not of type HDDM then the plugin will complain and immediately exit the program.

Reading from an HDDM File

To read from an HDDM file containing DTrackTimeBased objects, nothing special need be done. Just process the file using a DANA program as one would normally do. For example:

hd_root -PPLUGINS=phys_tree dana_events.hddm

When the DTrackTimeBased objects are asked for, they will be found in the file and used automatically. The one down side to this is that if one did want to re-do tracking using a file that already contains DTrackTimeBased objects, there is currently no easy way to tell the program to ignore the objects in the file. That will be addressed in a future JANA version.

Saving to an EVIO file

Writing objects to an EVIO file is similar to the procedure described above. One simply needs to attach the danaevio plugin. The plugin (and its corresponding eviodana plugin) are available in rev. 6372 and later. Source code is kept in


In order to build the plugin, one needs to have the EVIO package installed and the EVIOROOT environment variable set to point to it. Run the DANA program with the danaevio plugin attached to produce the file. For example:

hd_ana -PPLUGINS=phys_tree,danaevio hdgeant_smeared.hddm

For this plugin, an event source of any type may be used.

Reading from an EVIO File

To read from an EVIO formatted file, one needs to use the eviodana plugin. Source code is kept in



hd_root -PPLUGINS=phys_tree,eviodana dana_events.evio


Questions regarding the danaevio plugin and EVIO in general should be directed to Elliott Wolin. For all other plugins or topics covered in this HOWTO, contact David Lawrence.