GettingStarted hallc replay XEM

From Xem2
Jump to navigationJump to search

Hall C Replay

Purpose

The Hall C replay is a database structure used to hold detector calibrations, detector geometry, detector maps, output templates, replay scripts, defined output histograms, run numbers and run information. You may hear people call this the 'Analyzer' or 'Engine' as the C++ analyzer is based on the earlier ENGINE code written in Fortran. HCANA itself inherits most classes from the Hall A Analyzer. The ultimate goal of the hallc_replay_XEM is to tell hcana how to analyze the raw EVIO files generated by the Hall C DAQ and process them into relevant root branches in a CERN ROOT TFile.

Location Location Location

  • Review the File Structure at JLab to understand where to save files and perform analysis.
  • Your hallc_replay_XEM should be cloned from your GitHub account, which is forked from Casey's hallc_replay_XEM in your c-xem2 group disk:
    • /group/c-xem2/$USER/hallc_replay_XEM

Never Save larger (>2MB) output root files to the /group/ disk!

SCRIPT Basics

In order to use this structure properly, HCANA must be executed in the top level directory.

  • Scripts can be executed by running hcana and typing '.x ./SCRIPTS/<spectrometer>/<run-type>/script_to_run.C'
    • Inside the scripts you will find the way hcana imports all the detector geometry, maps, and calibrations through the gHcParms, which is a THcParmsList object.
  • The detector map is loaded into the gHcDetectorMap object, which is a THcDetectorMap object.
    • A cratemap is used to relate detector components (Individual DC wires to TDCs, Hodo PMTs to ADCs, etc) so the detectors can use the signals properly.
  • A Spectrometer object is created, and the relevant detectors are added to this spectrometer.
    • The detector geometry and constants are loaded using a DBRequest call in the header of file of each detector class
  • Specialized class objects have been created to include information for the trigger, beam, target quantities, and more.

Troubleshooting

Input file lives on cache, so the file may not be pinned\ Script may not run if proper output isn't set (Make spect directories and script type directories) hcana will not run properly if not executed in top level directory of hallc_replay_XEM. Using different versions of root than the one used to compile hcana will cause hcana to crash on startup.

NEVER

NEVER PUT OUTPUT ROOT FILES ON THE GROUP DISK!