Difference between revisions of "HOWTO save tracking results to an HDDM or EVIO file for later playback"

From GlueXWiki
Jump to: navigation, search
Line 1: Line 1:
 +
'' '''PLEASE NOTE''' that these instructions are deprecated.  More current instructions are available [https://halldweb1.jlab.org/wiki/index.php/HOWTO_convert_MC_data_to_EVIO_and_replay_it#Reading_EVIO_data at this page].''
 +
 
==Introduction==
 
==Introduction==
  

Revision as of 17:05, 26 September 2014

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

Introduction

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

NOTE: THIS CAN ONLY BE USED WHEN THE INPUT FILE IS ITSELF AN HDDM FILE (see below)

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:

sim-recon/src/programs/Utilities/plugins/danahddm

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

sim-recon/src/programs/Utilities/plugins/danaevio

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

sim-recon/src/programs/Utilities/plugins/eviodana

Example:

hd_root -PPLUGINS=phys_tree,eviodana dana_events.evio

Contacts

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.