DRAGON Public DRAGON Private Forum Experiments Documentation Operator Information Contact Information

MD1 Energy Calibration using a ROOT Macro

This is a description of how to measure the beam energy by fitting a straight line to a series of values of MD1 NMR which centre the beam for various values of gas-target pressure, using a macro in ROOT. This will eventually be replaced by a more sophisticated program, but for now, this is a handy little tool.

  1. In the /home/dragon/root directory on isdaq04, open a file "gt_vs_md1.dat" and add (then save) the pressure and MD1 measurements in units of Torr and Gauss, in the format:

    Pressure (Torr)     NMR (Gauss)

    An example of the file contents might be:

    1.00    3365.6
    2.02    3354.2
    3.87    3333.1
  2. Start a terminal session and type root to start a ROOT session.

  3. At the ROOT prompt enter:

    root [] calib("gt_vs_md1.dat", q, m)

    Where q and m are the recoil charge-state and mass number respectively.

  4. A ROOT canvas should pop up, with a straight line fitted to the data points, and the resulting energy value diplayed. You can print this by selecting "Print" from the File drop-down menu on the canvas.

  5. When finished, in ROOT enter:

    root [] .q

Notes

  • Points can be added or subtracted while ROOT is running, then simply rerun the calib("gt_vs_md1.dat", q, m) command to refit and plot the new values.

  • Note that a conversion value of 0.0004823 is used in the calculation of the energy with this macro, but is easily changed by editing the /home/dragon/root/calib.C file.


Chris Ruiz
9 November, 2004
JEP
31 November, 2005