Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nsjarvis authored Jun 14, 2022
1 parent 45b48ff commit 31fa928
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions CDC_scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This directory contains scripts useful for extracting the hit thresholds from configuration files and for calculating the correction to Garfield's drift time tables due to the magnetic field.
This directory contains scripts useful for extracting the hit thresholds from configuration files, calculating the correction to Garfield's drift time tables due to the magnetic field and estimating the time to distance calibration parameters from EPICS data.

# Finding the hit thresholds

Expand Down Expand Up @@ -30,7 +30,7 @@ ccdb add /CDC/hit_thresholds -r 71860-72435 cdc_h.txt

# Calculating the correction to Garfield's drift time tables for the magnetic field

The process is documented in GlueX-Docs 2512 and 2593.
The process is documented in [GlueX-doc-2592](https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=2592) and [2513](https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=2513).
The script is in the subdirectory Bfield\_drift\_correction.

**To find the correction function:**
Expand All @@ -51,24 +51,26 @@ Bfield->Scan("Bz:r:z","Bz>1.92&&z>=15&&z<=170&&r>=5&&r<=65")
root -q Bfield_dt2.C
```

5. Add the fit parameters obtained to the CCDB table /CDC/cdc_drift_parms.
5. Add the fit parameters obtained to the CCDB table /CDC/cdc\_drift\_parms.


# Estimating time to distance parameters from EPICS data

The script is located in the subdirectory calc_ttod. It uses the functions from GlueX-doc-5394 to estimate the time to distance parameters (for CCDB /CDC/drift_parameters) for 2125V runs using EPICS data for temperature and pressure.
The script is located in the subdirectory calc_ttod. It uses the functions from [GlueX-doc-5394](https://halldweb.jlab.org/doc-private/DocDB/ShowDocument?docid=5394) to estimate the time to distance parameters (for CCDB /CDC/drift\_parameters) for 2125V runs using EPICS data for temperature and pressure.

**To find the time to distance parameters:**

1. Obtain the EPICS data for the time of interest. The names of the EPICS variables are
1. Obtain the EPICS data for the time of interest. The names of the EPICS variables are:
```
RESET:i:GasPanelBarPress1
GAS:i::CDC_Temps-CDC_D1_Temp
GAS:i::CDC_Temps-CDC_D3_Temp
GAS:i::CDC_Temps-CDC_D4_Temp
GAS:i::CDC_Temps-CDC_D5_Temp
```

2. Run the script, providing as arguments the run number (used in the output filename), uncalibrated pressure and the downstream thermocouple temps D1 and D3 to D5. This should generate an output file in the correct format for the CCDB table. The example below created the file ttod_d10370.txt.

```
root -q "calc_ttod_from_epics.C(10370,99.8644,25.6996,25.8,25.9009,25.3)"
```
```

0 comments on commit 31fa928

Please sign in to comment.