A JANA2-based application for processing FADC250 detector data from EVIO-format files. For now, the application supports extracting and decoding FADC250 data only if each EVIO event contains exactly one detector event.
- Event Source reads EVIO files, extracts run numbers from control events (skipping them), and adds physics events to the processing queue
- Factory fetches these events and passes them to the EVIO event parser
- EVIO Event Parser does EVIO event level parsing and delegates raw data parsing to Raw Data Parser
- Raw Data Parser parses raw data and creates hit objects with extracted data
- Processor consumes these hit objects and outputs the results to a ROOT file
This application was developed and tested using data from following:
- FADC250 Module: 1 unit at crate 1, slot 3
- Data Bank ID: 250
- Operating Mode: 10
Before building this application, ensure you have:
- CMake 3.16 or higher
- C++20 compatible compiler
- Git (for cloning dependencies)
- ROOT 6.3x.x (for data analysis and visualization)
This project requires the following dependencies:
JANA2 provides the core event processing framework for this application.
git clone https://github.com/JeffersonLab/JANA2.git JANA2
cd JANA2
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=`pwd`
cmake --build build --target install -j 20The EVIO library is required for reading and parsing EVIO format data files.
git clone https://github.com/JeffersonLab/evio/
cd evio
git checkout v6.1.2
cmake -S . -B build
cmake --build build --target install --parallelFor ifarm users: Use the pre-built version at /group/halld/Software/builds/Linux_Alma9-x86_64-gcc11.5.0/root/root-6.32.08
For other systems: Install ROOT following the guide at https://root.cern/install/
- Configure the build:
cmake -S . -B build -DCMAKE_PREFIX_PATH="/path/to/JANA2;/path/to/EVIO/Linux-x86_64;/path/to/ROOT"Replace the paths with your actual installation directories:
/path/to/JANA2- Your JANA2 directory/path/to/EVIO- Your EVIO directory/path/to/ROOT- Your ROOT installation (on ifarm set it to/group/halld/Software/builds/Linux_Alma9-x86_64-gcc11.5.0/root/root-6.32.08)
- Build the application:
cmake --build build --parallelBuild Types: Add -DCMAKE_BUILD_TYPE=Debug for debugging or -DCMAKE_BUILD_TYPE=Release for optimized builds.
# 1. Build JANA2
git clone https://github.com/JeffersonLab/JANA2.git JANA2
cd JANA2
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=`pwd`
cmake --build build --target install -j 20
cd ..
# 2. Build EVIO
git clone https://github.com/JeffersonLab/evio/
cd evio
git checkout v6.1.2
cmake -S . -B build
cmake --build build --target install --parallel
cd ..
# 3. Build application (adjust ROOT path as needed)
cd compton_exp
cmake -S . -B build -DCMAKE_PREFIX_PATH="/path/to/JANA2;/path/to/EVIO/Linux-x86_64;/path/to/ROOT"
cmake --build build --parallelNote: ROOT installation is not shown here. On ifarm, use the pre-built version. On other systems, install ROOT first (see Dependencies section).
After building, run the application with:
./build/compton [jana_options] <evio_file1> [evio_file2] ...The application will process the specified EVIO files and create a ROOT output file (compton.root) containing:
- Waveform TTree (
waveform_tree): Channel-by-channel waveform data with branches for slot, channel, and waveform samples - Pulse Integral Histogram (
h_integral): Distribution of pulse integral sums
You can specify a custom ROOT output filename:
# Customize ROOT output filename
./build/compton -PROOT_OUT_FILENAME=my_data.root <evio_file>compton.cc– Main application entry pointJEventSource_EVIO.cc/.h– Custom EVIO event sourceJEventProcessor_Compton.cc/.h– Main event processorJFactory_FADC250.cc/.h– Factory for FADC250 detector data
EventHits.h– Container for all event hitsEvioEventWrapper.h– Wrapper for EVIO event dataFADC250Hit.h– Base class for all FADC250 hitsFADC250PulseHit.h– Pulse hit data structureFADC250WaveformHit.h– Waveform hit data structure
EvioEventParser.cc/.h– EVIO event parsing utilitiesRawDataParser.cc/.h– Raw data parsing utilities