Difference between revisions of "Data Analysis - Starting Out"

From Xem2
Jump to navigationJump to search
Line 33: Line 33:
  
 
==Add Directories to the Replay==
 
==Add Directories to the Replay==
: We must make the ROOTfiles and REPORT_OUTPUT directories on the /volatile/ disk to prevent using the /group/ location inappropriately.  These directories are then symbolicly linked to the /volatile/ directories.  They can have any name you like on the /volatile/ disk, but for the scripts to work properly in hallc_replay_XEM you will need them to have the names ROOTfiles and REPORT_OUTPUT.   
+
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.   
<code>mkdir /volatile/hallc/xem2/<CUE_username>/<desired_rootfiles_name></code>
+
<code>mkdir /volatile/hallc/xem2/<CUE_username>/<desired_practice_rootfiles></code>
<code>mkdir /volatile/hallc/xem2/<CUE_username>/<desired_report_output_name></code>
+
<code>mkdir /volatile/hallc/xem2/<CUE_username>/<desired_practice_report_output></code>
<code>ln -s /volatile/hallc/xem2/<CUE_username>/<desired_rootfiles_name> ROOTfiles</code>
+
<code>ln -s /volatile/hallc/xem2/<CUE_username>/<desired_practice_rootfiles> ROOTfiles</code>
<code>ln -s /volatile/hallc/xem2/<CUE_username>/<desired_report_output_name> REPORT_OUTPUT</code>
+
<code>ln -s /volatile/hallc/xem2/<CUE_username>/<desired_practice_report_output> REPORT_OUTPUT</code>
: We must now add the subdirectories to take the output from our hallc_replay_XEM scripts.  These are as follows:
+
The output is further separated into more subdirectories to separate files for the calibration, production, and spectrometer type.  These are as follows:
 
#ROOTfiles/SHMS/
 
#ROOTfiles/SHMS/
##ROOTfiles/SHMS/CALIBRATION
+
#*CALIBRATION
##ROOTfiles/SHMS/PRODUCTION
+
#*PRODUCTION
##ROOTfiles/SHMS/TIMING
+
#*TIMING
##ROOTfiles/SHMS/SCALERS
+
#*SCALERS
 
#ROOTfiles/HMS/
 
#ROOTfiles/HMS/
##ROOTfiles/HMS/CALIBRATION
+
#*CALIBRATION
##ROOTfiles/HMS/PRODUCTION
+
#*PRODUCTION
##ROOTfiles/HMS/TIMING
+
#*TIMING
##ROOTfiles/HMS/SCALERS
+
#*SCALERS
:The CALIBRATION directories are used for running the calibration SCRIPTS.  The TIMING directories are to hold the output of the SCRIPTS in SCRIPTS/TIMING, etc.  These calibrations, timing, production, and scaler scripts are explained in more detail on the other pages of the data analysis pages.
+
: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.
  
:Now we must point the hallc_replay_XEM to the raw EVIO data files.  This is done by adding the appropriate /raw directories:
+
We must also point the hallc_replay_XEM to the raw EVIO data files.  This is done by adding the appropriate /raw directories:<br>
<code>ln -s /cache/mss/hallc/spring17/raw raw-sp18
+
<code>ln -s /cache/mss/hallc/spring17/raw raw-sp18</code><br>
<code>ln -s /cache/mss/hallc/jpsi-007/raw raw-sp19
+
<code>ln -s /cache/mss/hallc/jpsi-007/raw raw-sp19</code>
  
:The files may not be here at all times.  This is the front face of the tape library.  For more information refer to the scicomp documentation and the file structure and farm sections of getting started to use the jcace utility.
+
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 dot what?==

Revision as of 17:11, 26 September 2021

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.

By the time you have finished the practice, you should be familiar with the naming conventions, location of specific parameters, and be able to follow naming conventions. You should not make pull requests to Casey. If you want him to check something you have done while practicing, push the local changes to your origin and notify Casey via Slack.

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

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.
  • 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