Difference between revisions of "GettingStarted hallc replay XEM"

From Xem2
Jump to navigationJump to search
Line 17: Line 17:
 
# Clone the hallc_replay_XEM into your <code>/group/c-xem2/$USER/</code> directory and cd into it.
 
# Clone the hallc_replay_XEM into your <code>/group/c-xem2/$USER/</code> directory and cd into it.
 
## Set up symbolic links to the raw INPUT data files:
 
## Set up symbolic links to the raw INPUT data files:
*** Spring 2018: <code>ln -s /cache/mss/hallc/spring17/raw/ raw-sp18</code>
+
### Spring 2018: <code>ln -s /cache/mss/hallc/spring17/raw/ raw-sp18</code>
*** Spring 2019: <code>ln -s /cache/mss/hallc/jpsi-007/raw/ raw-sp19</code>
+
### Spring 2019: <code>ln -s /cache/mss/hallc/jpsi-007/raw/ raw-sp19</code>
*** Spring 2022: Not available YET!
+
### Spring 2022: Not available YET!
 
## Set up OUTPUT directories
 
## Set up OUTPUT directories
*** <code>mkdir /volatile/hallc/xem2/$USER/ROOTfiles</code>
+
### <code>mkdir /volatile/hallc/xem2/$USER/ROOTfiles</code>
*** <code>mkdir /volatile/hallc/xem2/$USER/REPORT_OUTPUT/SHMS/PRODUCTION</code>
+
### <code>mkdir /volatile/hallc/xem2/$USER/REPORT_OUTPUT/SHMS/PRODUCTION</code>
*** <code>mkdir /volatile/hallc/xem2/$USER/REPORT_OUTPUT/HMS/PRODUCTION</code>
+
### <code>mkdir /volatile/hallc/xem2/$USER/REPORT_OUTPUT/HMS/PRODUCTION</code>
*** Link the ROOTfiles and REPORT_OUTPUT locations inside your hallc_replay_XEM.
+
### Link the ROOTfiles and REPORT_OUTPUT locations inside your hallc_replay_XEM.
 
## Run hcana in the top directory of hallc_replay_XEM
 
## Run hcana in the top directory of hallc_replay_XEM
 
'''Note:''' If you sourced the <code>/group/c-xem2/software/setup</code> file, hcana should run.  If you have not, you will need to make a symlink to the hcana executable.
 
'''Note:''' If you sourced the <code>/group/c-xem2/software/setup</code> file, hcana should run.  If you have not, you will need to make a symlink to the hcana executable.
 
## Run hcana, and when prompted with the root-like command line window, execute the SHMS production replay as explained above.
 
## Run hcana, and when prompted with the root-like command line window, execute the SHMS production replay as explained above.
*** You can load the SCRIPT first by typing .L path_to_script/the_script.C Typing the script name and pressing tab will tell you the usage <code>(RunNumber, MaxEvent)</code>
+
### You can load the SCRIPT first by typing .L path_to_script/the_script.C Typing the script name and pressing tab will tell you the usage <code>(RunNumber, MaxEvent)</code>

Revision as of 11:50, 30 August 2021

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.

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.

Making Your First Replay

  1. First follow the instructions to source the XEM2 software. This sources the current HCANA.
  2. Clone the hallc_replay_XEM into your /group/c-xem2/$USER/ directory and cd into it.
    1. Set up symbolic links to the raw INPUT data files:
      1. Spring 2018: ln -s /cache/mss/hallc/spring17/raw/ raw-sp18
      2. Spring 2019: ln -s /cache/mss/hallc/jpsi-007/raw/ raw-sp19
      3. Spring 2022: Not available YET!
    2. Set up OUTPUT directories
      1. mkdir /volatile/hallc/xem2/$USER/ROOTfiles
      2. mkdir /volatile/hallc/xem2/$USER/REPORT_OUTPUT/SHMS/PRODUCTION
      3. mkdir /volatile/hallc/xem2/$USER/REPORT_OUTPUT/HMS/PRODUCTION
      4. Link the ROOTfiles and REPORT_OUTPUT locations inside your hallc_replay_XEM.
    3. Run hcana in the top directory of hallc_replay_XEM

Note: If you sourced the /group/c-xem2/software/setup file, hcana should run. If you have not, you will need to make a symlink to the hcana executable.

    1. Run hcana, and when prompted with the root-like command line window, execute the SHMS production replay as explained above.
      1. You can load the SCRIPT first by typing .L path_to_script/the_script.C Typing the script name and pressing tab will tell you the usage (RunNumber, MaxEvent)