Mini-FCAL Beam Test Software
Multiple efforts have been initiated to analyze or simply look at the data acquired during the mini-FCAL beam test. The code for these resides in various directories spread over private directories and group directories. Some has been gathered and placed in the Hall-D subversion repository (see below).
It is recommended that future software development for the mini-FCAL data be based on the JANA framework since it will provide a common basis that will make it easier to share and compare.
The data itself is recorded in EVIO format. This format essentially wraps blocks of data in headers. The JLab DAQ group created and supports the EVIO format. The data blocks themselves are created by the Flash 250MHz (fADC250) VME/VXS modules and the format is described in the FADC250 Data Format V1 document. Code that implements the reading of the EVIO file and parses the fADC250 data had already been written and is maintained in the FCALTEST2011 plugin (see below).
In addition to the mini-FCAL specific source found in the Hall-D repository, you will also need the following packages:
Make sure each of these packages is installed and the appropriate environment variables (EVIOROOT, JANA_HOME, ROOTSYS, ...) are set.
The source code specific to the mini-FCAL beam test is maintained in the Hall-D subversion repository at the following URL:
The initial directory structure is:
The top-level Makefile simply invokes make in several of the subdirectories. If a new program or plugin is added that should be built whenever make is invoked in src, then it should be added to the Makefile explicitly.
JANA supports the use of plugins. The FCALTEST2011 plugin is used for reading and parsing the events as well as producing more refined objects (i.e. pedestal subtracted). Other plugins can be used to generate histograms or ROOT trees from the objects produced by FCALTEST2011 (see the fcal_beamtest_hists as an example).
To use the plugins, you need to tell the JANA they are being attached to about them. For example, to view an ASCII dump of the objects, you can use the janadump program like this:
janadump -PPLUGINS=FCALTEST2011 -DDMiniFCALHit fcal_152.evt.0
Source for the FCALTEST2011 plugin is kept in the repository here:
This plugin supplies an EventSource for JANA which means it contains the code that can read the data from the file and produce C++ objects from it. In addition, it has some JANA factories (algorithms) that can take those raw data objects as input and provide higher-level objects. A list of classes supplied by the FCALTEST2011 plugin is:
All of the classes that start with D250 correspond to low-level data objects produced by the fADC250 module. Most analyses will only need to deal with the DMiniFCALHit, DPaddleHit, and DRemoteScintillatorHit objects.
Note that currently, all of the high-level objects will keep pointers to the low-level objects as Associated Objects in the mechanism of the JANA framework. For examples of how to access the low-level objects via the AssociatedObject mechanism, see the evnt routine in JEventProcessor_fcal_beamtest_hists.cc
The fcal_beamtest_hists plugin provides a few histograms filled using data from the objects supplied by the FCALTEST2011 plugin. It is a good place to look for an example of how to access the data objects and fill histograms with it.
This plugin can be useful primarily online if one wishes to observe histograms being filled as the data is being taken. The source and documentation can be found at the RootSpy Website. RootSpy attaches as a plugin and simply looks for histograms created by other plugins or the executable itself and provides them to remote clients on the network. For RootSpy to work, a cMsg server must be running.
An event viewer has been written for the miniFCAL (see animated screenshot below). The two buttons towards the right that have the labels cut off are supposed to say "fADC viewer" and "Signals viewer". The first pops up a window that shows the samples of a single channel of a single module, (selected by slot and channel radio buttons). The second pops up a window with 25 histograms representing the sample spectra of the 25 Pb-glass blocks.
One can filter events using the settings in the "Display Controls" area. If no checkboxes are selected and the menu is set to "OR" then no filter is applied and every event is shown.