Difference between revisions of "NPS Software"

From Cuawiki
Jump to navigation Jump to search
Line 3: Line 3:
  
 
== Setting up HCANA and NPSlib, nps_replay Instructions ==
 
== Setting up HCANA and NPSlib, nps_replay Instructions ==
 +
=== Git repos  ===
 +
* Setup a github.com account
 
* Fork a git repo from https://github.com/JeffersonLab/hcana
 
* Fork a git repo from https://github.com/JeffersonLab/hcana
 
* Fork a git repo from https://github.com/JeffersonLab/NPSlib
 
* Fork a git repo from https://github.com/JeffersonLab/NPSlib
Line 11: Line 13:
 
* if you do not have a directory and want to do independent analysis
 
* if you do not have a directory and want to do independent analysis
 
* Create a directory /home/cdaq/Dirname  
 
* Create a directory /home/cdaq/Dirname  
* module use /apps/modulefiles/
+
* Create a directory /home/cdaq/Dirname/nps-2023
* module load cmake
+
* cd /home/cdaq/Dirname/nps-2023
* source  /apps/root/PRO/bin/thisroot.csh
+
* Setup cmake and ROOT
* git clone https://github.com/GithubUserName/hcana
+
** module use /apps/modulefiles/
* cd hcana
+
** module load cmake
* git submodule init
+
** source  /apps/root/PRO/bin/thisroot.csh
* git submodule update
+
* Setup hcana
* cd ..
+
** git clone https://github.com/GithubUserName/hcana
* cmake -B hcana-build -S hcana -DCMAKE_INSTALL_PREFIX=hcana-install
+
** cd hcana
* cmake --build hcana-build -j12
+
** git remote add --track develop upstream https://github.com/JeffersonLab/hcana
* cmake --install hcana-build/
+
** git submodule init
* setenv PATH /home/cdaq/Dirname/hcana-install/bin:$PATH
+
** git submodule update
* git clone https://github.com/GithubUserName/NPSlib
+
** cd ..
* cmake -B NPSlib-build -S NPSlib -DCMAKE_INSTALL_PREFIX=hcana-install
+
** cmake -B hcana-build -S hcana -DCMAKE_INSTALL_PREFIX=hcana-install
* cmake --build NPSlib-build/
+
** cmake --build hcana-build -j12
* cmake --install NPSlib-build/
+
** cmake --install hcana-build/
* setenv LD_LIBRARY_PATH /home/cdaq/Dirname/nps-2023/hcana-install/lib64:$LD_LIBRARY_PATH
+
** setenv PATH /home/cdaq/Dirname/hcana-install/bin:$PATH
* git clone https://github.com/GithubUserName/nps_replay
+
* Setup NPSlib
 +
** git clone https://github.com/GithubUserName/NPSlib
 +
** cmake -B NPSlib-build -S NPSlib -DCMAKE_INSTALL_PREFIX=hcana-install
 +
** cmake --build NPSlib-build/
 +
** cmake --install NPSlib-build/
 +
** setenv LD_LIBRARY_PATH /home/cdaq/Dirname/nps-2023/hcana-install/lib64:$LD_LIBRARY_PATH
 +
** git clone https://github.com/GithubUserName/nps_replay
  
 
===Starting on the cdaql3 machines (old)===
 
===Starting on the cdaql3 machines (old)===

Revision as of 20:00, 15 August 2023

NPS Software Meetings

Setting up HCANA and NPSlib, nps_replay Instructions

Git repos

Starting on the cdaqll machine

  • login into cdaql1 through the gateway
  • if you want to use the standard replay type "go_analysi_nps"
  • if you do not have a directory and want to do independent analysis
  • Create a directory /home/cdaq/Dirname
  • Create a directory /home/cdaq/Dirname/nps-2023
  • cd /home/cdaq/Dirname/nps-2023
  • Setup cmake and ROOT
    • module use /apps/modulefiles/
    • module load cmake
    • source /apps/root/PRO/bin/thisroot.csh
  • Setup hcana
  • Setup NPSlib

Starting on the cdaql3 machines (old)

    • login into cdaql3 through the gateway
    • cd /data1/cdaq/eel108
    • mkdir "name" ( make a subdirectory with your "name")
    • cd "name"
    • git clone https://github.com/"githubUserName"/hcana
    • cd hcana
    • git submodule init
    • git submodule update
    • git remote add --track develop upstream https://github.com/JeffersonLab/hcana
    • source /apps/root/PRO/setroot_CUE.csh
    • scons

Starting on the ifarm machines

    • login into ifarm
    • cd /group/nps
    • mkdir "name" ( make a subdirectory with your "name")
    • cd "name"
    • git clone https://github.com/"githubUserName"/hcana
    • cd hcana
    • git submodule init
    • git submodule update
    • git remote add --track develop upstream https://github.com/JeffersonLab/hcana
    • source /apps/root/PRO/setroot_CUE.csh
    • module load scons
    • scons -j8
  • Now you have a working hcana binary.

Setting up NPS replay directory instructions

Starting on the cdaql3 machines:

    • login into cdaql3 through the gateway
    • if you have not set up you own subdirectory:
      • cd /data1/cdaq/eel108
      • mkdir "name" ( make a subdirectory with your "name")
      • cd "name"
    • if you have subdirectory
      • cd /data1/cdaq/eel108/"name"
    • git clone https://github.com/"githubUserName"/nps_replay
    • cd nps_replay
    • git remote add --track main upstream https://github.com/JeffersonLab/nps_replay
    • mkdir /data1/cdaq/eel108/output/ROOTfiles/"name"
    • ln -sf /data1/cdaq/eel108/output/ROOTfiles/"name" ROOTfiles
    • mkdir /data1/cdaq/eel108/output/REPORT_OUTPUT/"name"
    • mkdir /data1/cdaq/eel108/output/REPORT_OUTPUT/"name"/NPS
    • mkdir /data1/cdaq/eel108/output/REPORT_OUTPUT/"name"/NPS/eel108
    • ln -sf /data1/cdaq/eel108/output/REPORT_OUTPUT/"name" REPORT_OUTPUT
    • ln -sf /data1/cdaq/NPS/ cache ( do not have access to cache disk)
    • ln -sf /data1/cdaq/NPS/ raw
    • if you are using you own hcana
      • ln -sf ../hcana/hcana
    • if you want to use the standard hcana
      • ln -sf /data1/cdaq/eel108/mkjones/hcana

Starting on the ifarm machines

    • if you are not in the c-nps group then email jones@jlab.org
      • to see what groups you are in type:"groups" when on the CUE machines.
    • if you have not set up you own subdirectory:
      • cd /group/nps
      • mkdir "name" ( make a subdirectory with your "name")
      • cd "name"
    • if you have subdirectory
      • cd /group/nps/"name"
    • git clone https://github.com/"githubUserName"/nps_replay
    • cd nps_replay
    • git remote add --track main upstream https://github.com/JeffersonLab/nps_replay
    • mkdir /volatile/hallc/nps/"name"
    • mkdir /volatile/hallc/nps/"name"/ROOTfiles
    • ln -sf /volatile/hallc/nps/"name"/ROOTfiles ROOTfiles
    • mkdir /volatile/hallc/nps/"name"/REPORT_OUTPUT
    • mkdir /volatile/hallc/nps/"name"/REPORT_OUTPUT/NPS
    • mkdir /volatile/hallc/nps/"name"/REPORT_OUTPUT/NPS/eel108
    • ln -sf /volatile/hallc/nps/"name"/REPORT_OUTPUT REPORT_OUTPUT
    • ln -sf /cache/mss/hallc/c-nps/raw raw
    • if using your own hcana binary
      • ln -sf ../hcana/hcana

Analyzing data

  • on cdaql3
    • cd /data1/cdaq/eel108/"name"/nps_replay
  • On ifarm
    • cd /group/nps/"name"/nps_replay
  • ./hcana
  • At the analyzer prompt
    • .x SCRIPTS/NPS/eel108_replay.C(nrun,nevents)
    • If events = -1 , then replay all events.
    • It is slow because we are reading sample data for all FADc channels for each event
  • Root file is output to the ROOTfiles directory.

Analysis info

Run spreadsheet EEL108

Git workflow

  • Slides on Git with the suggested workflow'

Miscellaneous Support Repos

Please post supporting scripts, online displays, debugging code, etc below.  (Github repo links please!)