Difference between revisions of "BPM Calibration"

From PREX Wiki
Jump to navigationJump to search
(Created page with "<span style="color:red">In the process of editing and updating this page. Please contact Juliette Mammei <B>[mailto:crowder@jlab.org?Subject=PREXwiki crowder@jlab.org]</B> wit...")
 
Line 1: Line 1:
 
<span style="color:red">In the process of editing and updating this page. Please contact Juliette Mammei <B>[mailto:crowder@jlab.org?Subject=PREXwiki crowder@jlab.org]</B> with questions or suggestions.</span>
 
<span style="color:red">In the process of editing and updating this page. Please contact Juliette Mammei <B>[mailto:crowder@jlab.org?Subject=PREXwiki crowder@jlab.org]</B> with questions or suggestions.</span>
 
<br><br>
 
<br><br>
[https://prex.jlab.org/wiki/index.php/Main_Page <B>PREX Main</B>]<< [[Information for Shift Takers]] << [[Shift Leader]] << [[HOW TOs]]
+
[https://prex.jlab.org/wiki/index.php/Main_Page <B>PREX Main</B>]<< [[Information for Shift Takers]] << [[Shift Leader]] << [[HOW TOs]] << [[Expert Tools]]
  
 
== Getting Started ==
 
== Getting Started ==
 
=== Where can I find the files I need? ===
 
=== Where can I find the files I need? ===
You need to be logged on to the a-onl account
+
You need to be logged on to the a-onl account:
  <code> ssh –X aonl@aonl2 </code>
+
<font face="Courier"> ssh –X aonl@aonl2 </font>
  
* Macros are located in
+
* Analysis macros are located in
 
** <pre> /adaqfs/home/a-onl/rastersize/bpmCalibration </pre>
 
** <pre> /adaqfs/home/a-onl/rastersize/bpmCalibration </pre>
  
Line 26: Line 26:
 
#* Write down the Entry Log # and Timestamp
 
#* Write down the Entry Log # and Timestamp
 
#* An example can be found [[https://logbooks.jlab.org/entry/3691960/ here]]
 
#* An example can be found [[https://logbooks.jlab.org/entry/3691960/ here]]
 
 
# Log into your ops account
 
# Log into your ops account
<code> ssh ''username''@opsl01 </code>
+
#*<pre> ssh ''username''@opsl01 </pre>
 
# Harp scan files can be found in
 
# Harp scan files can be found in
/cs/data/harpData/IHA1H04A and /cs/data/harpData/IHA1H04AIHA1H04B
+
#* <pre> /cs/data/harpData/IHA1H04A and /cs/data/harpData/IHA1H04B </pre>
# Create a new directory in the /adaqfs/home/a-onl/rastersize/bpmCalibration directory for your harp scans
+
# Create a new directory in the <font face="Courier"> /adaqfs/home/a-onl/rastersize/bpmCalibration </font> directory for your harp scans
 
#* Some example directories are already there
 
#* Some example directories are already there
# scp the harp scan files into the new directory
+
# scp the harp scan files '''for your harp scans''' into the new directory
  
  
 
== How to Analyze the Pedestal Run ==
 
== How to Analyze the Pedestal Run ==
 +
# Make sure you are in the [[BPM Calibration#GettingStarted#Where can I find the files I need?|correct directory for macros]].
 
# [[Spot++| Run spot++]] on the [[Bullseye scans#BPM pedestal run|pedestal runs]] that you took for the LHRS and RHRS.
 
# [[Spot++| Run spot++]] on the [[Bullseye scans#BPM pedestal run|pedestal runs]] that you took for the LHRS and RHRS.
 
# Run <font face="Courier">pedestals.C</font>
 
# Run <font face="Courier">pedestals.C</font>
#*  
+
#* Changes to make
 +
#*# Change the name and location of the root file for the LHRS and RHRS pedestal runs
 +
# Save the resulting plots
 +
# The pedestals are the means of the gaussian fits to the data.
 +
#* Write down the pedestals or save them to a file - Right now it doesn’t output to a file or anything
 +
# Update database files in the [[BPM Calibration#GettingStarted#Where can I find the files I need?|database directory]]
 +
#* '''Make sure to put today’s date with the timestamp 00:00:00!''' The analyzer will use the pedestals from the most recent date.
 +
#* Change the pedestals in these files:
 +
#*# <font face="Courier"> db_Lrb.BPMA.db </font>
 +
#*# <font face="Courier"> db_Lrb.BPMB.db </font>
 +
#*# <font face="Courier"> db_Rrb.BPMA.db </font>
 +
#*# <font face="Courier"> db_Rrb.BPMB.db </font>
 +
 
 +
 
  
 
== How to Analyze the Harp Scan Data ==
 
== How to Analyze the Harp Scan Data ==
 +
# Make sure you are in the [[BPM Calibration#GettingStarted#Where can I find the files I need?|correct directory for macros]].
 +
# Run <font face="Courier">get_harp_pos.C</font>
 +
#* <span style="color:red"> '''Run TWICE''' </span> - once for LHRS and once for RHRS
 +
#* Changes to make
 +
#*# Change <font face="Courier"> char date[256] </font> to the date the harp scans were taken
 +
#*# Change <font face="Courier"> run_number[5] </font> to the run numbers for the LHRS or RHRS
 +
#*# Change <font face="Courier"> logbook_num[5] </font> to the corresponding harp run numbers
 +
#*# Change <font face="Courier"> timestamp[] </font> to the corresponding harp timestamps
 +
#*#* First come the timestamps for harp A, and then for harp B
 +
#*# Change the name of the text file that will store the results
 +
#*#* <font face="Courier"> sprintf(Hresults, ''“filename”'') </font>
 +
#*#* put L or R in the filename so you know the difference between the LHRS and RHRS files
 +
#*# Change the directory of where the harp files are stored
 +
#*#* <font face="Courier"> sprintf(file_name, ''“dirname”'') </font>
 +
# Save the pdf files
 +
#* 5 each for Harp A and B
 +
# When you are done, you should see two new .txt files, one for harp scan results for the LHRS, and one for the RHRS.
  
 
== How to Calibrate the BPMs ==
 
== How to Calibrate the BPMs ==
 
+
# Make sure you are in the [[BPM Calibration#GettingStarted#Where can I find the files I need?|correct directory for macros]].
== How To Run spot++ ==
+
# [[Spot++| Run spot++]] on the [[Bullseye scans#BPM pedestal run|pedestal runs]] that you took for the LHRS and RHRS.
# You need to be logged on to the a-onl account
+
#* This will analyze the data with the old calibration parameters
#* <font face="Courier">ssh –X aonl@aonl2 –l a-onl</font>
+
#Run
# If part of a [[Beam Recovery]] procedure, make sure you have taken a CODA run in [[CODA#Starting Counting Mode DAQ CODA | counting mode]] for the LHRS
 
#Then type either:
 
#* <font face="Courier"> spot_L ''run#'' </font> for the LHRS (Recommended) <p> <font face="Courier"> spot_R ''run#'' </font> for the RHRS </p>
 
#*If no run # is given, analyzes last run taken
 
# Plots should pop up after a few seconds
 
# When prompted, type <font face="Courier"> y </font> or <font face="Courier"> n </font> to upload the plots to the Elog (or not)
 

Revision as of 13:56, 24 June 2019

In the process of editing and updating this page. Please contact Juliette Mammei crowder@jlab.org with questions or suggestions.

PREX Main<< Information for Shift Takers << Shift Leader << HOW TOs << Expert Tools

Getting Started

Where can I find the files I need?

You need to be logged on to the a-onl account: ssh –X aonl@aonl2

  • Analysis macros are located in
    •  /adaqfs/home/a-onl/rastersize/bpmCalibration 
  • Database files are located in
    •  /adaqfs/home/a-onl/rastersize/DB 
  • Output files are located in
    •  /chafs1/work1/spot 
    • Root output files have the format Lrun#.root or Rrun#.root for the LHRS and RHRS, respectively
    • Plot output files have the format FADC_prex_run#.pdf
  • Harp scan file location is described below

Getting the harp scan files

You will need to have an ops account to do this.

  1. Check the HALOG for the HarpFitter entries corresponding to the harp scans you took
    • Write down the Entry Log # and Timestamp
    • An example can be found [here]
  2. Log into your ops account
    •  ssh ''username''@opsl01 
  3. Harp scan files can be found in
    •  /cs/data/harpData/IHA1H04A and /cs/data/harpData/IHA1H04B 
  4. Create a new directory in the /adaqfs/home/a-onl/rastersize/bpmCalibration directory for your harp scans
    • Some example directories are already there
  5. scp the harp scan files for your harp scans into the new directory


How to Analyze the Pedestal Run

  1. Make sure you are in the correct directory for macros.
  2. Run spot++ on the pedestal runs that you took for the LHRS and RHRS.
  3. Run pedestals.C
    • Changes to make
      1. Change the name and location of the root file for the LHRS and RHRS pedestal runs
  4. Save the resulting plots
  5. The pedestals are the means of the gaussian fits to the data.
    • Write down the pedestals or save them to a file - Right now it doesn’t output to a file or anything
  6. Update database files in the database directory
    • Make sure to put today’s date with the timestamp 00:00:00! The analyzer will use the pedestals from the most recent date.
    • Change the pedestals in these files:
      1. db_Lrb.BPMA.db
      2. db_Lrb.BPMB.db
      3. db_Rrb.BPMA.db
      4. db_Rrb.BPMB.db


How to Analyze the Harp Scan Data

  1. Make sure you are in the correct directory for macros.
  2. Run get_harp_pos.C
    • Run TWICE - once for LHRS and once for RHRS
    • Changes to make
      1. Change char date[256] to the date the harp scans were taken
      2. Change run_number[5] to the run numbers for the LHRS or RHRS
      3. Change logbook_num[5] to the corresponding harp run numbers
      4. Change timestamp[] to the corresponding harp timestamps
        • First come the timestamps for harp A, and then for harp B
      5. Change the name of the text file that will store the results
        • sprintf(Hresults, “filename”)
        • put L or R in the filename so you know the difference between the LHRS and RHRS files
      6. Change the directory of where the harp files are stored
        • sprintf(file_name, “dirname”)
  3. Save the pdf files
    • 5 each for Harp A and B
  4. When you are done, you should see two new .txt files, one for harp scan results for the LHRS, and one for the RHRS.

How to Calibrate the BPMs

  1. Make sure you are in the correct directory for macros.
  2. Run spot++ on the pedestal runs that you took for the LHRS and RHRS.
    • This will analyze the data with the old calibration parameters
  3. Run