Data Analysis - Starting Out

From Xem2
Jump to navigationJump to search

Starting Out

The Overview section should be viewed before starting this section. (Currently under construction)


The purpose of this section is to give new members of the XEM group hands-on experience with 'hcana' and the 'replay'. A bare-bones git branch named practice has been added to the hallc_replay_XEM repository.

If none of this makes sense, make sure you have followed along with the getting started software section.

It is recommended all practice be performed in a separate directory on your /group/ disk such as:
/group/c-xem2/<CUE_username>/PRACTICE/
The practice branch is used for practice, and is not meant to be your long-term analysis branch. You should be on the master branch to get the most up-to-date calibrations. If performing a new calibration or contributing to the hallc_replay_XEM, new work should be added to a new_feature_branch and merged into your origin new_feature_branch. This is followed by a push to mrcmor100 master. Refer to the git help and software overview sections to familiarize yourself with this workflow.

Objectives

  1. Learn to setup your practice directory
    • Set up all hallc_replay_XEM directories
  2. Know what standard.kinematics and standard.database files do
  3. Learn to include parameters in hcana
    • Naming conventions of parameters in hcana
  4. Naming conventions of PARAM files in hallc_replay_XEM
  5. Run your first replay and explore the output
  6. Print the value of a parameter from hcana to the console

You should not make pull requests to Casey for your practice branch. If you want him to check that you're doing something correct, push the local changes to your origin and notify Casey via Slack.

Setting up the Replay

First you must have forked the hallc_replay_XEM repository from mrcmor100. This is outlined in the getting started - software section.

  • In /group/c-xem2/<CUE_username>/PRACTICE/ disk location:

git clone git@github.com:<username>/hallc_replay_XEM.git

  • Username should be your github username, CUE_username is your JLab username.
  • Follow along with the software section to setup git with ssh on JLab computers.
  • cd into the hallc_replay_XEM directory
  • git submodule init
  • git submodule update
  • git fetch origin practice
  • git checkout practice

Now you should have all the submodules used in the hallc_replay_XEM directory and you should be on the practice branch. Check this by typing
git branch in the hallc_replay_XEM directory.

Add Directories to the Replay

The output of hcana goes to two locations: ROOTfiles and REPORT_OUTPUT directories. These are saved on the /volatile/ disk to prevent using the /group/ location inappropriately. These directories are symbolically linked to the /volatile/ directories. The linked /volatile/ directory names can have any name you like, but the directory names in hallc_replay_XEM must be ROOTfiles and REPORT_OUTPUT. mkdir /volatile/hallc/xem2/<CUE_username>/<desired_practice_rootfiles> mkdir /volatile/hallc/xem2/<CUE_username>/<desired_practice_report_output> ln -s /volatile/hallc/xem2/<CUE_username>/<desired_practice_rootfiles> ROOTfiles ln -s /volatile/hallc/xem2/<CUE_username>/<desired_practice_report_output> REPORT_OUTPUT The output is further separated into more subdirectories to separate files for the calibration, production, and spectrometer type. These are as follows:

  1. ROOTfiles/SHMS/
    • CALIBRATION
    • PRODUCTION
    • TIMING
    • SCALERS
  2. ROOTfiles/HMS/
    • CALIBRATION
    • PRODUCTION
    • TIMING
    • SCALERS
The CALIBRATION directories are used for storing the output of calibration SCRIPTS. The TIMING directories are used to hold the output of the timing SCRIPTS in SCRIPTS/TIMING, etc. These calibrations, timing, production, and scaler scripts are explained in more detail on other pages of the data analysis pages.

We must also point the hallc_replay_XEM to the raw EVIO data files. This is done by adding the appropriate /raw directories:
ln -s /cache/mss/hallc/spring17/raw raw-sp18
ln -s /cache/mss/hallc/jpsi-007/raw raw-sp19

These locations are the front face of the tape library. Files may not always be available here, and must be retrieved by the jcache utility. For more information refer to the scicomp documentation and the file structure and farm sections of getting started to use the jcace utility.

Standard dot what?

standard.database is spectrometer specific file, and points the analyzer to run-specific calibrations. You can find these files in the DBASE directory as:

DBASE/<spec>/standard.database

  • The semicolons in PARAM files and DBASE files are comments
  • The word #include is recognized as a special word. The analyzer will read these files in similar to how standard.database. Each

HCANA Naming Conventions

hallc_replay_XEM is a framework of calibration files, replay scripts and database files that point the hallc analyzer (hcana) to the appropriate data files.

Naming Conventions for PARAM files

Running a SCRIPT

Making plots from the Replay

Viewing an hcana parameter