From 3295d5654ec1c00ca5ca32e03f3592e7ad3b1570 Mon Sep 17 00:00:00 2001
From: Holly Szumila <hszumila@jlab.org>
Date: Mon, 26 Mar 2018 10:51:02 -0400
Subject: [PATCH] hmsflags file for optimized matrix elements (#418)

* hmsflags to be used with optimized hms ME

* mod readme
---
 DATFILES/README.txt                |  1 +
 PARAM/HMS/GEN/hmsflags_opt2018.dat | 39 ++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 PARAM/HMS/GEN/hmsflags_opt2018.dat

diff --git a/DATFILES/README.txt b/DATFILES/README.txt
index 2b3bef1a..f97e45b9 100644
--- a/DATFILES/README.txt
+++ b/DATFILES/README.txt
@@ -6,6 +6,7 @@ HMS
 -hms_recon_coeff.dat: Original, ideal, matrix elements prior to optimization.
 -hms_recon_coeff_opt2018.dat: Optimized matrix elements for delta +/- 10%.
 
+You must use the corresponding hmsflags file in the PARAM/*/GEN/ to keep offsets correct!!
 
 ~~~~~
 SHMS
diff --git a/PARAM/HMS/GEN/hmsflags_opt2018.dat b/PARAM/HMS/GEN/hmsflags_opt2018.dat
new file mode 100644
index 00000000..bed5850b
--- /dev/null
+++ b/PARAM/HMS/GEN/hmsflags_opt2018.dat
@@ -0,0 +1,39 @@
+; Offset in the spectrometer momentum.
+  hmomentum_factor = 0.000 ; leave 0 so it will have no effect
+                           ; use hpcentral_offset if one needs to offset central momentum
+;
+; The hdelta_offset,htheta_offset,hphi_offset effect the
+; reconstructed target quantities. Used in h_targ_trans.f 
+; For transport x is in the dispersive direction with + down
+;               y is in the horizontal + towards small angles.
+;               z is along the central optics axis.
+; In transport coordinates phi = hyptar = dy/dz and theta = hxptar = dx/dz 
+;    but for unknown reasons the yp offset is named  htheta_offset
+;    and  the xp offset is named  hphi_offset
+; Do not to change these values, since these are the zero order
+;  CMOP matrix elements. If you do change then your hms sieve
+;  plots will be screwed up.
+  hdelta_offset = 0.       ; (%)   hdelta_tar = hdelta_tar + hdelta_offset
+  htheta_offset = 0.  ; (rad) hyp_tar = hyp_tar + htheta_offset
+  hphi_offset   = -4.946337367e-3 ; (rad) hxp_tar = hxp_tar + hphi_offset
+;
+
+;saturation correction flag
+  hsatcorr = 2000 ; 
+                          ; a correction to hsdelta event by event
+                          ; for a problem in setting Q3 current.
+                          ; There was an unknown zero offset in the Q3 current.
+                          ; The magnet setting code field00.f partially 
+                          ; fixes this problem. T. Horn in 2003 determined
+                          ; the corrections to delta.
+                          ; Data taken with fields set by field99.f or earlier should set to 1999.
+                          ; Data taken with fields set by field00.f or later should set to 2000.
+; These offsets are determined from elastic ep data.
+; central field  correction
+  hpcentral_offset = 0.0 ;    
+  hthetacentral_offset = 0.000 ; (rad) 
+  h_oopcentral_offset = 0.00  ; (rad)
+; sets hpcentral = hpcentral * ( 1. + hpcentral_offset / 100. )
+;      htheta_lab=htheta_lab + hthetacentral_offset/degree 
+
+
-- 
GitLab