Old - Analyze a FDC Flatness Scan

From GlueXWiki
Revision as of 21:25, 25 June 2009 by Veilleux (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Quick Start

Note: The following instructions run macros that should automatically be run at the end of every scan. Check if the output files already exist in the /home/laser/FLATNESS/flatness_data/images/XXX directory before going to the trouble of running these "by hand".


  1. To get started you need a scan data file.
    These have names like "plane004 000deg 2008_11_06 09_26_26.txt" These are generally found in the ~laser/FLATNESS/flatness_data directory on the Linux computer kept in EEL126 next to the FDC laser scanner. Note that this computer can be accessed remotely via ssh or scp with the username and password that are posted in EEL126, or by copying the data files to a USB drive. [1].
  2. Run the snake_mktree program giving the data file as the only argument.
    e.g. snake_mktree "plane004 000deg 2008_11_06 09_26_26.txt"
    Note here that the double quotes(") surrounding the file name are needed since the filename contains spaces. The program should create a ROOT file with the same name as the input file, only with a ".root" suffix.
  3. Run the ROOT macros fdc_mean.C and fdc_rms.C on the resulting root file.
    These are kept in the directory ~laser/FLATNESS/macros. They either be copied to the working directory or have the path prepended when actually running them with root. These macros are kept under version control and can be accessed directly from the Hall-D svn repository if needed using the URL:
    https://halldsvn.jlab.org/repos/trunk/home/davidl/FDC_laser/macros
    Generally, the copies of these macros kept on the halldsc1.jlab.org computer in EEL126 will be used so you will not need to access the repository.
    -
    Examples of running the root macros
    root -q -b 'fdc_mean.C("plane004 000deg 2008_11_06 09_26_26.root")'
    root -q -b 'fdc_rms.C("plane004 000deg 2008_11_06 09_26_26.root")'
    -
    Notice the single quotes around the 'fdc_rms.C("plane004 000deg 2008_11_06 09_26_26.root")' . These are because the shell will try interpreting the parenthesis while we really want them to be passed as part of the argument. These should create the files fdc_mean.gif and fdc_rms.gif respectively. Note that this will overwrite any files already existing in the current directory with these name without asking.
  4. Rename the image files and copy (if needed) to an external drive.
    1. To copy to a USB drive, just plug the drive into the back of the computer and wait for the system to automount the disk. It will appear on the desktop where it can be accessed through the user interface. The disk itself will be mounted at a point inside the /media directory (e.g. /media/USB1). Once the relevant copies are made, make sure to unmount the disk before removing it. This can be done by right-clicking on the drive on the Desktop and selecting "unmount".