Difference between revisions of "Mc-single-arm (R-SIDIS version)"

From HallCWiki
Jump to navigationJump to search
 
(One intermediate revision by the same user not shown)
Line 28: Line 28:
 
==Compiling and configuring==
 
==Compiling and configuring==
 
* To compile mc-single-arm on the ifarm machines, simply type <code>make</code> in the mc-single-arm/src directory
 
* To compile mc-single-arm on the ifarm machines, simply type <code>make</code> in the mc-single-arm/src directory
* There are "helper applications in the <code>util</code> subdirectory that convert the mc-single-arm output to PAW ntuples or ROOT trees. I'm assuming everyone would rather use ROOT trees.   
+
* There are "helper" applications in the <code>util</code> subdirectory that convert the mc-single-arm output to PAW ntuples or ROOT trees. I'm assuming everyone would rather use ROOT trees.   
 
** Go to the <code>util/root_tree</code> subdirectory and type <code>make</code>
 
** Go to the <code>util/root_tree</code> subdirectory and type <code>make</code>
 
** Note that the "make_root_tree" application uses ROOT version 6.30.04 when compiling. If you load a different version when you log into ifarm, this may cause problems.
 
** Note that the "make_root_tree" application uses ROOT version 6.30.04 when compiling. If you load a different version when you log into ifarm, this may cause problems.

Latest revision as of 16:19, 15 February 2025

Setting up mc-single-arm (R-SIDIS version)

Git suff

  1. Generate ssh key if you do not have one.
    1. ssh-keygen -t rsa ( when prompted for pass phrase just hit return )
    2. ssh-add ~/.ssh/id_rsa (Note: I got an error message when I tried this on the ifarm machines, but it seemed to have worked anyway.)
  2. Put ssh public key on Github
    1. Open the "Settings" in the pull down menu on the extreme right.
    2. Go to "SSH and GPG keys"
    3. Click on "new ssh key" button. At terminal type "more ~/.ssh/id_rsa.pub". Copy the code and paste into github.
  • On the computer that you plan to run and develop the analyzer, type either:

  1. git clone git@github.com:GitHub-Username/mc-single-arm.git
    where GitHub-Username is the name of the account that you created.

  2. git clone https://github.com/GitHub-Username/mc-single-arm.git
    where GitHub-Username is the name of the account that you created.
  3. Note: I suggest doing this in your personal directory on the r-sidis group disk: /group/c-rsidis/My-Username
  4. On cdaq machines you must use https.
  5. Do
    cd mc-single-arm
  6. Do
    git remote -v and it should return (https://github.com/ could be git@github.com:)
    origin https://github.com/Github-UserName/mc-single-arm.git (fetch)
    origin https://github.com/Github-UserName/mc-single-arm.git (pull)
  7. Execute the command
    git remote add --track rctables upstream https://github.com/JeffersonLab/hcana
    or
    git remote add --track rctables upstream git@github.com:JeffersonLab/mc-single-arm
    This will be needed to keep your forked copy and local machine copy of the code up to date with the main development repository.
  8. Note that we are using a special branch of mc-single-arm. Make sure you are working in the rctables branch:
    git checkout rctables
  9. If the rctables branch on the main repository ( your "upstream" repository) changes and you want to incorporate these changes in your local copy then follow these steps:
  git fetch upstream
  git merge upstream/rctables
  git push origin rctables

Compiling and configuring

  • To compile mc-single-arm on the ifarm machines, simply type make in the mc-single-arm/src directory
  • There are "helper" applications in the util subdirectory that convert the mc-single-arm output to PAW ntuples or ROOT trees. I'm assuming everyone would rather use ROOT trees.
    • Go to the util/root_tree subdirectory and type make
    • Note that the "make_root_tree" application uses ROOT version 6.30.04 when compiling. If you load a different version when you log into ifarm, this may cause problems.
  • The worksim subdirectory of the mc-single-arm directory will be the destination for the sometimes large output ROOT trees. The group disk is not meant for large files, so I suggest making a worksim directory on the work disk, and making a symlink. In the mc-single-arm directory:
    • Remove your existing (local) worksim directory: rm -r worksim
    • Then make a worksim directory on the work disk: mkdir /work/hallc/c-rsidis/My-Username/single_arm_worksim
    • Make a symbolic link to that directory: ln -s /work/hallc/c-rsidis/My-Username/single_arm_worksim worksim