Skip to content

Latest commit

 

History

History
167 lines (163 loc) · 5.8 KB

File metadata and controls

167 lines (163 loc) · 5.8 KB

Minimum DAQ

1 Introduction

The following instructions are based on Ubuntu LTS 22.04 install performed on Aug. 3, 2023. I am using the “Minimal Installation”

2 Initial quality-of-life

Some things to make life easier in general.

  • Set up resolution etc. to your liking
  • A background image for the TUNL/Enge group is provided in the extras folder

3 Prerequisite packages

3.1 General linux packages you need

  • Basic
    sudo apt install git openssh-server libssl-dev screen build-essential emacs
        
  • Other important tools that have various levels of necessity
    sudo apt install ess libblas-dev liblapack-dev gfortran cmake elpa-magit xorg-dev org-mode emacs-goodies-el python3-pip
        
  • Some specific ubuntu packages for DAQ analysis
    sudo apt install libboost-python-dev libboost-numpy-dev libxml2-dev python3-numpy
        
  • Make a folder to install all MIDAS-related packages
    cd
    mkdir -p midas/packages
        
  • Reboot for good measure!
    sudo shutdown -r now
        

4 Specific DAQ Prerequisites/Tools

4.1 ROOT

I try to avoid it, but MIDAS shouts if ROOT isn’t installed. You may find it useful, anyway. I prefer to just install from source

  • We’ll install in ~/midas/packages/root
    cd ~/midas/packages
    git clone --branch latest-stable --depth=1 https://github.com/root-project/root.git root_src
    mkdir root_build root_install
    cd root_build
        
  • Prepare the installation with the flags needed for MIDAS
    cmake -DCMAKE_INSTALL_PREFIX=../root_install -Dminuit2=ON -Dxml=ON ../root_src
        
  • Build and install all at once (using 4 cores of the processor)
    cmake --build . -- install -j4
        
  • Wait a long-ass time
  • Check whether it works
    source ~/midas/packages/root/root_install/bin/thisroot.sh
    root
        
  • Add the following at the end of your ~/.bashrc file. This will make sure root works every time you boot/open a terminal:
    ## Root
    source ${HOME}/midas/packages/root/root_install/bin/thisroot.sh
        
  • Close the terminal, open a new one, and check
    root
        

4.2 MIDAS

The minimum MIDAS you need for analysis

  • Make sure the environment is ready for MIDAS by putting the following at the end of your ~/.bashrc file
    ## MIDAS
    export ROOTANASYS=${HOME}/midas/packages/rootana
        
  • Close and reopen a terminal to make sure this takes effect
  • Install the MIDAS analysis package Rootana
    cd ~/midas/packages
    git clone https://bitbucket.org/tmidas/rootana
    cd rootana
        
  • Rootana needs -fPIC to work with EngeSpec
    • Edit Makefile to include -fPIC in the CXXFLAGS definition at the top
      CXXFLAGS = -g -O2 -Wall -Wuninitialized -I./include -fPIC
              
  • Compile
    make NO_MIDAS=1
        
  • If you get a compile error, try try again!
    make NO_MIDAS=1
        

5 EngeSpec

This is the main software you need for doing data analysis

  • Download the code
    cd
    git clone https://github.com/TUNL-Enge/DAQ-EngeSpec.git EngeSpec
    cd EngeSpec/lib
    cmake .
    make
        
  • You like likely see lots of BOOST_HEADER_DEPRECIATED errors. Ignore them!
  • Install all the python you need for EngeSpec
    pip install PyQt5 PySide6 matplotlib scipy lmfit pandas
        
  • Add the weird python path to your ~/.bashrc file
    export PATH=$PATH:$HOME/.local/bin
        
  • Add a link to your sort routine of choice
    cd ~/EngeSpec
    ln -s lib/libEngeSort.so EngeSort.so
        
  • Load EngeSpec
    ./EngeSpec
        
  • Make sure the sort routine loads. Go to Connect MIDAS->Offline MIDAS
  • You should see a list of defined histograms on the left
  • Now you can add a run file (mid.lz4 files) and run it (instructions on using EngeSpec are outside the scope of this document!).

6 FPPlot

This is if you want some kind of focal plane prediction.