diff --git a/DBASE/general.param b/DBASE/general.param
index 4e8a7684bbe1d1990082c9260ce9f847462460d1..22c8b72d79d2ea7e05e11172292a79db9170cad6 100644
--- a/DBASE/general.param
+++ b/DBASE/general.param
@@ -34,6 +34,7 @@ raddeg=3.14159265/180
 #include "PARAM/SHMS/GEN/ptracking.param"
 
 ; SHMS detector specific paramter files
+#include "PARAM/SHMS/CAL/pcal.param"
 #include "PARAM/SHMS/DC/pdc.pos"
 #include "PARAM/SHMS/DC/pdc.param"
 #include "PARAM/SHMS/DC/pdriftmap.param"
diff --git a/DEF-files/HMS/CAL/hcalana.def b/DEF-files/HMS/CAL/hcalana.def
index 01b5e45365929623ece38e1454276b6b2d6a1e8b..bef0417911fd01063e12c0db0621098ed083d9e9 100644
--- a/DEF-files/HMS/CAL/hcalana.def
+++ b/DEF-files/HMS/CAL/hcalana.def
@@ -2,20 +2,29 @@
 #
 block H.cal.*
 
-TH1F hcal_hAm_pi 'HMS hA- Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.1pr.aneg 2500 0 25000
-TH1F hcal_hAp_pi 'HMS hA+ Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.1pr.apos 2500 0 25000
+TH1F hcal_hA+_pi 'HMS hA+ Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.1pr.apos 2500 0 25000
+TH1F hcal_hA-_pi 'HMS hA- Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.1pr.aneg 2500 0 25000
 
-TH1F hcal_hBm_pi 'HMS hB- Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.2ta.aneg 2500 0 25000
-TH1F hcal_hBp_pi 'HMS hB+ Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.2ta.apos 2500 0 25000
+TH1F hcal_hB+_pi 'HMS hB+ Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.2ta.apos 2500 0 25000
+TH1F hcal_hB-_pi 'HMS hB- Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.2ta.aneg 2500 0 25000
 
-TH1F hcal_hCp_pi 'HMS hC+ Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.3ta.apos 2500 0 25000
-TH1F hcal_hDp_pi 'HMS hD+ Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.4ta.apos 2500 0 25000
+TH1F hcal_hC+_pi 'HMS hC+ Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.3ta.apos 2500 0 25000
+TH1F hcal_hD+_pi 'HMS hD+ Pulse Integral; Pulse Integral (ADC Units); Counts / 10 ADC Units' H.cal.4ta.apos 2500 0 25000
 
-TH1F hcal_hAm_occu "HMS hA- ADC Occupancy; Paddle Number; Number of ADC Hits' H.cal.1pr.negadchits 13 0.5 13.5
-TH1F hcal_hAp_occu "HMS hA+ ADC Occupancy; Paddle Number; Number of ADC Hits' H.cal.1pr.posadchits 13 0.5 13.5
+TH1F hcal_hA+_occu "HMS hA+ ADC Occupancy; Block Number; Number of ADC Hits' H.cal.1pr.posadchits 13 0.5 13.5
+TH1F hcal_hA-_occu "HMS hA- ADC Occupancy; Block Number; Number of ADC Hits' H.cal.1pr.negadchits 13 0.5 13.5
 
-TH1F hcal_hBm_occu "HMS hB- ADC Occupancy; Paddle Number; Number of ADC Hits' H.cal.2ta.negadchits 13 0.5 13.5
-TH1F hcal_hBp_occu "HMS hB+ ADC Occupancy; Paddle Number; Number of ADC Hits' H.cal.2ta.posadchits 13 0.5 13.5
+TH1F hcal_hB+_occu "HMS hB+ ADC Occupancy; Block Number; Number of ADC Hits' H.cal.2ta.posadchits 13 0.5 13.5
+TH1F hcal_hB-_occu "HMS hB- ADC Occupancy; Block Number; Number of ADC Hits' H.cal.2ta.negadchits 13 0.5 13.5
 
-TH1F hcal_hCp_occu "HMS hC+ ADC Occupancy; Paddle Number; Number of ADC Hits' H.cal.3ta.posadchits 13 0.5 13.5
-TH1F hcal_hDp_occu "HMS hD+ ADC Occupancy; Paddle Number; Number of ADC Hits' H.cal.4ta.posadchits 13 0.5 13.5
\ No newline at end of file
+TH1F hcal_hC+_occu "HMS hC+ ADC Occupancy; Block Number; Number of ADC Hits' H.cal.3ta.posadchits 13 0.5 13.5
+TH1F hcal_hD+_occu "HMS hD+ ADC Occupancy; Block Number; Number of ADC Hits' H.cal.4ta.posadchits 13 0.5 13.5
+
+TH2F hcal_hA+_pi_vs_blk 'HMS hA+ Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' H.cal.1pr.posadchits H.cal.1pr.apos 13 0.5 13.5 4000 0 40000
+TH2F hcal_hA-_pi_vs_blk 'HMS hA- Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' H.cal.1pr.negadchits H.cal.1pr.aneg 13 0.5 13.5 4000 0 40000
+
+TH2F hcal_hB+_pi_vs_blk 'HMS hB+ Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' H.cal.2ta.posadchits H.cal.2ta.apos 13 0.5 13.5 4000 0 40000
+TH2F hcal_hB-_pi_vs_blk 'HMS hB- Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' H.cal.2ta.negadchits H.cal.2ta.aneg 13 0.5 13.5 4000 0 40000
+
+TH2F hcal_hC+_pi_vs_blk 'HMS hC+ Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' H.cal.3ta.posadchits H.cal.3ta.apos 13 0.5 13.5 4000 0 40000
+TH2F hcal_hD+_pi_vs_blk 'HMS hD+ Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' H.cal.4ta.posadchits H.cal.4ta.apos 13 0.5 13.5 4000 0 40000
diff --git a/DEF-files/HMS/HODO/hhodoana.def b/DEF-files/HMS/HODO/hhodoana.def
index d3ff3a135e923fc8f539d04f6f50192f3387d163..b3fe2d9811f84aafec003b390a8a759b16f8bf3b 100644
--- a/DEF-files/HMS/HODO/hhodoana.def
+++ b/DEF-files/HMS/HODO/hhodoana.def
@@ -3,39 +3,67 @@
 block H.hod.*
 block T.hms.*
 
-TH2F htest '' H.hod.1x.posadcpad  H.hod.1x.posadcval 16 1 17 4000 0 40000
-
 TH1F hhodo_h1x_multi 'HMS h1X Multiplicity; Number of Hits; Counts' H.hod.1x.nhits 16 0.5 16.5
 TH1F hhodo_h1y_multi 'HMS h1Y Multiplicity; Number of Hits; Counts' H.hod.1y.nhits 10 0.5 10.5
 TH1F hhodo_h2x_multi 'HMS h2X Multiplicity; Number of Hits; Counts' H.hod.2x.nhits 16 0.5 16.5
 TH1F hhodo_h2y_multi 'HMS h2Y Multiplicity; Number of Hits; Counts' H.hod.2y.nhits 10 0.5 10.5
 
+TH1F hhodo_h1xp_adc_occu 'HMS h1X+ ADC Occupancy; Paddle Number; Number of Hits' H.hod.1x.posadcpad 16 0.5 16.5
+TH1F hhodo_h1yp_adc_occu 'HMS h1Y+ ADC Occupancy; Paddle Number; Number of Hits' H.hod.1y.posadcpad 10 0.5 10.5 
+TH1F hhodo_h2xp_adc_occu 'HMS h2X+ ADC Occupancy; Paddle Number; Number of Hits' H.hod.2x.posadcpad 16 0.5 16.5
+TH1F hhodo_h2yp_adc_occu 'HMS h2Y+ ADC Occupancy; Paddle Number; Number of Hits' H.hod.2y.posadcpad 10 0.5 10.5
+
 TH1F hhodo_h1xm_adc_occu 'HMS h1X- ADC Occupancy; Paddle Number; Number of Hits' H.hod.1x.negadcpad 16 0.5 16.5
 TH1F hhodo_h1ym_adc_occu 'HMS h1Y- ADC Occupancy; Paddle Number; Number of Hits' H.hod.1y.negadcpad 10 0.5 10.5 
 TH1F hhodo_h2xm_adc_occu 'HMS h2X- ADC Occupancy; Paddle Number; Number of Hits' H.hod.2x.negadcpad 16 0.5 16.5
 TH1F hhodo_h2ym_adc_occu 'HMS h2Y- ADC Occupancy; Paddle Number; Number of Hits' H.hod.2y.negadcpad 10 0.5 10.5
 
-TH1F hhodo_h1xp_adc_occu 'HMS h1X+ ADC Occupancy; Paddle Number; Number of Hits' H.hod.1x.posadcpad 16 0.5 16.5
-TH1F hhodo_h1yp_adc_occu 'HMS h1Y+ ADC Occupancy; Paddle Number; Number of Hits' H.hod.1y.posadcpad 10 0.5 10.5 
-TH1F hhodo_h2xp_adc_occu 'HMS h2X+ ADC Occupancy; Paddle Number; Number of Hits' H.hod.2x.posadcpad 16 0.5 16.5
-TH1F hhodo_h2yp_adc_occu 'HMS h2Y+ ADC Occupancy; Paddle Number; Number of Hits' H.hod.2y.posadcpad 10 0.5 10.5
+TH1F hhodo_h1xp_tdc_occu 'HMS h1X+ TDC Occupancy; Paddle Number; Number of Hits' H.hod.1x.postdcpad 16 0.5 16.5
+TH1F hhodo_h1yp_tdc_occu 'HMS h1Y+ TDC Occupancy; Paddle Number; Number of Hits' H.hod.1y.postdcpad 10 0.5 10.5 
+TH1F hhodo_h2xp_tdc_occu 'HMS h2X+ TDC Occupancy; Paddle Number; Number of Hits' H.hod.2x.postdcpad 16 0.5 16.5
+TH1F hhodo_h2yp_tdc_occu 'HMS h2Y+ TDC Occupancy; Paddle Number; Number of Hits' H.hod.2y.postdcpad 10 0.5 10.5
 
 TH1F hhodo_h1xm_tdc_occu 'HMS h1X- TDC Occupancy; Paddle Number; Number of Hits' H.hod.1x.negtdcpad 16 0.5 16.5
 TH1F hhodo_h1ym_tdc_occu 'HMS h1Y- TDC Occupancy; Paddle Number; Number of Hits' H.hod.1y.negtdcpad 10 0.5 10.5 
 TH1F hhodo_h2xm_tdc_occu 'HMS h2X- TDC Occupancy; Paddle Number; Number of Hits' H.hod.2x.negtdcpad 16 0.5 16.5
 TH1F hhodo_h2ym_tdc_occu 'HMS h2Y- TDC Occupancy; Paddle Number; Number of Hits' H.hod.2y.negtdcpad 10 0.5 10.5
 
-TH1F hhodo_h1xp_tdc_occu 'HMS h1X+ TDC Occupancy; Paddle Number; Number of Hits' H.hod.1x.postdcpad 16 0.5 16.5
-TH1F hhodo_h1yp_tdc_occu 'HMS h1Y+ TDC Occupancy; Paddle Number; Number of Hits' H.hod.1y.postdcpad 10 0.5 10.5 
-TH1F hhodo_h2xp_tdc_occu 'HMS h2X+ TDC Occupancy; Paddle Number; Number of Hits' H.hod.2x.postdcpad 16 0.5 16.5
-TH1F hhodo_h2yp_tdc_occu 'HMS h2Y+ TDC Occupancy; Paddle Number; Number of Hits' H.hod.2y.postdcpad 10 0.5 10.5
+TH2F hhodo_h1x+_pi_vs_padnum 'HMS h1X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' H.hod.1x.posadcpad H.hod.1x.posadcval 16 0.5 16.5 4000 0 40000
+TH2F hhodo_h1y+_pi_vs_padnum 'HMS h1Y+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' H.hod.1y.posadcpad H.hod.1y.posadcval 10 0.5 10.5 4000 0 40000
+TH2F hhodo_h2x+_pi_vs_padnum 'HMS h2X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' H.hod.2x.posadcpad H.hod.2x.posadcval 16 0.5 16.5 4000 0 40000
+TH2F hhodo_h2y+_pi_vs_padnum 'HMS h2Y+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' H.hod.2y.posadcpad H.hod.2y.posadcval 10 0.5 10.5 4000 0 40000
+
+TH2F hhodo_h1x-_pi_vs_padnum 'HMS h1X- Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' H.hod.1x.negadcpad H.hod.1x.negadcval 16 0.5 16.5 4000 0 40000
+TH2F hhodo_h1y-_pi_vs_padnum 'HMS h1Y- Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' H.hod.1y.negadcpad H.hod.1y.negadcval 10 0.5 10.5 4000 0 40000
+TH2F hhodo_h2x-_pi_vs_padnum 'HMS h2X- Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' H.hod.2x.negadcpad H.hod.2x.negadcval 16 0.5 16.5 4000 0 40000
+TH2F hhodo_h2y-_pi_vs_padnum 'HMS h2Y- Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' H.hod.2y.negadcpad H.hod.2y.negadcval 10 0.5 10.5 4000 0 40000
+
+TH2F hhodo_h1x+_ped_vs_padnum 'HMS h1X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' H.hod.1x.posadcpad H.hod.1x.posadcped 16 0.5 16.5 4000 0 40000
+TH2F hhodo_h1y+_ped_vs_padnum 'HMS h1Y+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' H.hod.1y.posadcpad H.hod.1y.posadcped 10 0.5 10.5 4000 0 40000
+TH2F hhodo_h2x+_ped_vs_padnum 'HMS h2X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' H.hod.2x.posadcpad H.hod.2x.posadcped 16 0.5 16.5 4000 0 40000
+TH2F hhodo_h2y+_ped_vs_padnum 'HMS h2Y+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' H.hod.2y.posadcpad H.hod.2y.posadcped 10 0.5 10.5 4000 0 40000
+
+TH2F hhodo_h1x-_ped_vs_padnum 'HMS h1X- Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' H.hod.1x.negadcpad H.hod.1x.negadcped 16 0.5 16.5 4000 0 40000
+TH2F hhodo_h1y-_ped_vs_padnum 'HMS h1Y- Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' H.hod.1y.negadcpad H.hod.1y.negadcped 10 0.5 10.5 4000 0 40000
+TH2F hhodo_h2x-_ped_vs_padnum 'HMS h2X- Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' H.hod.2x.negadcpad H.hod.2x.negadcped 16 0.5 16.5 4000 0 40000
+TH2F hhodo_h2y-_ped_vs_padnum 'HMS h2Y- Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' H.hod.2y.negadcpad H.hod.2y.negadcped 10 0.5 10.5 4000 0 40000
+
+TH2F hhodo_h1x+_tdc_vs_padnum 'HMS h1X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' H.hod.1x.postdcpad H.hod.1x.postdcval 16 0.5 16.5 4000 -20000 20000
+TH2F hhodo_h1y+_tdc_vs_padnum 'HMS h1Y+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' H.hod.1y.postdcpad H.hod.1y.postdcval 10 0.5 10.5 4000 -20000 20000
+TH2F hhodo_h2x+_tdc_vs_padnum 'HMS h2X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' H.hod.2x.postdcpad H.hod.2x.postdcval 16 0.5 16.5 4000 -20000 20000
+TH2F hhodo_h2y+_tdc_vs_padnum 'HMS h2Y+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' H.hod.2y.postdcpad H.hod.2y.postdcval 10 0.5 10.5 4000 -20000 20000
+
+TH2F hhodo_h1x-_tdc_vs_padnum 'HMS h1X- Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' H.hod.1x.negtdcpad H.hod.1x.negtdcval 16 0.5 16.5 4000 -20000 20000
+TH2F hhodo_h1y-_tdc_vs_padnum 'HMS h1Y- Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' H.hod.1y.negtdcpad H.hod.1y.negtdcval 10 0.5 10.5 4000 -20000 20000
+TH2F hhodo_h2x-_tdc_vs_padnum 'HMS h2X- Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' H.hod.2x.negtdcpad H.hod.2x.negtdcval 16 0.5 16.5 4000 -20000 20000
+TH2F hhodo_h2y-_tdc_vs_padnum 'HMS h2Y- Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' H.hod.2y.negtdcpad H.hod.2y.negtdcval 10 0.5 10.5 4000 -20000 20000
 
-TH2F hhodo_h1xm_piVtdc 'HMS h1X- Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.1x.negadcval H.hod.1x.negtdcval 2500 0 25000 800 0 8000
-TH2F hhodo_h1ym_piVtdc 'HMS h1Y- Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.1y.negadcval H.hod.1y.negtdcval 2500 0 25000 800 0 8000
-TH2F hhodo_h2xm_piVtdc 'HMS h2X- Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.2x.negadcval H.hod.2x.negtdcval 2500 0 25000 800 0 8000
-TH2F hhodo_h2ym_piVtdc 'HMS h2Y- Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.2y.negadcval H.hod.2y.negtdcval 2500 0 25000 800 0 8000
+TH2F hhodo_h1xp_piVtdc 'HMS h1X+ Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.1x.posadcval H.hod.1x.postdcval 2500 0 25000 4000 -20000 20000
+TH2F hhodo_h1yp_piVtdc 'HMS h1Y+ Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.1y.posadcval H.hod.1y.postdcval 2500 0 25000 4000 -20000 20000
+TH2F hhodo_h2xp_piVtdc 'HMS h2X+ Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.2x.posadcval H.hod.2x.postdcval 2500 0 25000 4000 -20000 20000
+TH2F hhodo_h2yp_piVtdc 'HMS h2Y+ Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.2y.posadcval H.hod.2y.postdcval 2500 0 25000 4000 -20000 20000
 
-TH2F hhodo_h1xp_piVtdc 'HMS h1X+ Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.1x.posadcval H.hod.1x.postdcval 2500 0 25000 800 0 8000
-TH2F hhodo_h1yp_piVtdc 'HMS h1Y+ Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.1y.posadcval H.hod.1y.postdcval 2500 0 25000 800 0 8000
-TH2F hhodo_h2xp_piVtdc 'HMS h2X+ Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.2x.posadcval H.hod.2x.postdcval 2500 0 25000 800 0 8000
-TH2F hhodo_h2yp_piVtdc 'HMS h2Y+ Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.2y.posadcval H.hod.2y.postdcval 2500 0 25000 800 0 8000
+TH2F hhodo_h1xm_piVtdc 'HMS h1X- Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.1x.negadcval H.hod.1x.negtdcval 2500 0 25000 4000 -20000 20000
+TH2F hhodo_h1ym_piVtdc 'HMS h1Y- Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.1y.negadcval H.hod.1y.negtdcval 2500 0 25000 4000 -20000 20000
+TH2F hhodo_h2xm_piVtdc 'HMS h2X- Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.2x.negadcval H.hod.2x.negtdcval 2500 0 25000 4000 -20000 20000
+TH2F hhodo_h2ym_piVtdc 'HMS h2Y- Pulse Integral vs. TDC Time; Pulse Integral / 10 ADC Units; Raw TDC Time / 10 TDC Units' H.hod.2y.negadcval H.hod.2y.negtdcval 2500 0 25000 4000 -20000 20000
diff --git a/DEF-files/SHMS/CAL/pcalana.def b/DEF-files/SHMS/CAL/pcalana.def
new file mode 100644
index 0000000000000000000000000000000000000000..2904eee862b452c5e38d854ee0c51fbeccccc0b7
--- /dev/null
+++ b/DEF-files/SHMS/CAL/pcalana.def
@@ -0,0 +1,7 @@
+# See $ANALYZER/examples/output_example.def for examples
+#
+block P.cal.*
+
+TH2F pcal_pi_v_shwr_blk 'SHMS Shower Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' P.cal.fly.adchits P.cal.fly.a 224 0.5 224.5 4000 0 40000
+TH2F pcal_pi_v_prshwr_pos_blk 'SHMS Positive Preshower Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' P.cal.pr.posadchits P.cal.pr.apos 13 0.5 13.5 4000 0 40000
+TH2F pcal_pi_v_prshwr_neg_blk 'SHMS Negative Preshower Pulse Integral vs. Block Number; Block Number; Pulse Integral / 10 ADC Units' P.cal.pr.negadchits P.cal.pr.aneg 13 0.5 13.5 4000 0 40000
\ No newline at end of file
diff --git a/DEF-files/SHMS/CAL/pcalana_cuts.def b/DEF-files/SHMS/CAL/pcalana_cuts.def
new file mode 100644
index 0000000000000000000000000000000000000000..3af34a5e9835ac62bdbfcc30004dda336ed171d9
--- /dev/null
+++ b/DEF-files/SHMS/CAL/pcalana_cuts.def
@@ -0,0 +1,13 @@
+Block: RawDecode
+
+Pedestal_event 0
+RawDecode_master 1
+
+Block: Decode
+Decode_master 1
+
+Block: CoarseTracking
+CoarseTracking_master 1
+
+Block: CoarseReconstruct
+CourseReconstruct 0
diff --git a/DEF-files/SHMS/DC/pdcana.def b/DEF-files/SHMS/DC/pdcana.def
index 3433497a1399fd21ee38196f11d860dbb3f242cd..5f20ad0092d9876b702ce6824f4ac58779950916 100644
--- a/DEF-files/SHMS/DC/pdcana.def
+++ b/DEF-files/SHMS/DC/pdcana.def
@@ -16,47 +16,47 @@ TH1F pdc2x1_wm 'PDC 2X1 Wiremap' P.dc.2x1.wirenum  79 0.5  79.5
 TH1F pdc2u2_wm 'PDC 2U2 Wiremap' P.dc.2u2.wirenum 107 0.5 107.5
 TH1F pdc2u1_wm 'PDC 2U1 Wiremap' P.dc.2u1.wirenum 107 0.5 107.5
 
-TH2F pdc1u1_wire_num_vs_raw_tdc 'PDC 1U1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1u1.wirenum P.dc.1u1.rawtdc 107 0.5 107.5 5000 0 50000
-TH2F pdc1u2_wire_num_vs_raw_tdc 'PDC 1U2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1u2.wirenum P.dc.1u2.rawtdc 107 0.5 107.5 5000 0 50000
-TH2F pdc1x1_wire_num_vs_raw_tdc 'PDC 1X1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1x1.wirenum P.dc.1x1.rawtdc  79 0.5  79.5 5000 0 50000
-TH2F pdc1x2_wire_num_vs_raw_tdc 'PDC 1X2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1x2.wirenum P.dc.1x2.rawtdc  79 0.5  79.5 5000 0 50000
-TH2F pdc1v1_wire_num_vs_raw_tdc 'PDC 1V1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1v1.wirenum P.dc.1v1.rawtdc 107 0.5 107.5 5000 0 50000
-TH2F pdc1v2_wire_num_vs_raw_tdc 'PDC 1V2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1v2.wirenum P.dc.1v2.rawtdc 107 0.5 107.5 5000 0 50000
-
-TH2F pdc2v2_wire_num_vs_raw_tdc 'PDC 2V2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2v2.wirenum P.dc.2v2.rawtdc 107 0.5 107.5 5000 0 50000
-TH2F pdc2v1_wire_num_vs_raw_tdc 'PDC 2V1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2v1.wirenum P.dc.2v1.rawtdc 107 0.5 107.5 5000 0 50000
-TH2F pdc2x2_wire_num_vs_raw_tdc 'PDC 2X2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2x2.wirenum P.dc.2x2.rawtdc  79 0.5  79.5 5000 0 50000
-TH2F pdc2x1_wire_num_vs_raw_tdc 'PDC 2X1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2x1.wirenum P.dc.2x1.rawtdc  79 0.5  79.5 5000 0 50000
-TH2F pdc2u2_wire_num_vs_raw_tdc 'PDC 2U2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2u2.wirenum P.dc.2u2.rawtdc 107 0.5 107.5 5000 0 50000
-TH2F pdc2u1_wire_num_vs_raw_tdc 'PDC 2U1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2u1.wirenum P.dc.2u1.rawtdc 107 0.5 107.5 5000 0 50000
-
-TH2F pdc1u1_wire_num_vs_tdc_time 'PDC 1U1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.1u1.wirenum P.dc.1u1.time 107 0.5 107.5 6000 -1000 5000
-TH2F pdc1u2_wire_num_vs_tdc_time 'PDC 1U2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.1u2.wirenum P.dc.1u2.time 107 0.5 107.5 6000 -1000 5000
-TH2F pdc1x1_wire_num_vs_tdc_time 'PDC 1X1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.1x1.wirenum P.dc.1x1.time  79 0.5  79.5 6000 -1000 5000
-TH2F pdc1x2_wire_num_vs_tdc_time 'PDC 1X2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.1x2.wirenum P.dc.1x2.time  79 0.5  79.5 6000 -1000 5000
-TH2F pdc1v1_wire_num_vs_tdc_time 'PDC 1V1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.1v1.wirenum P.dc.1v1.time 107 0.5 107.5 6000 -1000 5000
-TH2F pdc1v2_wire_num_vs_tdc_time 'PDC 1V2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.1v2.wirenum P.dc.1v2.time 107 0.5 107.5 6000 -1000 5000
-
-TH2F pdc2v2_wire_num_vs_tdc_time 'PDC 2V2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.2v2.wirenum P.dc.2v2.time 107 0.5 107.5 6000 -1000 5000
-TH2F pdc2v1_wire_num_vs_tdc_time 'PDC 2V1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.2v1.wirenum P.dc.2v1.time 107 0.5 107.5 6000 -1000 5000
-TH2F pdc2x2_wire_num_vs_tdc_time 'PDC 2X2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.2x2.wirenum P.dc.2x2.time  79 0.5  79.5 6000 -1000 5000
-TH2F pdc2x1_wire_num_vs_tdc_time 'PDC 2X1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.2x1.wirenum P.dc.2x1.time  79 0.5  79.5 6000 -1000 5000
-TH2F pdc2u2_wire_num_vs_tdc_time 'PDC 2U2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.2u2.wirenum P.dc.2u2.time 107 0.5 107.5 6000 -1000 5000
-TH2F pdc2u1_wire_num_vs_tdc_time 'PDC 2U1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (ns)' P.dc.2u1.wirenum P.dc.2u1.time 107 0.5 107.5 6000 -1000 5000
-
-TH2F pdc1u1_wire_num_vs_ddist 'PDC 1U1 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.1u1.wirenum P.dc.1u1.dist 107 0.5 107.5 300 -0.1 0.6
-TH2F pdc1u2_wire_num_vs_ddist 'PDC 1U2 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.1u2.wirenum P.dc.1u2.dist 107 0.5 107.5 300 -0.1 0.6
-TH2F pdc1x1_wire_num_vs_ddist 'PDC 1X1 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.1x1.wirenum P.dc.1x1.dist  79 0.5  79.5 300 -0.1 0.6
-TH2F pdc1x2_wire_num_vs_ddist 'PDC 1X2 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.1x2.wirenum P.dc.1x2.dist  79 0.5  79.5 300 -0.1 0.6
-TH2F pdc1v1_wire_num_vs_ddist 'PDC 1V1 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.1v1.wirenum P.dc.1v1.dist 107 0.5 107.5 300 -0.1 0.6
-TH2F pdc1v2_wire_num_vs_ddist 'PDC 1V2 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.1v2.wirenum P.dc.1v2.dist 107 0.5 107.5 300 -0.1 0.6
-
-TH2F pdc2u2_wire_num_vs_ddist 'PDC 2U2 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.2u2.wirenum P.dc.2u2.dist 107 0.5 107.5 300 -0.1 0.6
-TH2F pdc2u1_wire_num_vs_ddist 'PDC 2U1 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.2u1.wirenum P.dc.2u1.dist 107 0.5 107.5 300 -0.1 0.6
-TH2F pdc2x2_wire_num_vs_ddist 'PDC 2X2 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.2x2.wirenum P.dc.2x2.dist  79 0.5  79.5 300 -0.1 0.6
-TH2F pdc2x1_wire_num_vs_ddist 'PDC 2X1 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.2x1.wirenum P.dc.2x1.dist  79 0.5  79.5 300 -0.1 0.6
-TH2F pdc2v2_wire_num_vs_ddist 'PDC 2V2 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.2v2.wirenum P.dc.2v2.dist 107 0.5 107.5 300 -0.1 0.6
-TH2F pdc2v1_wire_num_vs_ddist 'PDC 2V1 Wiremap vs. Raw TDC; Wire Number; Drift Distance (cm)' P.dc.2v1.wirenum P.dc.2v1.dist 107 0.5 107.5 300 -0.1 0.6
+TH2F pdc1u1_wire_num_vs_raw_tdc 'PDC 1U1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1u1.wirenum P.dc.1u1.rawtdc 107 0.5 107.5 5000 -25000 25000
+TH2F pdc1u2_wire_num_vs_raw_tdc 'PDC 1U2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1u2.wirenum P.dc.1u2.rawtdc 107 0.5 107.5 5000 -25000 25000
+TH2F pdc1x1_wire_num_vs_raw_tdc 'PDC 1X1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1x1.wirenum P.dc.1x1.rawtdc  79 0.5  79.5 5000 -25000 25000
+TH2F pdc1x2_wire_num_vs_raw_tdc 'PDC 1X2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1x2.wirenum P.dc.1x2.rawtdc  79 0.5  79.5 5000 -25000 25000
+TH2F pdc1v1_wire_num_vs_raw_tdc 'PDC 1V1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1v1.wirenum P.dc.1v1.rawtdc 107 0.5 107.5 5000 -25000 25000
+TH2F pdc1v2_wire_num_vs_raw_tdc 'PDC 1V2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.1v2.wirenum P.dc.1v2.rawtdc 107 0.5 107.5 5000 -25000 25000
+
+TH2F pdc2v2_wire_num_vs_raw_tdc 'PDC 2V2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2v2.wirenum P.dc.2v2.rawtdc 107 0.5 107.5 5000 -25000 25000
+TH2F pdc2v1_wire_num_vs_raw_tdc 'PDC 2V1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2v1.wirenum P.dc.2v1.rawtdc 107 0.5 107.5 5000 -25000 25000
+TH2F pdc2x2_wire_num_vs_raw_tdc 'PDC 2X2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2x2.wirenum P.dc.2x2.rawtdc  79 0.5  79.5 5000 -25000 25000
+TH2F pdc2x1_wire_num_vs_raw_tdc 'PDC 2X1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2x1.wirenum P.dc.2x1.rawtdc  79 0.5  79.5 5000 -25000 25000
+TH2F pdc2u2_wire_num_vs_raw_tdc 'PDC 2U2 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2u2.wirenum P.dc.2u2.rawtdc 107 0.5 107.5 5000 -25000 25000
+TH2F pdc2u1_wire_num_vs_raw_tdc 'PDC 2U1 Wiremap vs. Raw TDC; Wire Number; Raw TDC Value (clicks)' P.dc.2u1.wirenum P.dc.2u1.rawtdc 107 0.5 107.5 5000 -25000 25000
+
+TH2F pdc1u1_wire_num_vs_tdc_time 'PDC 1U1 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.1u1.wirenum P.dc.1u1.time 107 0.5 107.5 5000 -25000 25000
+TH2F pdc1u2_wire_num_vs_tdc_time 'PDC 1U2 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.1u2.wirenum P.dc.1u2.time 107 0.5 107.5 5000 -25000 25000
+TH2F pdc1x1_wire_num_vs_tdc_time 'PDC 1X1 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.1x1.wirenum P.dc.1x1.time  79 0.5  79.5 5000 -25000 25000
+TH2F pdc1x2_wire_num_vs_tdc_time 'PDC 1X2 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.1x2.wirenum P.dc.1x2.time  79 0.5  79.5 5000 -25000 25000
+TH2F pdc1v1_wire_num_vs_tdc_time 'PDC 1V1 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.1v1.wirenum P.dc.1v1.time 107 0.5 107.5 5000 -25000 25000
+TH2F pdc1v2_wire_num_vs_tdc_time 'PDC 1V2 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.1v2.wirenum P.dc.1v2.time 107 0.5 107.5 5000 -25000 25000
+
+TH2F pdc2v2_wire_num_vs_tdc_time 'PDC 2V2 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.2v2.wirenum P.dc.2v2.time 107 0.5 107.5 5000 -25000 25000
+TH2F pdc2v1_wire_num_vs_tdc_time 'PDC 2V1 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.2v1.wirenum P.dc.2v1.time 107 0.5 107.5 5000 -25000 25000
+TH2F pdc2x2_wire_num_vs_tdc_time 'PDC 2X2 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.2x2.wirenum P.dc.2x2.time  79 0.5  79.5 5000 -25000 25000
+TH2F pdc2x1_wire_num_vs_tdc_time 'PDC 2X1 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.2x1.wirenum P.dc.2x1.time  79 0.5  79.5 5000 -25000 25000
+TH2F pdc2u2_wire_num_vs_tdc_time 'PDC 2U2 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.2u2.wirenum P.dc.2u2.time 107 0.5 107.5 5000 -25000 25000
+TH2F pdc2u1_wire_num_vs_tdc_time 'PDC 2U1 Wiremap vs. TDC; Wire Number; TDC Value (ns)' P.dc.2u1.wirenum P.dc.2u1.time 107 0.5 107.5 5000 -25000 25000
+
+TH2F pdc1u1_wire_num_vs_ddist 'PDC 1U1 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.1u1.wirenum P.dc.1u1.dist 107 0.5 107.5 300 -0.1 0.6
+TH2F pdc1u2_wire_num_vs_ddist 'PDC 1U2 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.1u2.wirenum P.dc.1u2.dist 107 0.5 107.5 300 -0.1 0.6
+TH2F pdc1x1_wire_num_vs_ddist 'PDC 1X1 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.1x1.wirenum P.dc.1x1.dist  79 0.5  79.5 300 -0.1 0.6
+TH2F pdc1x2_wire_num_vs_ddist 'PDC 1X2 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.1x2.wirenum P.dc.1x2.dist  79 0.5  79.5 300 -0.1 0.6
+TH2F pdc1v1_wire_num_vs_ddist 'PDC 1V1 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.1v1.wirenum P.dc.1v1.dist 107 0.5 107.5 300 -0.1 0.6
+TH2F pdc1v2_wire_num_vs_ddist 'PDC 1V2 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.1v2.wirenum P.dc.1v2.dist 107 0.5 107.5 300 -0.1 0.6
+
+TH2F pdc2u2_wire_num_vs_ddist 'PDC 2U2 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.2u2.wirenum P.dc.2u2.dist 107 0.5 107.5 300 -0.1 0.6
+TH2F pdc2u1_wire_num_vs_ddist 'PDC 2U1 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.2u1.wirenum P.dc.2u1.dist 107 0.5 107.5 300 -0.1 0.6
+TH2F pdc2x2_wire_num_vs_ddist 'PDC 2X2 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.2x2.wirenum P.dc.2x2.dist  79 0.5  79.5 300 -0.1 0.6
+TH2F pdc2x1_wire_num_vs_ddist 'PDC 2X1 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.2x1.wirenum P.dc.2x1.dist  79 0.5  79.5 300 -0.1 0.6
+TH2F pdc2v2_wire_num_vs_ddist 'PDC 2V2 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.2v2.wirenum P.dc.2v2.dist 107 0.5 107.5 300 -0.1 0.6
+TH2F pdc2v1_wire_num_vs_ddist 'PDC 2V1 Wiremap vs. Drift Distance; Wire Number; Drift Distance (cm)' P.dc.2v1.wirenum P.dc.2v1.dist 107 0.5 107.5 300 -0.1 0.6
 
 
 
diff --git a/DEF-files/SHMS/HODO/phodoana.def b/DEF-files/SHMS/HODO/phodoana.def
index 895871ca3fd7d219d723d0cc4ff015b435215a30..5c42fe4d430c062e5f046dc6a8cf7ad0befa3897 100644
--- a/DEF-files/SHMS/HODO/phodoana.def
+++ b/DEF-files/SHMS/HODO/phodoana.def
@@ -1,37 +1,61 @@
 # See $ANALYZER/examples/output_example.def for examples
 #
 block P.hod.*
-TH2F phodo_1x_posadc_val_v_pad '' P.hod.1x.posadcpad  P.hod.1x.posadcval 13 0.5 13.5 4000 0 40000
-TH2F phodo_1y_posadc_val_v_pad '' P.hod.1y.posadcpad  P.hod.1y.posadcval 13 0.5 13.5 4000 0 40000
-TH2F phodo_2x_posadc_val_v_pad '' P.hod.2x.posadcpad  P.hod.2x.posadcval 14 0.5 14.5 4000 0 40000
-TH2F phodo_2y_posadc_val_v_pad '' P.hod.2y.posadcpad  P.hod.2y.posadcval 21 0.5 21.5 4000 0 40000
+block T.shms.*
 
-TH2F phodo_1x_negadc_val_v_pad '' P.hod.1x.negadcpad  P.hod.1x.negadcval 13 0.5 13.5 4000 0 40000
-TH2F phodo_1y_negadc_val_v_pad '' P.hod.1y.negadcpad  P.hod.1y.negadcval 13 0.5 13.5 4000 0 40000
-TH2F phodo_2x_negadc_val_v_pad '' P.hod.2x.negadcpad  P.hod.2x.negadcval 14 0.5 14.5 4000 0 40000
-TH2F phodo_2y_negadc_val_v_pad '' P.hod.2y.negadcpad  P.hod.2y.negadcval 21 0.5 21.5 4000 0 40000
+TH2F phodo_1x_posadcval_v_pad 'SHMS 1X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' P.hod.1x.posadcpad  P.hod.1x.posadcval 13 0.5 13.5 4000 0 40000
+TH2F phodo_1y_posadcval_v_pad 'SHMS 1Y+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' P.hod.1y.posadcpad  P.hod.1y.posadcval 13 0.5 13.5 4000 0 40000
+TH2F phodo_2x_posadcval_v_pad 'SHMS 2X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' P.hod.2x.posadcpad  P.hod.2x.posadcval 14 0.5 14.5 4000 0 40000
+TH2F phodo_2y_posadcval_v_pad 'SHMS 1X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' P.hod.2y.posadcpad  P.hod.2y.posadcval 21 0.5 21.5 4000 0 40000
+
+TH2F phodo_1x_negadcval_v_pad 'SHMS 1X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' P.hod.1x.negadcpad  P.hod.1x.negadcval 13 0.5 13.5 4000 0 40000
+TH2F phodo_1y_negadcval_v_pad 'SHMS 1X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' P.hod.1y.negadcpad  P.hod.1y.negadcval 13 0.5 13.5 4000 0 40000
+TH2F phodo_2x_negadcval_v_pad 'SHMS 1X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' P.hod.2x.negadcpad  P.hod.2x.negadcval 14 0.5 14.5 4000 0 40000
+TH2F phodo_2y_negadcval_v_pad 'SHMS 1X+ Pulse Integral vs. Paddle Number; Paddle Number; Pulse Integral / 10 ADC Units' P.hod.2y.negadcpad  P.hod.2y.negadcval 21 0.5 21.5 4000 0 40000
+
+TH2F phodo_1x_posadcped_v_pad 'SHMS 1X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' P.hod.1x.posadcpad  P.hod.1x.posadcped 13 0.5 13.5 4000 0 40000
+TH2F phodo_1y_posadcped_v_pad 'SHMS 1Y+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' P.hod.1y.posadcpad  P.hod.1y.posadcped 13 0.5 13.5 4000 0 40000
+TH2F phodo_2x_posadcped_v_pad 'SHMS 2X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' P.hod.2x.posadcpad  P.hod.2x.posadcped 14 0.5 14.5 4000 0 40000
+TH2F phodo_2y_posadcped_v_pad 'SHMS 1X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' P.hod.2y.posadcpad  P.hod.2y.posadcped 21 0.5 21.5 4000 0 40000
+
+TH2F phodo_1x_negadcped_v_pad 'SHMS 1X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' P.hod.1x.negadcpad  P.hod.1x.negadcped 13 0.5 13.5 4000 0 40000
+TH2F phodo_1y_negadcped_v_pad 'SHMS 1X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' P.hod.1y.negadcpad  P.hod.1y.negadcped 13 0.5 13.5 4000 0 40000
+TH2F phodo_2x_negadcped_v_pad 'SHMS 1X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' P.hod.2x.negadcpad  P.hod.2x.negadcped 14 0.5 14.5 4000 0 40000
+TH2F phodo_2y_negadcped_v_pad 'SHMS 1X+ Pulse Pedestal vs. Paddle Number; Paddle Number; Pulse Pedestal / 10 ADC Units' P.hod.2y.negadcpad  P.hod.2y.negadcped 21 0.5 21.5 4000 0 40000
+
+TH2F phodo_1x_postdcval_v_pad 'SHMS 1X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' P.hod.1x.postdcpad  P.hod.1x.postdcval 13 0.5 13.5 4000 -20000 20000
+TH2F phodo_1y_postdcval_v_pad 'SHMS 1Y+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' P.hod.1y.postdcpad  P.hod.1y.postdcval 13 0.5 13.5 4000 -20000 20000
+TH2F phodo_2x_postdcval_v_pad 'SHMS 2X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' P.hod.2x.postdcpad  P.hod.2x.postdcval 14 0.5 14.5 4000 -20000 20000
+TH2F phodo_2y_postdcval_v_pad 'SHMS 1X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' P.hod.2y.postdcpad  P.hod.2y.postdcval 21 0.5 21.5 4000 -20000 20000
+
+TH2F phodo_1x_negtdcval_v_pad 'SHMS 1X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' P.hod.1x.negtdcpad  P.hod.1x.negtdcval 13 0.5 13.5 4000 -20000 20000
+TH2F phodo_1y_negtdcval_v_pad 'SHMS 1X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' P.hod.1y.negtdcpad  P.hod.1y.negtdcval 13 0.5 13.5 4000 -20000 20000
+TH2F phodo_2x_negtdcval_v_pad 'SHMS 1X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' P.hod.2x.negtdcpad  P.hod.2x.negtdcval 14 0.5 14.5 4000 -20000 20000
+TH2F phodo_2y_negtdcval_v_pad 'SHMS 1X+ Raw TDC vs. Paddle Number; Paddle Number; Raw TDC / 10 TDC Units' P.hod.2y.negtdcpad  P.hod.2y.negtdcval 21 0.5 21.5 4000 -20000 20000
 
 TH1F phodo_h1x_multi 'SHMS 1X Multiplicity; Number of Hits; Counts' P.hod.1x.nhits 13 0.5 13.5
 TH1F phodo_h1y_multi 'SHMS 1Y Multiplicity; Number of Hits; Counts' P.hod.1y.nhits 13 0.5 13.5
 TH1F phodo_h2x_multi 'SHMS 2X Multiplicity; Number of Hits; Counts' P.hod.2x.nhits 14 0.5 14.5
 TH1F phodo_h2y_multi 'SHMS 2Y Multiplicity; Number of Hits; Counts' P.hod.2y.nhits 21 0.5 21.5
 
+TH1F phodo_h1xp_adc_occu 'SHMS 1X+ ADC Occupancy; Paddle Number; Number of Hits' P.hod.1x.posadcpad 13 0.5 13.5
+TH1F phodo_h1yp_adc_occu 'SHMS 1Y+ ADC Occupancy; Paddle Number; Number of Hits' P.hod.1y.posadcpad 13 0.5 13.5 
+TH1F phodo_h2xp_adc_occu 'SHMS 2X+ ADC Occupancy; Paddle Number; Number of Hits' P.hod.2x.posadcpad 14 0.5 14.5
+TH1F phodo_h2yp_adc_occu 'SHMS 2Y+ ADC Occupancy; Paddle Number; Number of Hits' P.hod.2y.posadcpad 21 0.5 21.5
+
 TH1F phodo_h1xm_adc_occu 'SHMS 1X- ADC Occupancy; Paddle Number; Number of Hits' P.hod.1x.negadcpad 13 0.5 13.5
 TH1F phodo_h1ym_adc_occu 'SHMS 1Y- ADC Occupancy; Paddle Number; Number of Hits' P.hod.1y.negadcpad 13 0.5 13.5 
 TH1F phodo_h2xm_adc_occu 'SHMS 2X- ADC Occupancy; Paddle Number; Number of Hits' P.hod.2x.negadcpad 14 0.5 14.5
 TH1F phodo_h2ym_adc_occu 'SHMS 2Y- ADC Occupancy; Paddle Number; Number of Hits' P.hod.2y.negadcpad 21 0.5 21.5
 
-TH1F phodo_h1xp_adc_occu 'SHMS 1X+ ADC Occupancy; Paddle Number; Number of Hits' P.hod.1x.posadcpad 13 0.5 13.5
-TH1F phodo_h1yp_adc_occu 'SHMS 1Y+ ADC Occupancy; Paddle Number; Number of Hits' P.hod.1y.posadcpad 13 0.5 13.5 
-TH1F phodo_h2xp_adc_occu 'SHMS 2X+ ADC Occupancy; Paddle Number; Number of Hits' P.hod.2x.posadcpad 14 0.5 14.5
-TH1F phodo_h2yp_adc_occu 'SHMS 2Y+ ADC Occupancy; Paddle Number; Number of Hits' P.hod.2y.posadcpad 21 0.5 21.5
+TH1F phodo_h1xp_tdc_occu 'SHMS 1X+ TDC Occupancy; Paddle Number; Number of Hits' P.hod.1x.postdcpad 13 0.5 13.5
+TH1F phodo_h1yp_tdc_occu 'SHMS 1Y+ TDC Occupancy; Paddle Number; Number of Hits' P.hod.1y.postdcpad 13 0.5 13.5 
+TH1F phodo_h2xp_tdc_occu 'SHMS 2X+ TDC Occupancy; Paddle Number; Number of Hits' P.hod.2x.postdcpad 14 0.5 14.5
+TH1F phodo_h2yp_tdc_occu 'SHMS 2Y+ TDC Occupancy; Paddle Number; Number of Hits' P.hod.2y.postdcpad 21 0.5 21.5
 
 TH1F phodo_h1xm_tdc_occu 'SHMS 1X- TDC Occupancy; Paddle Number; Number of Hits' P.hod.1x.negtdcpad 13 0.5 13.5
 TH1F phodo_h1ym_tdc_occu 'SHMS 1Y- TDC Occupancy; Paddle Number; Number of Hits' P.hod.1y.negtdcpad 13 0.5 13.5 
 TH1F phodo_h2xm_tdc_occu 'SHMS 2X- TDC Occupancy; Paddle Number; Number of Hits' P.hod.2x.negtdcpad 14 0.5 14.5
 TH1F phodo_h2ym_tdc_occu 'SHMS 2Y- TDC Occupancy; Paddle Number; Number of Hits' P.hod.2y.negtdcpad 21 0.5 21.5
 
-TH1F phodo_h1xp_tdc_occu 'SHMS 1X+ TDC Occupancy; Paddle Number; Number of Hits' P.hod.1x.postdcpad 13 0.5 13.5
-TH1F phodo_h1yp_tdc_occu 'SHMS 1Y+ TDC Occupancy; Paddle Number; Number of Hits' P.hod.1y.postdcpad 13 0.5 13.5 
-TH1F phodo_h2xp_tdc_occu 'SHMS 2X+ TDC Occupancy; Paddle Number; Number of Hits' P.hod.2x.postdcpad 14 0.5 14.5
-TH1F phodo_h2yp_tdc_occu 'SHMS 2Y+ TDC Occupancy; Paddle Number; Number of Hits' P.hod.2y.postdcpad 21 0.5 21.5
+
diff --git a/DEF-files/SHMS/TRIG/ptrigana.def b/DEF-files/SHMS/TRIG/ptrigana.def
new file mode 100644
index 0000000000000000000000000000000000000000..01f6b19a32cecfa5dbc73a2b775c8587633aa655
--- /dev/null
+++ b/DEF-files/SHMS/TRIG/ptrigana.def
@@ -0,0 +1,26 @@
+# See $ANALYZER/examples/output_example.def for examples
+#
+block T.shms.*
+
+TH1F ptrig_p1x_tdc 'SHMS p1x TDC Time; Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.p1X_tdc 4000 -20000 20000
+TH1F ptrig_p1y_tdc 'SHMS p1y TDC Time; Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.p1Y_tdc 4000 -20000 20000
+TH1F ptrig_p2x_tdc 'SHMS p2x TDC Time; Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.p2X_tdc 4000 -20000 20000
+TH1F ptrig_p2y_tdc 'SHMS p2y TDC Time; Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.p2Y_tdc 4000 -20000 20000
+
+TH1F ptrig_h1T_tdc 'SHMS p1x/p1y Coincidence TDC Time; Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.p1T_tdc 4000 -20000 20000
+TH1F ptrig_h2T_tdc 'SHMS p2x/p2y Coincidence TDC Time; Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.p2T_tdc 4000 -20000 20000
+
+TH1F ptrig_hT1_tdc 'SHMS p1x/p1y/p2x/p2y Coincidence TDC Time (Slot 20, Channel 15); Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pT1_tdc 4000 -20000 20000
+TH1F ptrig_hT2_tdc 'SHMS p1x/p1y/p2x/p2y Coincidence TDC Time (Slot 19, Channel 31); Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pT2_tdc 4000 -20000 20000
+TH1F ptrig_hT3_tdc 'SHMS p1x/p1y/p2x/p2y Coincidence TDC Time (Slot 19, Channel 38); Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pT3_tdc 4000 -20000 20000
+
+TH1F ptrig_hdc_ref1  'SHMS HDC Reference Time 1;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF1_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref2  'SHMS HDC Reference Time 2;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF2_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref3  'SHMS HDC Reference Time 3;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF3_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref4  'SHMS HDC Reference Time 4;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF4_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref5  'SHMS HDC Reference Time 5;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF5_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref6  'SHMS HDC Reference Time 6;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF6_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref7  'SHMS HDC Reference Time 7;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF7_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref8  'SHMS HDC Reference Time 8;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF8_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref9  'SHMS HDC Reference Time 9;  Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF9_tdc  4000 -20000 20000
+TH1F ptrig_hdc_ref10 'SHMS HDC Reference Time 10; Raw TDC Time (TDC Units); Counts / 10 TDC Units;' T.shms.pDCREF10_tdc 4000 -20000 20000
diff --git a/DEF-files/SHMS/TRIG/ptrigana_cuts.def b/DEF-files/SHMS/TRIG/ptrigana_cuts.def
new file mode 100644
index 0000000000000000000000000000000000000000..3af34a5e9835ac62bdbfcc30004dda336ed171d9
--- /dev/null
+++ b/DEF-files/SHMS/TRIG/ptrigana_cuts.def
@@ -0,0 +1,13 @@
+Block: RawDecode
+
+Pedestal_event 0
+RawDecode_master 1
+
+Block: Decode
+Decode_master 1
+
+Block: CoarseTracking
+CoarseTracking_master 1
+
+Block: CoarseReconstruct
+CourseReconstruct 0
diff --git a/MAPS/HMS/DETEC/hdc.map b/MAPS/HMS/DETEC/hdc.map
index 95a8d69aa05f9438fea16698f908c07fe52d1ffa..4311a238928221d2a0f10917ced912df7525d2fb 100644
--- a/MAPS/HMS/DETEC/hdc.map
+++ b/MAPS/HMS/DETEC/hdc.map
@@ -1,1166 +1,1159 @@
-!HMS:
-! HDC_ID= 11               TDC
+! HDC_ID=11        ::  TDC
+
+
+DETECTOR=11  ! HMS chambers
 
 ROC=3
-detector=11 ! HMS chambers 
 
-! Caen 1190 VME Modules >> DC1
 SLOT=5
 REFINDEX=0
-111,1000,0,0
-! channel,plane,wire
-96,3,1 ! Plane U, wire 1
-97,3,2 ! Plane U, wire 2
-98,3,3 ! Plane U, wire 3
-99,3,4 ! Plane U, wire 4
-100,3,5 ! Plane U, wire 5
-101,3,6 ! Plane U, wire 6
-102,3,7 ! Plane U, wire 7
-103,3,8 ! Plane U, wire 8
-104,3,9 ! Plane U, wire 9
-105,3,10 ! Plane U, wire 10
-106,3,11 ! Plane U, wire 11
-107,3,12 ! Plane U, wire 12
-108,3,13 ! Plane U, wire 13
-109,3,14 ! Plane U, wire 14
-110,1,113 ! Plane X, wire 113 
-80,3,15 ! Plane U, wire 15
-81,3,16 ! Plane U, wire 16
-82,3,17 ! Plane U, wire 17
-83,3,18 ! Plane U, wire 18
-84,3,19 ! Plane U, wire 19
-85,3,20 ! Plane U, wire 20
-86,3,21 ! Plane U, wire 21
-87,3,22 ! Plane U, wire 22
-88,3,23 ! Plane U, wire 23
-89,3,24 ! Plane U, wire 24
-90,3,25 ! Plane U, wire 25
-91,3,26 ! Plane U, wire 26
-92,3,27 ! Plane U, wire 27
-93,3,28 ! Plane U, wire 28
-94,3,29 ! Plane U, wire 29
-64,3,30 ! Plane U, wire 30
-65,3,31 ! Plane U, wire 31
-66,3,32 ! Plane U, wire 32
-67,3,33 ! Plane U, wire 33
-68,3,34 ! Plane U, wire 34
-69,3,35 ! Plane U, wire 35
-70,3,36 ! Plane U, wire 36
-71,3,37 ! Plane U, wire 37
-72,3,38 ! Plane U, wire 38
-73,3,39 ! Plane U, wire 39
-74,3,40 ! Plane U, wire 40
-75,3,41 ! Plane U, wire 41
-76,3,42 ! Plane U, wire 42
-77,3,43 ! Plane U, wire 43
-78,3,44 ! Plane U, wire 44
-79,3,45 ! Plane U, wire 45
-48,3,46 ! Plane U, wire 46
-49,3,47 ! Plane U, wire 47
-50,3,48 ! Plane U, wire 48
-51,3,49 ! Plane U, wire 49
-52,3,50 ! Plane U, wire 50
-53,3,51 ! Plane U, wire 51
-54,3,52 ! Plane U, wire 52
-55,3,53 ! Plane U, wire 53
-56,3,54 ! Plane U, wire 54
-57,3,55 ! Plane U, wire 55
-58,3,56 ! Plane U, wire 56
-59,3,57 ! Plane U, wire 57
-60,3,58 ! Plane U, wire 58
-61,3,59 ! Plane U, wire 59
-62,3,60 ! Plane U, wire 60
-32,3,61 ! Plane U, wire 61
-33,3,62 ! Plane U, wire 62
-34,3,63 ! Plane U, wire 63
-35,3,64 ! Plane U, wire 64
-36,3,65 ! Plane U, wire 65
-37,3,66 ! Plane U, wire 66
-38,3,67 ! Plane U, wire 67
-39,3,68 ! Plane U, wire 68
-40,3,69 ! Plane U, wire 69
-41,3,70 ! Plane U, wire 70
-42,3,71 ! Plane U, wire 71
-43,3,72 ! Plane U, wire 72
-44,3,73 ! Plane U, wire 73
-45,3,74 ! Plane U, wire 74
-46,3,75 ! Plane U, wire 75
-47,3,76 ! Plane U, wire 76
-16,3,77 ! Plane U, wire 77
-17,3,78 ! Plane U, wire 78
-18,3,79 ! Plane U, wire 79
-19,3,80 ! Plane U, wire 80
-20,3,81 ! Plane U, wire 81
-21,3,82 ! Plane U, wire 82
-22,3,83 ! Plane U, wire 83
-23,3,84 ! Plane U, wire 84
-24,3,85 ! Plane U, wire 85
-25,3,86 ! Plane U, wire 86
-26,3,87 ! Plane U, wire 87
-27,3,88 ! Plane U, wire 88
-28,3,89 ! Plane U, wire 89
-29,3,90 ! Plane U, wire 90
-30,3,91 ! Plane U, wire 91
-0,3,92 ! Plane U, wire 92
-1,3,93 ! Plane U, wire 93
-2,3,94 ! Plane U, wire 94
-3,3,95 ! Plane U, wire 95
-4,3,96 ! Plane U, wire 96
-5,3,97 ! Plane U, wire 97
-6,3,98 ! Plane U, wire 98
-7,3,99 ! Plane U, wire 99
-8,3,100 ! Plane U, wire 100
-9,3,101 ! Plane U, wire 101
-10,3,102 ! Plane U, wire 102
-11,3,103 ! Plane U, wire 103
-12,3,104 ! Plane U, wire 104
-13,3,105 ! Plane U, wire 105
-14,3,106 ! Plane U, wire 106
-15,3,107 ! Plane U, wire 107
+ 111,1000,   0,   0
+  96,   3,   1  ! Plane U, wire 1
+  97,   3,   2  ! Plane U, wire 2
+  98,   3,   3  ! Plane U, wire 3
+  99,   3,   4  ! Plane U, wire 4
+ 100,   3,   5  ! Plane U, wire 5
+ 101,   3,   6  ! Plane U, wire 6
+ 102,   3,   7  ! Plane U, wire 7
+ 103,   3,   8  ! Plane U, wire 8
+ 104,   3,   9  ! Plane U, wire 9
+ 105,   3,  10  ! Plane U, wire 10
+ 106,   3,  11  ! Plane U, wire 11
+ 107,   3,  12  ! Plane U, wire 12
+ 108,   3,  13  ! Plane U, wire 13
+ 109,   3,  14  ! Plane U, wire 14
+ 110,   1, 113  ! Plane X, wire 113
+  80,   3,  15  ! Plane U, wire 15
+  81,   3,  16  ! Plane U, wire 16
+  82,   3,  17  ! Plane U, wire 17
+  83,   3,  18  ! Plane U, wire 18
+  84,   3,  19  ! Plane U, wire 19
+  85,   3,  20  ! Plane U, wire 20
+  86,   3,  21  ! Plane U, wire 21
+  87,   3,  22  ! Plane U, wire 22
+  88,   3,  23  ! Plane U, wire 23
+  89,   3,  24  ! Plane U, wire 24
+  90,   3,  25  ! Plane U, wire 25
+  91,   3,  26  ! Plane U, wire 26
+  92,   3,  27  ! Plane U, wire 27
+  93,   3,  28  ! Plane U, wire 28
+  94,   3,  29  ! Plane U, wire 29
+  64,   3,  30  ! Plane U, wire 30
+  65,   3,  31  ! Plane U, wire 31
+  66,   3,  32  ! Plane U, wire 32
+  67,   3,  33  ! Plane U, wire 33
+  68,   3,  34  ! Plane U, wire 34
+  69,   3,  35  ! Plane U, wire 35
+  70,   3,  36  ! Plane U, wire 36
+  71,   3,  37  ! Plane U, wire 37
+  72,   3,  38  ! Plane U, wire 38
+  73,   3,  39  ! Plane U, wire 39
+  74,   3,  40  ! Plane U, wire 40
+  75,   3,  41  ! Plane U, wire 41
+  76,   3,  42  ! Plane U, wire 42
+  77,   3,  43  ! Plane U, wire 43
+  78,   3,  44  ! Plane U, wire 44
+  79,   3,  45  ! Plane U, wire 45
+  48,   3,  46  ! Plane U, wire 46
+  49,   3,  47  ! Plane U, wire 47
+  50,   3,  48  ! Plane U, wire 48
+  51,   3,  49  ! Plane U, wire 49
+  52,   3,  50  ! Plane U, wire 50
+  53,   3,  51  ! Plane U, wire 51
+  54,   3,  52  ! Plane U, wire 52
+  55,   3,  53  ! Plane U, wire 53
+  56,   3,  54  ! Plane U, wire 54
+  57,   3,  55  ! Plane U, wire 55
+  58,   3,  56  ! Plane U, wire 56
+  59,   3,  57  ! Plane U, wire 57
+  60,   3,  58  ! Plane U, wire 58
+  61,   3,  59  ! Plane U, wire 59
+  62,   3,  60  ! Plane U, wire 60
+  32,   3,  61  ! Plane U, wire 61
+  33,   3,  62  ! Plane U, wire 62
+  34,   3,  63  ! Plane U, wire 63
+  35,   3,  64  ! Plane U, wire 64
+  36,   3,  65  ! Plane U, wire 65
+  37,   3,  66  ! Plane U, wire 66
+  38,   3,  67  ! Plane U, wire 67
+  39,   3,  68  ! Plane U, wire 68
+  40,   3,  69  ! Plane U, wire 69
+  41,   3,  70  ! Plane U, wire 70
+  42,   3,  71  ! Plane U, wire 71
+  43,   3,  72  ! Plane U, wire 72
+  44,   3,  73  ! Plane U, wire 73
+  45,   3,  74  ! Plane U, wire 74
+  46,   3,  75  ! Plane U, wire 75
+  47,   3,  76  ! Plane U, wire 76
+  16,   3,  77  ! Plane U, wire 77
+  17,   3,  78  ! Plane U, wire 78
+  18,   3,  79  ! Plane U, wire 79
+  19,   3,  80  ! Plane U, wire 80
+  20,   3,  81  ! Plane U, wire 81
+  21,   3,  82  ! Plane U, wire 82
+  22,   3,  83  ! Plane U, wire 83
+  23,   3,  84  ! Plane U, wire 84
+  24,   3,  85  ! Plane U, wire 85
+  25,   3,  86  ! Plane U, wire 86
+  26,   3,  87  ! Plane U, wire 87
+  27,   3,  88  ! Plane U, wire 88
+  28,   3,  89  ! Plane U, wire 89
+  29,   3,  90  ! Plane U, wire 90
+  30,   3,  91  ! Plane U, wire 91
+   0,   3,  92  ! Plane U, wire 92
+   1,   3,  93  ! Plane U, wire 93
+   2,   3,  94  ! Plane U, wire 94
+   3,   3,  95  ! Plane U, wire 95
+   4,   3,  96  ! Plane U, wire 96
+   5,   3,  97  ! Plane U, wire 97
+   6,   3,  98  ! Plane U, wire 98
+   7,   3,  99  ! Plane U, wire 99
+   8,   3, 100  ! Plane U, wire 100
+   9,   3, 101  ! Plane U, wire 101
+  10,   3, 102  ! Plane U, wire 102
+  11,   3, 103  ! Plane U, wire 103
+  12,   3, 104  ! Plane U, wire 104
+  13,   3, 105  ! Plane U, wire 105
+  14,   3, 106  ! Plane U, wire 106
+  15,   3, 107  ! Plane U, wire 107
+
 SLOT=7
 REFINDEX=0
-! channel,plane,wire
-96,4,1 ! Plane V, wire 1
-97,4,2 ! Plane V, wire 2
-98,4,3 ! Plane V, wire 3
-99,4,4 ! Plane V, wire 4
-100,4,5 ! Plane V, wire 5
-101,4,6 ! Plane V, wire 6
-102,4,7 ! Plane V, wire 7
-103,4,8 ! Plane V, wire 8
-104,4,9 ! Plane V, wire 9
-105,4,10 ! Plane V, wire 10
-106,4,11 ! Plane V, wire 11
-107,4,12 ! Plane V, wire 12
-108,4,13 ! Plane V, wire 13
-109,4,14 ! Plane V, wire 14
-110,6,113 ! Plane X', wire 113
-112,4,15 ! Plane V, wire 15
-113,4,16 ! Plane V, wire 16
-114,4,17 ! Plane V, wire 17
-115,4,18 ! Plane V, wire 18
-116,4,19 ! Plane V, wire 19
-117,4,20 ! Plane V, wire 20
-118,4,21 ! Plane V, wire 21
-119,4,22 ! Plane V, wire 22
-120,4,23 ! Plane V, wire 23
-121,4,24 ! Plane V, wire 24
-122,4,25 ! Plane V, wire 25
-123,4,26 ! Plane V, wire 26
-124,4,27 ! Plane V, wire 27
-125,4,28 ! Plane V, wire 28
-126,4,29 ! Plane V, wire 29
+  96,   4,   1  ! Plane V, wire 1
+  97,   4,   2  ! Plane V, wire 2
+  98,   4,   3  ! Plane V, wire 3
+  99,   4,   4  ! Plane V, wire 4
+ 100,   4,   5  ! Plane V, wire 5
+ 101,   4,   6  ! Plane V, wire 6
+ 102,   4,   7  ! Plane V, wire 7
+ 103,   4,   8  ! Plane V, wire 8
+ 104,   4,   9  ! Plane V, wire 9
+ 105,   4,  10  ! Plane V, wire 10
+ 106,   4,  11  ! Plane V, wire 11
+ 107,   4,  12  ! Plane V, wire 12
+ 108,   4,  13  ! Plane V, wire 13
+ 109,   4,  14  ! Plane V, wire 14
+ 110,   6, 113  ! Plane X', wire 113
+ 112,   4,  15  ! Plane V, wire 15
+ 113,   4,  16  ! Plane V, wire 16
+ 114,   4,  17  ! Plane V, wire 17
+ 115,   4,  18  ! Plane V, wire 18
+ 116,   4,  19  ! Plane V, wire 19
+ 117,   4,  20  ! Plane V, wire 20
+ 118,   4,  21  ! Plane V, wire 21
+ 119,   4,  22  ! Plane V, wire 22
+ 120,   4,  23  ! Plane V, wire 23
+ 121,   4,  24  ! Plane V, wire 24
+ 122,   4,  25  ! Plane V, wire 25
+ 123,   4,  26  ! Plane V, wire 26
+ 124,   4,  27  ! Plane V, wire 27
+ 125,   4,  28  ! Plane V, wire 28
+ 126,   4,  29  ! Plane V, wire 29
+
 SLOT=8
 REFINDEX=0
-127,1000,0,1
-! channel,plane,wire
-0,4,30 ! Plane V, wire 30
-1,4,31 ! Plane V, wire 31
-2,4,32 ! Plane V, wire 32
-3,4,33 ! Plane V, wire 33
-4,4,34 ! Plane V, wire 34
-5,4,35 ! Plane V, wire 35
-6,4,36 ! Plane V, wire 36
-7,4,37 ! Plane V, wire 37
-8,4,38 ! Plane V, wire 38
-9,4,39 ! Plane V, wire 39
-10,4,40 ! Plane V, wire 40
-11,4,41 ! Plane V, wire 41
-12,4,42 ! Plane V, wire 42
-13,4,43 ! Plane V, wire 43
-14,4,44 ! Plane V, wire 44
-15,4,45 ! Plane V, wire 45
-16,4,46 ! Plane V, wire 46
-17,4,47 ! Plane V, wire 47
-18,4,48 ! Plane V, wire 48
-19,4,49 ! Plane V, wire 49
-20,4,50 ! Plane V, wire 50
-21,4,51 ! Plane V, wire 51
-22,4,52 ! Plane V, wire 52
-23,4,53 ! Plane V, wire 53
-24,4,54 ! Plane V, wire 54
-25,4,55 ! Plane V, wire 55
-26,4,56 ! Plane V, wire 56
-27,4,57 ! Plane V, wire 57
-28,4,58 ! Plane V, wire 58
-29,4,59 ! Plane V, wire 59
-30,4,60 ! Plane V, wire 60
-32,4,61 ! Plane V, wire 61
-33,4,62 ! Plane V, wire 62
-34,4,63 ! Plane V, wire 63
-35,4,64 ! Plane V, wire 64
-36,4,65 ! Plane V, wire 65
-37,4,66 ! Plane V, wire 66
-38,4,67 ! Plane V, wire 67
-39,4,68 ! Plane V, wire 68
-40,4,69 ! Plane V, wire 69
-41,4,70 ! Plane V, wire 70
-42,4,71 ! Plane V, wire 71
-43,4,72 ! Plane V, wire 72
-44,4,73 ! Plane V, wire 73
-45,4,74 ! Plane V, wire 74
-46,4,75 ! Plane V, wire 75
-47,4,76 ! Plane V, wire 76
-48,4,77 ! Plane V, wire 77
-49,4,78 ! Plane V, wire 78
-50,4,79 ! Plane V, wire 79
-51,4,80 ! Plane V, wire 80
-52,4,81 ! Plane V, wire 81
-53,4,82 ! Plane V, wire 82
-54,4,83 ! Plane V, wire 83
-55,4,84 ! Plane V, wire 84
-56,4,85 ! Plane V, wire 85
-57,4,86 ! Plane V, wire 86
-58,4,87 ! Plane V, wire 87
-59,4,88 ! Plane V, wire 88
-60,4,89 ! Plane V, wire 89
-61,4,90 ! Plane V, wire 90
-62,4,91 ! Plane V, wire 91
+ 127,1000,   0,   1
+   0,   4,  30  ! Plane V, wire 30
+   1,   4,  31  ! Plane V, wire 31
+   2,   4,  32  ! Plane V, wire 32
+   3,   4,  33  ! Plane V, wire 33
+   4,   4,  34  ! Plane V, wire 34
+   5,   4,  35  ! Plane V, wire 35
+   6,   4,  36  ! Plane V, wire 36
+   7,   4,  37  ! Plane V, wire 37
+   8,   4,  38  ! Plane V, wire 38
+   9,   4,  39  ! Plane V, wire 39
+  10,   4,  40  ! Plane V, wire 40
+  11,   4,  41  ! Plane V, wire 41
+  12,   4,  42  ! Plane V, wire 42
+  13,   4,  43  ! Plane V, wire 43
+  14,   4,  44  ! Plane V, wire 44
+  15,   4,  45  ! Plane V, wire 45
+  16,   4,  46  ! Plane V, wire 46
+  17,   4,  47  ! Plane V, wire 47
+  18,   4,  48  ! Plane V, wire 48
+  19,   4,  49  ! Plane V, wire 49
+  20,   4,  50  ! Plane V, wire 50
+  21,   4,  51  ! Plane V, wire 51
+  22,   4,  52  ! Plane V, wire 52
+  23,   4,  53  ! Plane V, wire 53
+  24,   4,  54  ! Plane V, wire 54
+  25,   4,  55  ! Plane V, wire 55
+  26,   4,  56  ! Plane V, wire 56
+  27,   4,  57  ! Plane V, wire 57
+  28,   4,  58  ! Plane V, wire 58
+  29,   4,  59  ! Plane V, wire 59
+  30,   4,  60  ! Plane V, wire 60
+  32,   4,  61  ! Plane V, wire 61
+  33,   4,  62  ! Plane V, wire 62
+  34,   4,  63  ! Plane V, wire 63
+  35,   4,  64  ! Plane V, wire 64
+  36,   4,  65  ! Plane V, wire 65
+  37,   4,  66  ! Plane V, wire 66
+  38,   4,  67  ! Plane V, wire 67
+  39,   4,  68  ! Plane V, wire 68
+  40,   4,  69  ! Plane V, wire 69
+  41,   4,  70  ! Plane V, wire 70
+  42,   4,  71  ! Plane V, wire 71
+  43,   4,  72  ! Plane V, wire 72
+  44,   4,  73  ! Plane V, wire 73
+  45,   4,  74  ! Plane V, wire 74
+  46,   4,  75  ! Plane V, wire 75
+  47,   4,  76  ! Plane V, wire 76
+  48,   4,  77  ! Plane V, wire 77
+  49,   4,  78  ! Plane V, wire 78
+  50,   4,  79  ! Plane V, wire 79
+  51,   4,  80  ! Plane V, wire 80
+  52,   4,  81  ! Plane V, wire 81
+  53,   4,  82  ! Plane V, wire 82
+  54,   4,  83  ! Plane V, wire 83
+  55,   4,  84  ! Plane V, wire 84
+  56,   4,  85  ! Plane V, wire 85
+  57,   4,  86  ! Plane V, wire 86
+  58,   4,  87  ! Plane V, wire 87
+  59,   4,  88  ! Plane V, wire 88
+  60,   4,  89  ! Plane V, wire 89
+  61,   4,  90  ! Plane V, wire 90
+  62,   4,  91  ! Plane V, wire 91
+
 SLOT=4
 REFINDEX=0
-! channel,plane,wire
-96,4,92 ! Plane V, wire 92
-97,4,93 ! Plane V, wire 93
-98,4,94 ! Plane V, wire 94
-99,4,95 ! Plane V, wire 95
-100,4,96 ! Plane V, wire 96
-101,4,97 ! Plane V, wire 97
-102,4,98 ! Plane V, wire 98
-103,4,99 ! Plane V, wire 99
-104,4,100 ! Plane V, wire 100
-105,4,101 ! Plane V, wire 101
-106,4,102 ! Plane V, wire 102
-107,4,103 ! Plane V, wire 103
-108,4,104 ! Plane V, wire 104
-109,4,105 ! Plane V, wire 105
-110,4,106 ! Plane V, wire 106
-111,4,107 ! Plane V, wire 107
-80,1,1 ! Plane X, wire 1
-81,1,2 ! Plane X, wire 2
-82,1,3 ! Plane X, wire 3
-83,1,4 ! Plane X, wire 4
-84,1,5 ! Plane X, wire 5
-85,1,6 ! Plane X, wire 6
-86,1,7 ! Plane X, wire 7
-87,1,8 ! Plane X, wire 8
-88,1,9 ! Plane X, wire 9
-89,1,10 ! Plane X, wire 10
-90,1,11 ! Plane X, wire 11
-91,1,12 ! Plane X, wire 12
-92,1,13 ! Plane X, wire 13
-93,1,14 ! Plane X, wire 14
-94,1,15 ! Plane X, wire 15
-95,1,16 ! Plane X, wire 16
-64,1,17 ! Plane X, wire 17
-65,1,18 ! Plane X, wire 18
-66,1,19 ! Plane X, wire 19
-67,1,20 ! Plane X, wire 20
-68,1,21 ! Plane X, wire 21
-69,1,22 ! Plane X, wire 22
-70,1,23 ! Plane X, wire 23
-71,1,24 ! Plane X, wire 24
-72,1,25 ! Plane X, wire 25
-73,1,26 ! Plane X, wire 26
-74,1,27 ! Plane X, wire 27
-75,1,28 ! Plane X, wire 28
-76,1,29 ! Plane X, wire 29
-77,1,30 ! Plane X, wire 30
-78,1,31 ! Plane X, wire 31
-79,1,32 ! Plane X, wire 32
-48,1,33 ! Plane X, wire 33
-49,1,34 ! Plane X, wire 34
-50,1,35 ! Plane X, wire 35
-51,1,36 ! Plane X, wire 36
-52,1,37 ! Plane X, wire 37
-53,1,38 ! Plane X, wire 38
-54,1,39 ! Plane X, wire 39
-55,1,40 ! Plane X, wire 40
-56,1,41 ! Plane X, wire 41
-57,1,42 ! Plane X, wire 42
-58,1,43 ! Plane X, wire 43
-59,1,44 ! Plane X, wire 44
-60,1,45 ! Plane X, wire 45
-61,1,46 ! Plane X, wire 46
-62,1,47 ! Plane X, wire 47
-63,1,48 ! Plane X, wire 48
-32,1,49 ! Plane X, wire 49
-33,1,50 ! Plane X, wire 50
-34,1,51 ! Plane X, wire 51
-35,1,52 ! Plane X, wire 52
-36,1,53 ! Plane X, wire 53
-37,1,54 ! Plane X, wire 54
-38,1,55 ! Plane X, wire 55
-39,1,56 ! Plane X, wire 56
-40,1,57 ! Plane X, wire 57
-41,1,58 ! Plane X, wire 58
-42,1,59 ! Plane X, wire 59
-43,1,60 ! Plane X, wire 60
-44,1,61 ! Plane X, wire 61
-45,1,62 ! Plane X, wire 62
-46,1,63 ! Plane X, wire 63
-47,1,64 ! Plane X, wire 64
-16,1,65 ! Plane X, wire 65
-17,1,66 ! Plane X, wire 66
-18,1,67 ! Plane X, wire 67
-19,1,68 ! Plane X, wire 68
-20,1,69 ! Plane X, wire 69
-21,1,70 ! Plane X, wire 70
-22,1,71 ! Plane X, wire 71
-23,1,72 ! Plane X, wire 72
-24,1,73 ! Plane X, wire 73
-25,1,74 ! Plane X, wire 74
-26,1,75 ! Plane X, wire 75
-27,1,76 ! Plane X, wire 76
-28,1,77 ! Plane X, wire 77
-29,1,78 ! Plane X, wire 78
-30,1,79 ! Plane X, wire 79
-31,1,80 ! Plane X, wire 80
-0,1,81 ! Plane X, wire 81
-1,1,82 ! Plane X, wire 82
-2,1,83 ! Plane X, wire 83
-3,1,84 ! Plane X, wire 84
-4,1,85 ! Plane X, wire 85
-5,1,86 ! Plane X, wire 86
-6,1,87 ! Plane X, wire 87
-7,1,88 ! Plane X, wire 88
-8,1,89 ! Plane X, wire 89
-9,1,90 ! Plane X, wire 90
-10,1,91 ! Plane X, wire 91
-11,1,92 ! Plane X, wire 92
-12,1,93 ! Plane X, wire 93
-13,1,94 ! Plane X, wire 94
-14,1,95 ! Plane X, wire 95
-15,1,96 ! Plane X, wire 96
+  96,   4,  92  ! Plane V, wire 92
+  97,   4,  93  ! Plane V, wire 93
+  98,   4,  94  ! Plane V, wire 94
+  99,   4,  95  ! Plane V, wire 95
+ 100,   4,  96  ! Plane V, wire 96
+ 101,   4,  97  ! Plane V, wire 97
+ 102,   4,  98  ! Plane V, wire 98
+ 103,   4,  99  ! Plane V, wire 99
+ 104,   4, 100  ! Plane V, wire 100
+ 105,   4, 101  ! Plane V, wire 101
+ 106,   4, 102  ! Plane V, wire 102
+ 107,   4, 103  ! Plane V, wire 103
+ 108,   4, 104  ! Plane V, wire 104
+ 109,   4, 105  ! Plane V, wire 105
+ 110,   4, 106  ! Plane V, wire 106
+ 111,   4, 107  ! Plane V, wire 107
+  80,   1,   1  ! Plane X, wire 1
+  81,   1,   2  ! Plane X, wire 2
+  82,   1,   3  ! Plane X, wire 3
+  83,   1,   4  ! Plane X, wire 4
+  84,   1,   5  ! Plane X, wire 5
+  85,   1,   6  ! Plane X, wire 6
+  86,   1,   7  ! Plane X, wire 7
+  87,   1,   8  ! Plane X, wire 8
+  88,   1,   9  ! Plane X, wire 9
+  89,   1,  10  ! Plane X, wire 10
+  90,   1,  11  ! Plane X, wire 11
+  91,   1,  12  ! Plane X, wire 12
+  92,   1,  13  ! Plane X, wire 13
+  93,   1,  14  ! Plane X, wire 14
+  94,   1,  15  ! Plane X, wire 15
+  95,   1,  16  ! Plane X, wire 16
+  64,   1,  17  ! Plane X, wire 17
+  65,   1,  18  ! Plane X, wire 18
+  66,   1,  19  ! Plane X, wire 19
+  67,   1,  20  ! Plane X, wire 20
+  68,   1,  21  ! Plane X, wire 21
+  69,   1,  22  ! Plane X, wire 22
+  70,   1,  23  ! Plane X, wire 23
+  71,   1,  24  ! Plane X, wire 24
+  72,   1,  25  ! Plane X, wire 25
+  73,   1,  26  ! Plane X, wire 26
+  74,   1,  27  ! Plane X, wire 27
+  75,   1,  28  ! Plane X, wire 28
+  76,   1,  29  ! Plane X, wire 29
+  77,   1,  30  ! Plane X, wire 30
+  78,   1,  31  ! Plane X, wire 31
+  79,   1,  32  ! Plane X, wire 32
+  48,   1,  33  ! Plane X, wire 33
+  49,   1,  34  ! Plane X, wire 34
+  50,   1,  35  ! Plane X, wire 35
+  51,   1,  36  ! Plane X, wire 36
+  52,   1,  37  ! Plane X, wire 37
+  53,   1,  38  ! Plane X, wire 38
+  54,   1,  39  ! Plane X, wire 39
+  55,   1,  40  ! Plane X, wire 40
+  56,   1,  41  ! Plane X, wire 41
+  57,   1,  42  ! Plane X, wire 42
+  58,   1,  43  ! Plane X, wire 43
+  59,   1,  44  ! Plane X, wire 44
+  60,   1,  45  ! Plane X, wire 45
+  61,   1,  46  ! Plane X, wire 46
+  62,   1,  47  ! Plane X, wire 47
+  63,   1,  48  ! Plane X, wire 48
+  32,   1,  49  ! Plane X, wire 49
+  33,   1,  50  ! Plane X, wire 50
+  34,   1,  51  ! Plane X, wire 51
+  35,   1,  52  ! Plane X, wire 52
+  36,   1,  53  ! Plane X, wire 53
+  37,   1,  54  ! Plane X, wire 54
+  38,   1,  55  ! Plane X, wire 55
+  39,   1,  56  ! Plane X, wire 56
+  40,   1,  57  ! Plane X, wire 57
+  41,   1,  58  ! Plane X, wire 58
+  42,   1,  59  ! Plane X, wire 59
+  43,   1,  60  ! Plane X, wire 60
+  44,   1,  61  ! Plane X, wire 61
+  45,   1,  62  ! Plane X, wire 62
+  46,   1,  63  ! Plane X, wire 63
+  47,   1,  64  ! Plane X, wire 64
+  16,   1,  65  ! Plane X, wire 65
+  17,   1,  66  ! Plane X, wire 66
+  18,   1,  67  ! Plane X, wire 67
+  19,   1,  68  ! Plane X, wire 68
+  20,   1,  69  ! Plane X, wire 69
+  21,   1,  70  ! Plane X, wire 70
+  22,   1,  71  ! Plane X, wire 71
+  23,   1,  72  ! Plane X, wire 72
+  24,   1,  73  ! Plane X, wire 73
+  25,   1,  74  ! Plane X, wire 74
+  26,   1,  75  ! Plane X, wire 75
+  27,   1,  76  ! Plane X, wire 76
+  28,   1,  77  ! Plane X, wire 77
+  29,   1,  78  ! Plane X, wire 78
+  30,   1,  79  ! Plane X, wire 79
+  31,   1,  80  ! Plane X, wire 80
+   0,   1,  81  ! Plane X, wire 81
+   1,   1,  82  ! Plane X, wire 82
+   2,   1,  83  ! Plane X, wire 83
+   3,   1,  84  ! Plane X, wire 84
+   4,   1,  85  ! Plane X, wire 85
+   5,   1,  86  ! Plane X, wire 86
+   6,   1,  87  ! Plane X, wire 87
+   7,   1,  88  ! Plane X, wire 88
+   8,   1,  89  ! Plane X, wire 89
+   9,   1,  90  ! Plane X, wire 90
+  10,   1,  91  ! Plane X, wire 91
+  11,   1,  92  ! Plane X, wire 92
+  12,   1,  93  ! Plane X, wire 93
+  13,   1,  94  ! Plane X, wire 94
+  14,   1,  95  ! Plane X, wire 95
+  15,   1,  96  ! Plane X, wire 96
+
 SLOT=7
 REFINDEX=0
-! channel,plane,wire
-80,1,97 ! Plane X, wire 97
-81,1,98 ! Plane X, wire 98
-82,1,99 ! Plane X, wire 99
-83,1,100 ! Plane X, wire 100
-84,1,101 ! Plane X, wire 101
-85,1,102 ! Plane X, wire 102
-86,1,103 ! Plane X, wire 103
-87,1,104 ! Plane X, wire 104
-88,1,105 ! Plane X, wire 105
-89,1,106 ! Plane X, wire 106
-90,1,107 ! Plane X, wire 107
-91,1,108 ! Plane X, wire 108
-92,1,109 ! Plane X, wire 109
-93,1,110 ! Plane X, wire 110
-94,1,111 ! Plane X, wire 111
-95,1,112 ! Plane X, wire 112
+  80,   1,  97  ! Plane X, wire 97
+  81,   1,  98  ! Plane X, wire 98
+  82,   1,  99  ! Plane X, wire 99
+  83,   1, 100  ! Plane X, wire 100
+  84,   1, 101  ! Plane X, wire 101
+  85,   1, 102  ! Plane X, wire 102
+  86,   1, 103  ! Plane X, wire 103
+  87,   1, 104  ! Plane X, wire 104
+  88,   1, 105  ! Plane X, wire 105
+  89,   1, 106  ! Plane X, wire 106
+  90,   1, 107  ! Plane X, wire 107
+  91,   1, 108  ! Plane X, wire 108
+  92,   1, 109  ! Plane X, wire 109
+  93,   1, 110  ! Plane X, wire 110
+  94,   1, 111  ! Plane X, wire 111
+  95,   1, 112  ! Plane X, wire 112
+
 SLOT=4
 REFINDEX=0
-! channel,plane,wire
-112,6,1 ! Plane X', wire 1
-113,6,2 ! Plane X', wire 2
-114,6,3 ! Plane X', wire 3
-115,6,4 ! Plane X', wire 4
-116,6,5 ! Plane X', wire 5
-117,6,6 ! Plane X', wire 6
-118,6,7 ! Plane X', wire 7
-119,6,8 ! Plane X', wire 8
-120,6,9 ! Plane X', wire 9
-121,6,10 ! Plane X', wire 10
-122,6,11 ! Plane X', wire 11
-123,6,12 ! Plane X', wire 12
-124,6,13 ! Plane X', wire 13
-125,6,14 ! Plane X', wire 14
-126,6,15 ! Plane X', wire 15
-127,6,16 ! Plane X', wire 16
+ 112,   6,   1  ! Plane X', wire 1
+ 113,   6,   2  ! Plane X', wire 2
+ 114,   6,   3  ! Plane X', wire 3
+ 115,   6,   4  ! Plane X', wire 4
+ 116,   6,   5  ! Plane X', wire 5
+ 117,   6,   6  ! Plane X', wire 6
+ 118,   6,   7  ! Plane X', wire 7
+ 119,   6,   8  ! Plane X', wire 8
+ 120,   6,   9  ! Plane X', wire 9
+ 121,   6,  10  ! Plane X', wire 10
+ 122,   6,  11  ! Plane X', wire 11
+ 123,   6,  12  ! Plane X', wire 12
+ 124,   6,  13  ! Plane X', wire 13
+ 125,   6,  14  ! Plane X', wire 14
+ 126,   6,  15  ! Plane X', wire 15
+ 127,   6,  16  ! Plane X', wire 16
+
 SLOT=5
 REFINDEX=0
-! channel,plane,wire
-112,6,17 ! Plane X', wire 17
-113,6,18 ! Plane X', wire 18
-114,6,19 ! Plane X', wire 19
-115,6,20 ! Plane X', wire 20
-116,6,21 ! Plane X', wire 21
-117,6,22 ! Plane X', wire 22
-118,6,23 ! Plane X', wire 23
-119,6,24 ! Plane X', wire 24
-120,6,25 ! Plane X', wire 25
-121,6,26 ! Plane X', wire 26
-122,6,27 ! Plane X', wire 27
-123,6,28 ! Plane X', wire 28
-124,6,29 ! Plane X', wire 29
-125,6,30 ! Plane X', wire 30
-126,6,31 ! Plane X', wire 31
-127,6,32 ! Plane X', wire 32
+ 112,   6,  17  ! Plane X', wire 17
+ 113,   6,  18  ! Plane X', wire 18
+ 114,   6,  19  ! Plane X', wire 19
+ 115,   6,  20  ! Plane X', wire 20
+ 116,   6,  21  ! Plane X', wire 21
+ 117,   6,  22  ! Plane X', wire 22
+ 118,   6,  23  ! Plane X', wire 23
+ 119,   6,  24  ! Plane X', wire 24
+ 120,   6,  25  ! Plane X', wire 25
+ 121,   6,  26  ! Plane X', wire 26
+ 122,   6,  27  ! Plane X', wire 27
+ 123,   6,  28  ! Plane X', wire 28
+ 124,   6,  29  ! Plane X', wire 29
+ 125,   6,  30  ! Plane X', wire 30
+ 126,   6,  31  ! Plane X', wire 31
+ 127,   6,  32  ! Plane X', wire 32
+
 SLOT=7
 REFINDEX=0
-! channel,plane,wire
-0,6,33 ! Plane X', wire 33
-1,6,34 ! Plane X', wire 34
-2,6,35 ! Plane X', wire 35
-3,6,36 ! Plane X', wire 36
-4,6,37 ! Plane X', wire 37
-5,6,38 ! Plane X', wire 38
-6,6,39 ! Plane X', wire 39
-7,6,40 ! Plane X', wire 40
-8,6,41 ! Plane X', wire 41
-9,6,42 ! Plane X', wire 42
-10,6,43 ! Plane X', wire 43
-11,6,44 ! Plane X', wire 44
-12,6,45 ! Plane X', wire 45
-13,6,46 ! Plane X', wire 46
-14,6,47 ! Plane X', wire 47
-15,6,48 ! Plane X', wire 48
-16,6,49 ! Plane X', wire 49
-17,6,50 ! Plane X', wire 50
-18,6,51 ! Plane X', wire 51
-19,6,52 ! Plane X', wire 52
-20,6,53 ! Plane X', wire 53
-21,6,54 ! Plane X', wire 54
-22,6,55 ! Plane X', wire 55
-23,6,56 ! Plane X', wire 56
-24,6,57 ! Plane X', wire 57
-25,6,58 ! Plane X', wire 58
-26,6,59 ! Plane X', wire 59
-27,6,60 ! Plane X', wire 60
-28,6,61 ! Plane X', wire 61
-29,6,62 ! Plane X', wire 62
-30,6,63 ! Plane X', wire 63
-31,6,64 ! Plane X', wire 64
-32,6,65 ! Plane X', wire 65
-33,6,66 ! Plane X', wire 66
-34,6,67 ! Plane X', wire 67
-35,6,68 ! Plane X', wire 68
-36,6,69 ! Plane X', wire 69
-37,6,70 ! Plane X', wire 70
-38,6,71 ! Plane X', wire 71
-39,6,72 ! Plane X', wire 72
-40,6,73 ! Plane X', wire 73
-41,6,74 ! Plane X', wire 74
-42,6,75 ! Plane X', wire 75
-43,6,76 ! Plane X', wire 76
-44,6,77 ! Plane X', wire 77
-45,6,78 ! Plane X', wire 78
-46,6,79 ! Plane X', wire 79
-47,6,80 ! Plane X', wire 80
-48,6,81 ! Plane X', wire 81
-49,6,82 ! Plane X', wire 82
-50,6,83 ! Plane X', wire 83
-51,6,84 ! Plane X', wire 84
-52,6,85 ! Plane X', wire 85
-53,6,86 ! Plane X', wire 86
-54,6,87 ! Plane X', wire 87
-55,6,88 ! Plane X', wire 88
-56,6,89 ! Plane X', wire 89
-57,6,90 ! Plane X', wire 90
-58,6,91 ! Plane X', wire 91
-59,6,92 ! Plane X', wire 92
-60,6,93 ! Plane X', wire 93
-61,6,94 ! Plane X', wire 94
-62,6,95 ! Plane X', wire 95
-63,6,96 ! Plane X', wire 96
-64,6,97 ! Plane X', wire 97
-65,6,98 ! Plane X', wire 98
-66,6,99 ! Plane X', wire 99
-67,6,100 ! Plane X', wire 100
-68,6,101 ! Plane X', wire 101
-69,6,102 ! Plane X', wire 102
-70,6,103 ! Plane X', wire 103
-71,6,104 ! Plane X', wire 104
-72,6,105 ! Plane X', wire 105
-73,6,106 ! Plane X', wire 106
-74,6,107 ! Plane X', wire 107
-75,6,108 ! Plane X', wire 108
-76,6,109 ! Plane X', wire 109
-77,6,110 ! Plane X', wire 110
-78,6,111 ! Plane X', wire 111
-79,6,112 ! Plane X', wire 112
+   0,   6,  33  ! Plane X', wire 33
+   1,   6,  34  ! Plane X', wire 34
+   2,   6,  35  ! Plane X', wire 35
+   3,   6,  36  ! Plane X', wire 36
+   4,   6,  37  ! Plane X', wire 37
+   5,   6,  38  ! Plane X', wire 38
+   6,   6,  39  ! Plane X', wire 39
+   7,   6,  40  ! Plane X', wire 40
+   8,   6,  41  ! Plane X', wire 41
+   9,   6,  42  ! Plane X', wire 42
+  10,   6,  43  ! Plane X', wire 43
+  11,   6,  44  ! Plane X', wire 44
+  12,   6,  45  ! Plane X', wire 45
+  13,   6,  46  ! Plane X', wire 46
+  14,   6,  47  ! Plane X', wire 47
+  15,   6,  48  ! Plane X', wire 48
+  16,   6,  49  ! Plane X', wire 49
+  17,   6,  50  ! Plane X', wire 50
+  18,   6,  51  ! Plane X', wire 51
+  19,   6,  52  ! Plane X', wire 52
+  20,   6,  53  ! Plane X', wire 53
+  21,   6,  54  ! Plane X', wire 54
+  22,   6,  55  ! Plane X', wire 55
+  23,   6,  56  ! Plane X', wire 56
+  24,   6,  57  ! Plane X', wire 57
+  25,   6,  58  ! Plane X', wire 58
+  26,   6,  59  ! Plane X', wire 59
+  27,   6,  60  ! Plane X', wire 60
+  28,   6,  61  ! Plane X', wire 61
+  29,   6,  62  ! Plane X', wire 62
+  30,   6,  63  ! Plane X', wire 63
+  31,   6,  64  ! Plane X', wire 64
+  32,   6,  65  ! Plane X', wire 65
+  33,   6,  66  ! Plane X', wire 66
+  34,   6,  67  ! Plane X', wire 67
+  35,   6,  68  ! Plane X', wire 68
+  36,   6,  69  ! Plane X', wire 69
+  37,   6,  70  ! Plane X', wire 70
+  38,   6,  71  ! Plane X', wire 71
+  39,   6,  72  ! Plane X', wire 72
+  40,   6,  73  ! Plane X', wire 73
+  41,   6,  74  ! Plane X', wire 74
+  42,   6,  75  ! Plane X', wire 75
+  43,   6,  76  ! Plane X', wire 76
+  44,   6,  77  ! Plane X', wire 77
+  45,   6,  78  ! Plane X', wire 78
+  46,   6,  79  ! Plane X', wire 79
+  47,   6,  80  ! Plane X', wire 80
+  48,   6,  81  ! Plane X', wire 81
+  49,   6,  82  ! Plane X', wire 82
+  50,   6,  83  ! Plane X', wire 83
+  51,   6,  84  ! Plane X', wire 84
+  52,   6,  85  ! Plane X', wire 85
+  53,   6,  86  ! Plane X', wire 86
+  54,   6,  87  ! Plane X', wire 87
+  55,   6,  88  ! Plane X', wire 88
+  56,   6,  89  ! Plane X', wire 89
+  57,   6,  90  ! Plane X', wire 90
+  58,   6,  91  ! Plane X', wire 91
+  59,   6,  92  ! Plane X', wire 92
+  60,   6,  93  ! Plane X', wire 93
+  61,   6,  94  ! Plane X', wire 94
+  62,   6,  95  ! Plane X', wire 95
+  63,   6,  96  ! Plane X', wire 96
+  64,   6,  97  ! Plane X', wire 97
+  65,   6,  98  ! Plane X', wire 98
+  66,   6,  99  ! Plane X', wire 99
+  67,   6, 100  ! Plane X', wire 100
+  68,   6, 101  ! Plane X', wire 101
+  69,   6, 102  ! Plane X', wire 102
+  70,   6, 103  ! Plane X', wire 103
+  71,   6, 104  ! Plane X', wire 104
+  72,   6, 105  ! Plane X', wire 105
+  73,   6, 106  ! Plane X', wire 106
+  74,   6, 107  ! Plane X', wire 107
+  75,   6, 108  ! Plane X', wire 108
+  76,   6, 109  ! Plane X', wire 109
+  77,   6, 110  ! Plane X', wire 110
+  78,   6, 111  ! Plane X', wire 111
+  79,   6, 112  ! Plane X', wire 112
+
 SLOT=8
 REFINDEX=0
-! channel,plane,wire
-64,2,1 ! Plane Y, wire 1
-65,2,2 ! Plane Y, wire 2
-66,2,3 ! Plane Y, wire 3
-67,2,4 ! Plane Y, wire 4
-68,2,5 ! Plane Y, wire 5
-69,2,6 ! Plane Y, wire 6
-70,2,7 ! Plane Y, wire 7
-71,2,8 ! Plane Y, wire 8
-72,2,9 ! Plane Y, wire 9
-73,2,10 ! Plane Y, wire 10
-74,2,11 ! Plane Y, wire 11
-75,2,12 ! Plane Y, wire 12
-76,2,13 ! Plane Y, wire 13
-80,2,14 ! Plane Y, wire 14
-81,2,15 ! Plane Y, wire 15
-82,2,16 ! Plane Y, wire 16
-83,2,17 ! Plane Y, wire 17
-84,2,18 ! Plane Y, wire 18
-85,2,19 ! Plane Y, wire 19
-86,2,20 ! Plane Y, wire 20
-87,2,21 ! Plane Y, wire 21
-88,2,22 ! Plane Y, wire 22
-89,2,23 ! Plane Y, wire 23
-90,2,24 ! Plane Y, wire 24
-91,2,25 ! Plane Y, wire 25
-92,2,26 ! Plane Y, wire 26
-96,2,27 ! Plane Y, wire 27
-97,2,28 ! Plane Y, wire 28
-98,2,29 ! Plane Y, wire 29
-99,2,30 ! Plane Y, wire 30
-100,2,31 ! Plane Y, wire 31
-101,2,32 ! Plane Y, wire 32
-102,2,33 ! Plane Y, wire 33
-103,2,34 ! Plane Y, wire 34
-104,2,35 ! Plane Y, wire 35
-105,2,36 ! Plane Y, wire 36
-106,2,37 ! Plane Y, wire 37
-107,2,38 ! Plane Y, wire 38
-108,2,39 ! Plane Y, wire 39
-112,2,40 ! Plane Y, wire 40
-113,2,41 ! Plane Y, wire 41
-114,2,42 ! Plane Y, wire 42
-115,2,43 ! Plane Y, wire 43
-116,2,44 ! Plane Y, wire 44
-117,2,45 ! Plane Y, wire 45
-118,2,46 ! Plane Y, wire 46
-119,2,47 ! Plane Y, wire 47
-120,2,48 ! Plane Y, wire 48
-121,2,49 ! Plane Y, wire 49
-122,2,50 ! Plane Y, wire 50
-123,2,51 ! Plane Y, wire 51
-124,2,52 ! Plane Y, wire 52
+  64,   2,   1  ! Plane Y, wire 1
+  65,   2,   2  ! Plane Y, wire 2
+  66,   2,   3  ! Plane Y, wire 3
+  67,   2,   4  ! Plane Y, wire 4
+  68,   2,   5  ! Plane Y, wire 5
+  69,   2,   6  ! Plane Y, wire 6
+  70,   2,   7  ! Plane Y, wire 7
+  71,   2,   8  ! Plane Y, wire 8
+  72,   2,   9  ! Plane Y, wire 9
+  73,   2,  10  ! Plane Y, wire 10
+  74,   2,  11  ! Plane Y, wire 11
+  75,   2,  12  ! Plane Y, wire 12
+  76,   2,  13  ! Plane Y, wire 13
+  80,   2,  14  ! Plane Y, wire 14
+  81,   2,  15  ! Plane Y, wire 15
+  82,   2,  16  ! Plane Y, wire 16
+  83,   2,  17  ! Plane Y, wire 17
+  84,   2,  18  ! Plane Y, wire 18
+  85,   2,  19  ! Plane Y, wire 19
+  86,   2,  20  ! Plane Y, wire 20
+  87,   2,  21  ! Plane Y, wire 21
+  88,   2,  22  ! Plane Y, wire 22
+  89,   2,  23  ! Plane Y, wire 23
+  90,   2,  24  ! Plane Y, wire 24
+  91,   2,  25  ! Plane Y, wire 25
+  92,   2,  26  ! Plane Y, wire 26
+  96,   2,  27  ! Plane Y, wire 27
+  97,   2,  28  ! Plane Y, wire 28
+  98,   2,  29  ! Plane Y, wire 29
+  99,   2,  30  ! Plane Y, wire 30
+ 100,   2,  31  ! Plane Y, wire 31
+ 101,   2,  32  ! Plane Y, wire 32
+ 102,   2,  33  ! Plane Y, wire 33
+ 103,   2,  34  ! Plane Y, wire 34
+ 104,   2,  35  ! Plane Y, wire 35
+ 105,   2,  36  ! Plane Y, wire 36
+ 106,   2,  37  ! Plane Y, wire 37
+ 107,   2,  38  ! Plane Y, wire 38
+ 108,   2,  39  ! Plane Y, wire 39
+ 112,   2,  40  ! Plane Y, wire 40
+ 113,   2,  41  ! Plane Y, wire 41
+ 114,   2,  42  ! Plane Y, wire 42
+ 115,   2,  43  ! Plane Y, wire 43
+ 116,   2,  44  ! Plane Y, wire 44
+ 117,   2,  45  ! Plane Y, wire 45
+ 118,   2,  46  ! Plane Y, wire 46
+ 119,   2,  47  ! Plane Y, wire 47
+ 120,   2,  48  ! Plane Y, wire 48
+ 121,   2,  49  ! Plane Y, wire 49
+ 122,   2,  50  ! Plane Y, wire 50
+ 123,   2,  51  ! Plane Y, wire 51
+ 124,   2,  52  ! Plane Y, wire 52
+
 SLOT=10
 REFINDEX=0
-127,1000,0,2
-! channel,plane,wire
-0,5,1 ! Plane Y', wire 1
-1,5,2 ! Plane Y', wire 2
-2,5,3 ! Plane Y', wire 3
-3,5,4 ! Plane Y', wire 4
-4,5,5 ! Plane Y', wire 5
-5,5,6 ! Plane Y', wire 6
-6,5,7 ! Plane Y', wire 7
-7,5,8 ! Plane Y', wire 8
-8,5,9 ! Plane Y', wire 9
-9,5,10 ! Plane Y', wire 10
-10,5,11 ! Plane Y', wire 11
-11,5,12 ! Plane Y', wire 12
-12,5,13 ! Plane Y', wire 13
-16,5,14 ! Plane Y', wire 14
-17,5,15 ! Plane Y', wire 15
-18,5,16 ! Plane Y', wire 16
-19,5,17 ! Plane Y', wire 17
-20,5,18 ! Plane Y', wire 18
-21,5,19 ! Plane Y', wire 19
-22,5,20 ! Plane Y', wire 20
-23,5,21 ! Plane Y', wire 21
-24,5,22 ! Plane Y', wire 22
-25,5,23 ! Plane Y', wire 23
-26,5,24 ! Plane Y', wire 24
-27,5,25 ! Plane Y', wire 25
-28,5,26 ! Plane Y', wire 26
-32,5,27 ! Plane Y', wire 27
-33,5,28 ! Plane Y', wire 28
-34,5,29 ! Plane Y', wire 29
-35,5,30 ! Plane Y', wire 30
-36,5,31 ! Plane Y', wire 31
-37,5,32 ! Plane Y', wire 32
-38,5,33 ! Plane Y', wire 33
-39,5,34 ! Plane Y', wire 34
-40,5,35 ! Plane Y', wire 35
-41,5,36 ! Plane Y', wire 36
-42,5,37 ! Plane Y', wire 37
-43,5,38 ! Plane Y', wire 38
-44,5,39 ! Plane Y', wire 39
-48,5,40 ! Plane Y', wire 40
-49,5,41 ! Plane Y', wire 41
-50,5,42 ! Plane Y', wire 42
-51,5,43 ! Plane Y', wire 43
-52,5,44 ! Plane Y', wire 44
-53,5,45 ! Plane Y', wire 45
-54,5,46 ! Plane Y', wire 46
-55,5,47 ! Plane Y', wire 47
-56,5,48 ! Plane Y', wire 48
-57,5,49 ! Plane Y', wire 49
-58,5,50 ! Plane Y', wire 50
-59,5,51 ! Plane Y', wire 51
-60,5,52 ! Plane Y', wire 52
+ 127,1000,   0,   2
+   0,   5,   1  ! Plane Y', wire 1
+   1,   5,   2  ! Plane Y', wire 2
+   2,   5,   3  ! Plane Y', wire 3
+   3,   5,   4  ! Plane Y', wire 4
+   4,   5,   5  ! Plane Y', wire 5
+   5,   5,   6  ! Plane Y', wire 6
+   6,   5,   7  ! Plane Y', wire 7
+   7,   5,   8  ! Plane Y', wire 8
+   8,   5,   9  ! Plane Y', wire 9
+   9,   5,  10  ! Plane Y', wire 10
+  10,   5,  11  ! Plane Y', wire 11
+  11,   5,  12  ! Plane Y', wire 12
+  12,   5,  13  ! Plane Y', wire 13
+  16,   5,  14  ! Plane Y', wire 14
+  17,   5,  15  ! Plane Y', wire 15
+  18,   5,  16  ! Plane Y', wire 16
+  19,   5,  17  ! Plane Y', wire 17
+  20,   5,  18  ! Plane Y', wire 18
+  21,   5,  19  ! Plane Y', wire 19
+  22,   5,  20  ! Plane Y', wire 20
+  23,   5,  21  ! Plane Y', wire 21
+  24,   5,  22  ! Plane Y', wire 22
+  25,   5,  23  ! Plane Y', wire 23
+  26,   5,  24  ! Plane Y', wire 24
+  27,   5,  25  ! Plane Y', wire 25
+  28,   5,  26  ! Plane Y', wire 26
+  32,   5,  27  ! Plane Y', wire 27
+  33,   5,  28  ! Plane Y', wire 28
+  34,   5,  29  ! Plane Y', wire 29
+  35,   5,  30  ! Plane Y', wire 30
+  36,   5,  31  ! Plane Y', wire 31
+  37,   5,  32  ! Plane Y', wire 32
+  38,   5,  33  ! Plane Y', wire 33
+  39,   5,  34  ! Plane Y', wire 34
+  40,   5,  35  ! Plane Y', wire 35
+  41,   5,  36  ! Plane Y', wire 36
+  42,   5,  37  ! Plane Y', wire 37
+  43,   5,  38  ! Plane Y', wire 38
+  44,   5,  39  ! Plane Y', wire 39
+  48,   5,  40  ! Plane Y', wire 40
+  49,   5,  41  ! Plane Y', wire 41
+  50,   5,  42  ! Plane Y', wire 42
+  51,   5,  43  ! Plane Y', wire 43
+  52,   5,  44  ! Plane Y', wire 44
+  53,   5,  45  ! Plane Y', wire 45
+  54,   5,  46  ! Plane Y', wire 46
+  55,   5,  47  ! Plane Y', wire 47
+  56,   5,  48  ! Plane Y', wire 48
+  57,   5,  49  ! Plane Y', wire 49
+  58,   5,  50  ! Plane Y', wire 50
+  59,   5,  51  ! Plane Y', wire 51
+  60,   5,  52  ! Plane Y', wire 52
 
-! Caen 1190 VME Modules >> DC2
 SLOT=16
 REFINDEX=0
-! channel,plane,wire
-96,9,1 ! Plane U, wire 1
-97,9,2 ! Plane U, wire 2
-98,9,3 ! Plane U, wire 3
-99,9,4 ! Plane U, wire 4
-100,9,5 ! Plane U, wire 5
-101,9,6 ! Plane U, wire 6
-102,9,7 ! Plane U, wire 7
-103,9,8 ! Plane U, wire 8
-104,9,9 ! Plane U, wire 9
-105,9,10 ! Plane U, wire 10
-106,9,11 ! Plane U, wire 11
-107,9,12 ! Plane U, wire 12
-108,9,13 ! Plane U, wire 13
-109,9,14 ! Plane U, wire 14
-110,7,113 ! Plane X, wire 113
-112,9,15 ! Plane U, wire 15
-113,9,16 ! Plane U, wire 16
-114,9,17 ! Plane U, wire 17
-115,9,18 ! Plane U, wire 18
-116,9,19 ! Plane U, wire 19
-117,9,20 ! Plane U, wire 20
-118,9,21 ! Plane U, wire 21
-119,9,22 ! Plane U, wire 22
-120,9,23 ! Plane U, wire 23
-121,9,24 ! Plane U, wire 24
-122,9,25 ! Plane U, wire 25
-123,9,26 ! Plane U, wire 26
-124,9,27 ! Plane U, wire 27
-125,9,28 ! Plane U, wire 28
-126,9,29 ! Plane U, wire 29
+  96,   9,   1  ! Plane U, wire 1
+  97,   9,   2  ! Plane U, wire 2
+  98,   9,   3  ! Plane U, wire 3
+  99,   9,   4  ! Plane U, wire 4
+ 100,   9,   5  ! Plane U, wire 5
+ 101,   9,   6  ! Plane U, wire 6
+ 102,   9,   7  ! Plane U, wire 7
+ 103,   9,   8  ! Plane U, wire 8
+ 104,   9,   9  ! Plane U, wire 9
+ 105,   9,  10  ! Plane U, wire 10
+ 106,   9,  11  ! Plane U, wire 11
+ 107,   9,  12  ! Plane U, wire 12
+ 108,   9,  13  ! Plane U, wire 13
+ 109,   9,  14  ! Plane U, wire 14
+ 110,   7, 113  ! Plane X, wire 113
+ 112,   9,  15  ! Plane U, wire 15
+ 113,   9,  16  ! Plane U, wire 16
+ 114,   9,  17  ! Plane U, wire 17
+ 115,   9,  18  ! Plane U, wire 18
+ 116,   9,  19  ! Plane U, wire 19
+ 117,   9,  20  ! Plane U, wire 20
+ 118,   9,  21  ! Plane U, wire 21
+ 119,   9,  22  ! Plane U, wire 22
+ 120,   9,  23  ! Plane U, wire 23
+ 121,   9,  24  ! Plane U, wire 24
+ 122,   9,  25  ! Plane U, wire 25
+ 123,   9,  26  ! Plane U, wire 26
+ 124,   9,  27  ! Plane U, wire 27
+ 125,   9,  28  ! Plane U, wire 28
+ 126,   9,  29  ! Plane U, wire 29
+
 SLOT=14
 REFINDEX=0
-! channel,plane,wire
-0,9,30 ! Plane U, wire 30
-1,9,31 ! Plane U, wire 31
-2,9,32 ! Plane U, wire 32
-3,9,33 ! Plane U, wire 33
-4,9,34 ! Plane U, wire 34
-5,9,35 ! Plane U, wire 35
-6,9,36 ! Plane U, wire 36
-7,9,37 ! Plane U, wire 37
-8,9,38 ! Plane U, wire 38
-9,9,39 ! Plane U, wire 39
-10,9,40 ! Plane U, wire 40
-11,9,41 ! Plane U, wire 41
-12,9,42 ! Plane U, wire 42
-13,9,43 ! Plane U, wire 43
-14,9,44 ! Plane U, wire 44
-15,9,45 ! Plane U, wire 45
-32,9,46 ! Plane U, wire 46
-33,9,47 ! Plane U, wire 47
-34,9,48 ! Plane U, wire 48
-35,9,49 ! Plane U, wire 49
-36,9,50 ! Plane U, wire 50
-37,9,51 ! Plane U, wire 51
-38,9,52 ! Plane U, wire 52
-39,9,53 ! Plane U, wire 53
-40,9,54 ! Plane U, wire 54
-41,9,55 ! Plane U, wire 55
-42,9,56 ! Plane U, wire 56
-43,9,57 ! Plane U, wire 57
-44,9,58 ! Plane U, wire 58
-45,9,59 ! Plane U, wire 59
-46,9,60 ! Plane U, wire 60
-48,9,61 ! Plane U, wire 61
-49,9,62 ! Plane U, wire 62
-50,9,63 ! Plane U, wire 63
-51,9,64 ! Plane U, wire 64
-52,9,65 ! Plane U, wire 65
-53,9,66 ! Plane U, wire 66
-54,9,67 ! Plane U, wire 67
-55,9,68 ! Plane U, wire 68
-56,9,69 ! Plane U, wire 69
-57,9,70 ! Plane U, wire 70
-58,9,71 ! Plane U, wire 71
-59,9,72 ! Plane U, wire 72
-60,9,73 ! Plane U, wire 73
-61,9,74 ! Plane U, wire 74
-62,9,75 ! Plane U, wire 75
-63,9,76 ! Plane U, wire 76
-64,9,77 ! Plane U, wire 77
-65,9,78 ! Plane U, wire 78
-66,9,79 ! Plane U, wire 79
-67,9,80 ! Plane U, wire 80
-68,9,81 ! Plane U, wire 81
-69,9,82 ! Plane U, wire 82
-70,9,83 ! Plane U, wire 83
-71,9,84 ! Plane U, wire 84
-72,9,85 ! Plane U, wire 85
-73,9,86 ! Plane U, wire 86
-74,9,87 ! Plane U, wire 87
-75,9,88 ! Plane U, wire 88
-76,9,89 ! Plane U, wire 89
-77,9,90 ! Plane U, wire 90
-78,9,91 ! Plane U, wire 91
-80,9,92 ! Plane U, wire 92
-81,9,93 ! Plane U, wire 93
-82,9,94 ! Plane U, wire 94
-83,9,95 ! Plane U, wire 95
-84,9,96 ! Plane U, wire 96
-85,9,97 ! Plane U, wire 97
-86,9,98 ! Plane U, wire 98
-87,9,99 ! Plane U, wire 99
-88,9,100 ! Plane U, wire 100
-89,9,101 ! Plane U, wire 101
-90,9,102 ! Plane U, wire 102
-91,9,103 ! Plane U, wire 103
-92,9,104 ! Plane U, wire 104
-93,9,105 ! Plane U, wire 105
-94,9,106 ! Plane U, wire 106
-95,9,107 ! Plane U, wire 107
+   0,   9,  30  ! Plane U, wire 30
+   1,   9,  31  ! Plane U, wire 31
+   2,   9,  32  ! Plane U, wire 32
+   3,   9,  33  ! Plane U, wire 33
+   4,   9,  34  ! Plane U, wire 34
+   5,   9,  35  ! Plane U, wire 35
+   6,   9,  36  ! Plane U, wire 36
+   7,   9,  37  ! Plane U, wire 37
+   8,   9,  38  ! Plane U, wire 38
+   9,   9,  39  ! Plane U, wire 39
+  10,   9,  40  ! Plane U, wire 40
+  11,   9,  41  ! Plane U, wire 41
+  12,   9,  42  ! Plane U, wire 42
+  13,   9,  43  ! Plane U, wire 43
+  14,   9,  44  ! Plane U, wire 44
+  15,   9,  45  ! Plane U, wire 45
+  32,   9,  46  ! Plane U, wire 46
+  33,   9,  47  ! Plane U, wire 47
+  34,   9,  48  ! Plane U, wire 48
+  35,   9,  49  ! Plane U, wire 49
+  36,   9,  50  ! Plane U, wire 50
+  37,   9,  51  ! Plane U, wire 51
+  38,   9,  52  ! Plane U, wire 52
+  39,   9,  53  ! Plane U, wire 53
+  40,   9,  54  ! Plane U, wire 54
+  41,   9,  55  ! Plane U, wire 55
+  42,   9,  56  ! Plane U, wire 56
+  43,   9,  57  ! Plane U, wire 57
+  44,   9,  58  ! Plane U, wire 58
+  45,   9,  59  ! Plane U, wire 59
+  46,   9,  60  ! Plane U, wire 60
+  48,   9,  61  ! Plane U, wire 61
+  49,   9,  62  ! Plane U, wire 62
+  50,   9,  63  ! Plane U, wire 63
+  51,   9,  64  ! Plane U, wire 64
+  52,   9,  65  ! Plane U, wire 65
+  53,   9,  66  ! Plane U, wire 66
+  54,   9,  67  ! Plane U, wire 67
+  55,   9,  68  ! Plane U, wire 68
+  56,   9,  69  ! Plane U, wire 69
+  57,   9,  70  ! Plane U, wire 70
+  58,   9,  71  ! Plane U, wire 71
+  59,   9,  72  ! Plane U, wire 72
+  60,   9,  73  ! Plane U, wire 73
+  61,   9,  74  ! Plane U, wire 74
+  62,   9,  75  ! Plane U, wire 75
+  63,   9,  76  ! Plane U, wire 76
+  64,   9,  77  ! Plane U, wire 77
+  65,   9,  78  ! Plane U, wire 78
+  66,   9,  79  ! Plane U, wire 79
+  67,   9,  80  ! Plane U, wire 80
+  68,   9,  81  ! Plane U, wire 81
+  69,   9,  82  ! Plane U, wire 82
+  70,   9,  83  ! Plane U, wire 83
+  71,   9,  84  ! Plane U, wire 84
+  72,   9,  85  ! Plane U, wire 85
+  73,   9,  86  ! Plane U, wire 86
+  74,   9,  87  ! Plane U, wire 87
+  75,   9,  88  ! Plane U, wire 88
+  76,   9,  89  ! Plane U, wire 89
+  77,   9,  90  ! Plane U, wire 90
+  78,   9,  91  ! Plane U, wire 91
+  80,   9,  92  ! Plane U, wire 92
+  81,   9,  93  ! Plane U, wire 93
+  82,   9,  94  ! Plane U, wire 94
+  83,   9,  95  ! Plane U, wire 95
+  84,   9,  96  ! Plane U, wire 96
+  85,   9,  97  ! Plane U, wire 97
+  86,   9,  98  ! Plane U, wire 98
+  87,   9,  99  ! Plane U, wire 99
+  88,   9, 100  ! Plane U, wire 100
+  89,   9, 101  ! Plane U, wire 101
+  90,   9, 102  ! Plane U, wire 102
+  91,   9, 103  ! Plane U, wire 103
+  92,   9, 104  ! Plane U, wire 104
+  93,   9, 105  ! Plane U, wire 105
+  94,   9, 106  ! Plane U, wire 106
+  95,   9, 107  ! Plane U, wire 107
+
 SLOT=16
 REFINDEX=0
-! channel,plane,wire
-80,10,1 ! Plane V, wire 1
-81,10,2 ! Plane V, wire 2
-82,10,3 ! Plane V, wire 3
-83,10,4 ! Plane V, wire 4
-84,10,5 ! Plane V, wire 5
-85,10,6 ! Plane V, wire 6
-86,10,7 ! Plane V, wire 7
-87,10,8 ! Plane V, wire 8
-88,10,9 ! Plane V, wire 9
-89,10,10 ! Plane V, wire 10
-90,10,11 ! Plane V, wire 11
-91,10,12 ! Plane V, wire 12
-92,10,13 ! Plane V, wire 13
-93,10,14 ! Plane V, wire 14
-94,12,113 ! Plane X', wire 113
+  80,  10,   1  ! Plane V, wire 1
+  81,  10,   2  ! Plane V, wire 2
+  82,  10,   3  ! Plane V, wire 3
+  83,  10,   4  ! Plane V, wire 4
+  84,  10,   5  ! Plane V, wire 5
+  85,  10,   6  ! Plane V, wire 6
+  86,  10,   7  ! Plane V, wire 7
+  87,  10,   8  ! Plane V, wire 8
+  88,  10,   9  ! Plane V, wire 9
+  89,  10,  10  ! Plane V, wire 10
+  90,  10,  11  ! Plane V, wire 11
+  91,  10,  12  ! Plane V, wire 12
+  92,  10,  13  ! Plane V, wire 13
+  93,  10,  14  ! Plane V, wire 14
+  94,  12, 113  ! Plane X', wire 113
+
 SLOT=14
 REFINDEX=0
-! channel,plane,wire
-96,10,15 ! Plane V, wire 15
-97,10,16 ! Plane V, wire 16
-98,10,17 ! Plane V, wire 17
-99,10,18 ! Plane V, wire 18
-100,10,19 ! Plane V, wire 19
-101,10,20 ! Plane V, wire 20
-102,10,21 ! Plane V, wire 21
-103,10,22 ! Plane V, wire 22
-104,10,23 ! Plane V, wire 23
-105,10,24 ! Plane V, wire 24
-106,10,25 ! Plane V, wire 25
-107,10,26 ! Plane V, wire 26
-108,10,27 ! Plane V, wire 27
-109,10,28 ! Plane V, wire 28
-110,10,29 ! Plane V, wire 29
-112,10,30 ! Plane V, wire 30
-113,10,31 ! Plane V, wire 31
-114,10,32 ! Plane V, wire 32
-115,10,33 ! Plane V, wire 33
-116,10,34 ! Plane V, wire 34
-117,10,35 ! Plane V, wire 35
-118,10,36 ! Plane V, wire 36
-119,10,37 ! Plane V, wire 37
-120,10,38 ! Plane V, wire 38
-121,10,39 ! Plane V, wire 39
-122,10,40 ! Plane V, wire 40
-123,10,41 ! Plane V, wire 41
-124,10,42 ! Plane V, wire 42
-125,10,43 ! Plane V, wire 43
-126,10,44 ! Plane V, wire 44
-127,10,45 ! Plane V, wire 45
+  96,  10,  15  ! Plane V, wire 15
+  97,  10,  16  ! Plane V, wire 16
+  98,  10,  17  ! Plane V, wire 17
+  99,  10,  18  ! Plane V, wire 18
+ 100,  10,  19  ! Plane V, wire 19
+ 101,  10,  20  ! Plane V, wire 20
+ 102,  10,  21  ! Plane V, wire 21
+ 103,  10,  22  ! Plane V, wire 22
+ 104,  10,  23  ! Plane V, wire 23
+ 105,  10,  24  ! Plane V, wire 24
+ 106,  10,  25  ! Plane V, wire 25
+ 107,  10,  26  ! Plane V, wire 26
+ 108,  10,  27  ! Plane V, wire 27
+ 109,  10,  28  ! Plane V, wire 28
+ 110,  10,  29  ! Plane V, wire 29
+ 112,  10,  30  ! Plane V, wire 30
+ 113,  10,  31  ! Plane V, wire 31
+ 114,  10,  32  ! Plane V, wire 32
+ 115,  10,  33  ! Plane V, wire 33
+ 116,  10,  34  ! Plane V, wire 34
+ 117,  10,  35  ! Plane V, wire 35
+ 118,  10,  36  ! Plane V, wire 36
+ 119,  10,  37  ! Plane V, wire 37
+ 120,  10,  38  ! Plane V, wire 38
+ 121,  10,  39  ! Plane V, wire 39
+ 122,  10,  40  ! Plane V, wire 40
+ 123,  10,  41  ! Plane V, wire 41
+ 124,  10,  42  ! Plane V, wire 42
+ 125,  10,  43  ! Plane V, wire 43
+ 126,  10,  44  ! Plane V, wire 44
+ 127,  10,  45  ! Plane V, wire 45
+
 SLOT=17
 REFINDEX=0
-127,1000,0,3
-! channel,plane,wire
-0,10,46 ! Plane V, wire 46
-1,10,47 ! Plane V, wire 47
-2,10,48 ! Plane V, wire 48
-3,10,49 ! Plane V, wire 49
-4,10,50 ! Plane V, wire 50
-5,10,51 ! Plane V, wire 51
-6,10,52 ! Plane V, wire 52
-7,10,53 ! Plane V, wire 53
-8,10,54 ! Plane V, wire 54
-9,10,55 ! Plane V, wire 55
-10,10,56 ! Plane V, wire 56
-11,10,57 ! Plane V, wire 57
-12,10,58 ! Plane V, wire 58
-13,10,59 ! Plane V, wire 59
-14,10,60 ! Plane V, wire 60
-16,10,61 ! Plane V, wire 61
-17,10,62 ! Plane V, wire 62
-18,10,63 ! Plane V, wire 63
-19,10,64 ! Plane V, wire 64
-20,10,65 ! Plane V, wire 65
-21,10,66 ! Plane V, wire 66
-22,10,67 ! Plane V, wire 67
-23,10,68 ! Plane V, wire 68
-24,10,69 ! Plane V, wire 69
-25,10,70 ! Plane V, wire 70
-26,10,71 ! Plane V, wire 71
-27,10,72 ! Plane V, wire 72
-28,10,73 ! Plane V, wire 73
-29,10,74 ! Plane V, wire 74
-30,10,75 ! Plane V, wire 75
-31,10,76 ! Plane V, wire 76
-32,10,77 ! Plane V, wire 77
-33,10,78 ! Plane V, wire 78
-34,10,79 ! Plane V, wire 79
-35,10,80 ! Plane V, wire 80
-36,10,81 ! Plane V, wire 81
-37,10,82 ! Plane V, wire 82
-38,10,83 ! Plane V, wire 83
-39,10,84 ! Plane V, wire 84
-40,10,85 ! Plane V, wire 85
-41,10,86 ! Plane V, wire 86
-42,10,87 ! Plane V, wire 87
-43,10,88 ! Plane V, wire 88
-44,10,89 ! Plane V, wire 89
-45,10,90 ! Plane V, wire 90
-46,10,91 ! Plane V, wire 91
-48,10,92 ! Plane V, wire 92
-49,10,93 ! Plane V, wire 93
-50,10,94 ! Plane V, wire 94
-51,10,95 ! Plane V, wire 95
-52,10,96 ! Plane V, wire 96
-53,10,97 ! Plane V, wire 97
-54,10,98 ! Plane V, wire 98
-55,10,99 ! Plane V, wire 99
-56,10,100 ! Plane V, wire 100
-57,10,101 ! Plane V, wire 101
-58,10,102 ! Plane V, wire 102
-59,10,103 ! Plane V, wire 103
-60,10,104 ! Plane V, wire 104
-61,10,105 ! Plane V, wire 105
-62,10,106 ! Plane V, wire 106
-63,10,107 ! Plane V, wire 107
+ 127,1000,   0,   3
+   0,  10,  46  ! Plane V, wire 46
+   1,  10,  47  ! Plane V, wire 47
+   2,  10,  48  ! Plane V, wire 48
+   3,  10,  49  ! Plane V, wire 49
+   4,  10,  50  ! Plane V, wire 50
+   5,  10,  51  ! Plane V, wire 51
+   6,  10,  52  ! Plane V, wire 52
+   7,  10,  53  ! Plane V, wire 53
+   8,  10,  54  ! Plane V, wire 54
+   9,  10,  55  ! Plane V, wire 55
+  10,  10,  56  ! Plane V, wire 56
+  11,  10,  57  ! Plane V, wire 57
+  12,  10,  58  ! Plane V, wire 58
+  13,  10,  59  ! Plane V, wire 59
+  14,  10,  60  ! Plane V, wire 60
+  16,  10,  61  ! Plane V, wire 61
+  17,  10,  62  ! Plane V, wire 62
+  18,  10,  63  ! Plane V, wire 63
+  19,  10,  64  ! Plane V, wire 64
+  20,  10,  65  ! Plane V, wire 65
+  21,  10,  66  ! Plane V, wire 66
+  22,  10,  67  ! Plane V, wire 67
+  23,  10,  68  ! Plane V, wire 68
+  24,  10,  69  ! Plane V, wire 69
+  25,  10,  70  ! Plane V, wire 70
+  26,  10,  71  ! Plane V, wire 71
+  27,  10,  72  ! Plane V, wire 72
+  28,  10,  73  ! Plane V, wire 73
+  29,  10,  74  ! Plane V, wire 74
+  30,  10,  75  ! Plane V, wire 75
+  31,  10,  76  ! Plane V, wire 76
+  32,  10,  77  ! Plane V, wire 77
+  33,  10,  78  ! Plane V, wire 78
+  34,  10,  79  ! Plane V, wire 79
+  35,  10,  80  ! Plane V, wire 80
+  36,  10,  81  ! Plane V, wire 81
+  37,  10,  82  ! Plane V, wire 82
+  38,  10,  83  ! Plane V, wire 83
+  39,  10,  84  ! Plane V, wire 84
+  40,  10,  85  ! Plane V, wire 85
+  41,  10,  86  ! Plane V, wire 86
+  42,  10,  87  ! Plane V, wire 87
+  43,  10,  88  ! Plane V, wire 88
+  44,  10,  89  ! Plane V, wire 89
+  45,  10,  90  ! Plane V, wire 90
+  46,  10,  91  ! Plane V, wire 91
+  48,  10,  92  ! Plane V, wire 92
+  49,  10,  93  ! Plane V, wire 93
+  50,  10,  94  ! Plane V, wire 94
+  51,  10,  95  ! Plane V, wire 95
+  52,  10,  96  ! Plane V, wire 96
+  53,  10,  97  ! Plane V, wire 97
+  54,  10,  98  ! Plane V, wire 98
+  55,  10,  99  ! Plane V, wire 99
+  56,  10, 100  ! Plane V, wire 100
+  57,  10, 101  ! Plane V, wire 101
+  58,  10, 102  ! Plane V, wire 102
+  59,  10, 103  ! Plane V, wire 103
+  60,  10, 104  ! Plane V, wire 104
+  61,  10, 105  ! Plane V, wire 105
+  62,  10, 106  ! Plane V, wire 106
+  63,  10, 107  ! Plane V, wire 107
+
 SLOT=13
 REFINDEX=0
-! channel,plane,wire
-0,7,1 ! Plane X, wire 1
-1,7,2 ! Plane X, wire 2
-2,7,3 ! Plane X, wire 3
-3,7,4 ! Plane X, wire 4
-4,7,5 ! Plane X, wire 5
-5,7,6 ! Plane X, wire 6
-6,7,7 ! Plane X, wire 7
-7,7,8 ! Plane X, wire 8
-8,7,9 ! Plane X, wire 9
-9,7,10 ! Plane X, wire 10
-10,7,11 ! Plane X, wire 11
-11,7,12 ! Plane X, wire 12
-12,7,13 ! Plane X, wire 13
-13,7,14 ! Plane X, wire 14
-14,7,15 ! Plane X, wire 15
-15,7,16 ! Plane X, wire 16
-16,7,17 ! Plane X, wire 17
-17,7,18 ! Plane X, wire 18
-18,7,19 ! Plane X, wire 19
-19,7,20 ! Plane X, wire 20
-20,7,21 ! Plane X, wire 21
-21,7,22 ! Plane X, wire 22
-22,7,23 ! Plane X, wire 23
-23,7,24 ! Plane X, wire 24
-24,7,25 ! Plane X, wire 25
-25,7,26 ! Plane X, wire 26
-26,7,27 ! Plane X, wire 27
-27,7,28 ! Plane X, wire 28
-28,7,29 ! Plane X, wire 29
-29,7,30 ! Plane X, wire 30
-30,7,31 ! Plane X, wire 31
-31,7,32 ! Plane X, wire 32
-32,7,33 ! Plane X, wire 33
-33,7,34 ! Plane X, wire 34
-34,7,35 ! Plane X, wire 35
-35,7,36 ! Plane X, wire 36
-36,7,37 ! Plane X, wire 37
-37,7,38 ! Plane X, wire 38
-38,7,39 ! Plane X, wire 39
-39,7,40 ! Plane X, wire 40
-40,7,41 ! Plane X, wire 41
-41,7,42 ! Plane X, wire 42
-42,7,43 ! Plane X, wire 43
-43,7,44 ! Plane X, wire 44
-44,7,45 ! Plane X, wire 45
-45,7,46 ! Plane X, wire 46
-46,7,47 ! Plane X, wire 47
-47,7,48 ! Plane X, wire 48
-48,7,49 ! Plane X, wire 49
-49,7,50 ! Plane X, wire 50
-50,7,51 ! Plane X, wire 51
-51,7,52 ! Plane X, wire 52
-52,7,53 ! Plane X, wire 53
-53,7,54 ! Plane X, wire 54
-54,7,55 ! Plane X, wire 55
-55,7,56 ! Plane X, wire 56
-56,7,57 ! Plane X, wire 57
-57,7,58 ! Plane X, wire 58
-58,7,59 ! Plane X, wire 59
-59,7,60 ! Plane X, wire 60
-60,7,61 ! Plane X, wire 61
-61,7,62 ! Plane X, wire 62
-62,7,63 ! Plane X, wire 63
-63,7,64 ! Plane X, wire 64
-64,7,65 ! Plane X, wire 65
-65,7,66 ! Plane X, wire 66
-66,7,67 ! Plane X, wire 67
-67,7,68 ! Plane X, wire 68
-68,7,69 ! Plane X, wire 69
-69,7,70 ! Plane X, wire 70
-70,7,71 ! Plane X, wire 71
-71,7,72 ! Plane X, wire 72
-72,7,73 ! Plane X, wire 73
-73,7,74 ! Plane X, wire 74
-74,7,75 ! Plane X, wire 75
-75,7,76 ! Plane X, wire 76
-76,7,77 ! Plane X, wire 77
-77,7,78 ! Plane X, wire 78
-78,7,79 ! Plane X, wire 79
-79,7,80 ! Plane X, wire 80
-80,7,81 ! Plane X, wire 81
-81,7,82 ! Plane X, wire 82
-82,7,83 ! Plane X, wire 83
-83,7,84 ! Plane X, wire 84
-84,7,85 ! Plane X, wire 85
-85,7,86 ! Plane X, wire 86
-86,7,87 ! Plane X, wire 87
-87,7,88 ! Plane X, wire 88
-88,7,89 ! Plane X, wire 89
-89,7,90 ! Plane X, wire 90
-90,7,91 ! Plane X, wire 91
-91,7,92 ! Plane X, wire 92
-92,7,93 ! Plane X, wire 93
-93,7,94 ! Plane X, wire 94
-94,7,95 ! Plane X, wire 95
-95,7,96 ! Plane X, wire 96
-96,7,97 ! Plane X, wire 97
-97,7,98 ! Plane X, wire 98
-98,7,99 ! Plane X, wire 99
-99,7,100 ! Plane X, wire 100
-100,7,101 ! Plane X, wire 101
-101,7,102 ! Plane X, wire 102
-102,7,103 ! Plane X, wire 103
-103,7,104 ! Plane X, wire 104
-104,7,105 ! Plane X, wire 105
-105,7,106 ! Plane X, wire 106
-106,7,107 ! Plane X, wire 107
-107,7,108 ! Plane X, wire 108
-108,7,109 ! Plane X, wire 109
-109,7,110 ! Plane X, wire 110
-110,7,111 ! Plane X, wire 111
-111,7,112 ! Plane X, wire 112
-112,12,1 ! Plane X', wire 1
-113,12,2 ! Plane X', wire 2
-114,12,3 ! Plane X', wire 3
-115,12,4 ! Plane X', wire 4
-116,12,5 ! Plane X', wire 5
-117,12,6 ! Plane X', wire 6
-118,12,7 ! Plane X', wire 7
-119,12,8 ! Plane X', wire 8
-120,12,9 ! Plane X', wire 9
-121,12,10 ! Plane X', wire 10
-122,12,11 ! Plane X', wire 11
-123,12,12 ! Plane X', wire 12
-124,12,13 ! Plane X', wire 13
-125,12,14 ! Plane X', wire 14
-126,12,15 ! Plane X', wire 15
-127,12,16 ! Plane X', wire 16
+   0,   7,   1  ! Plane X, wire 1
+   1,   7,   2  ! Plane X, wire 2
+   2,   7,   3  ! Plane X, wire 3
+   3,   7,   4  ! Plane X, wire 4
+   4,   7,   5  ! Plane X, wire 5
+   5,   7,   6  ! Plane X, wire 6
+   6,   7,   7  ! Plane X, wire 7
+   7,   7,   8  ! Plane X, wire 8
+   8,   7,   9  ! Plane X, wire 9
+   9,   7,  10  ! Plane X, wire 10
+  10,   7,  11  ! Plane X, wire 11
+  11,   7,  12  ! Plane X, wire 12
+  12,   7,  13  ! Plane X, wire 13
+  13,   7,  14  ! Plane X, wire 14
+  14,   7,  15  ! Plane X, wire 15
+  15,   7,  16  ! Plane X, wire 16
+  16,   7,  17  ! Plane X, wire 17
+  17,   7,  18  ! Plane X, wire 18
+  18,   7,  19  ! Plane X, wire 19
+  19,   7,  20  ! Plane X, wire 20
+  20,   7,  21  ! Plane X, wire 21
+  21,   7,  22  ! Plane X, wire 22
+  22,   7,  23  ! Plane X, wire 23
+  23,   7,  24  ! Plane X, wire 24
+  24,   7,  25  ! Plane X, wire 25
+  25,   7,  26  ! Plane X, wire 26
+  26,   7,  27  ! Plane X, wire 27
+  27,   7,  28  ! Plane X, wire 28
+  28,   7,  29  ! Plane X, wire 29
+  29,   7,  30  ! Plane X, wire 30
+  30,   7,  31  ! Plane X, wire 31
+  31,   7,  32  ! Plane X, wire 32
+  32,   7,  33  ! Plane X, wire 33
+  33,   7,  34  ! Plane X, wire 34
+  34,   7,  35  ! Plane X, wire 35
+  35,   7,  36  ! Plane X, wire 36
+  36,   7,  37  ! Plane X, wire 37
+  37,   7,  38  ! Plane X, wire 38
+  38,   7,  39  ! Plane X, wire 39
+  39,   7,  40  ! Plane X, wire 40
+  40,   7,  41  ! Plane X, wire 41
+  41,   7,  42  ! Plane X, wire 42
+  42,   7,  43  ! Plane X, wire 43
+  43,   7,  44  ! Plane X, wire 44
+  44,   7,  45  ! Plane X, wire 45
+  45,   7,  46  ! Plane X, wire 46
+  46,   7,  47  ! Plane X, wire 47
+  47,   7,  48  ! Plane X, wire 48
+  48,   7,  49  ! Plane X, wire 49
+  49,   7,  50  ! Plane X, wire 50
+  50,   7,  51  ! Plane X, wire 51
+  51,   7,  52  ! Plane X, wire 52
+  52,   7,  53  ! Plane X, wire 53
+  53,   7,  54  ! Plane X, wire 54
+  54,   7,  55  ! Plane X, wire 55
+  55,   7,  56  ! Plane X, wire 56
+  56,   7,  57  ! Plane X, wire 57
+  57,   7,  58  ! Plane X, wire 58
+  58,   7,  59  ! Plane X, wire 59
+  59,   7,  60  ! Plane X, wire 60
+  60,   7,  61  ! Plane X, wire 61
+  61,   7,  62  ! Plane X, wire 62
+  62,   7,  63  ! Plane X, wire 63
+  63,   7,  64  ! Plane X, wire 64
+  64,   7,  65  ! Plane X, wire 65
+  65,   7,  66  ! Plane X, wire 66
+  66,   7,  67  ! Plane X, wire 67
+  67,   7,  68  ! Plane X, wire 68
+  68,   7,  69  ! Plane X, wire 69
+  69,   7,  70  ! Plane X, wire 70
+  70,   7,  71  ! Plane X, wire 71
+  71,   7,  72  ! Plane X, wire 72
+  72,   7,  73  ! Plane X, wire 73
+  73,   7,  74  ! Plane X, wire 74
+  74,   7,  75  ! Plane X, wire 75
+  75,   7,  76  ! Plane X, wire 76
+  76,   7,  77  ! Plane X, wire 77
+  77,   7,  78  ! Plane X, wire 78
+  78,   7,  79  ! Plane X, wire 79
+  79,   7,  80  ! Plane X, wire 80
+  80,   7,  81  ! Plane X, wire 81
+  81,   7,  82  ! Plane X, wire 82
+  82,   7,  83  ! Plane X, wire 83
+  83,   7,  84  ! Plane X, wire 84
+  84,   7,  85  ! Plane X, wire 85
+  85,   7,  86  ! Plane X, wire 86
+  86,   7,  87  ! Plane X, wire 87
+  87,   7,  88  ! Plane X, wire 88
+  88,   7,  89  ! Plane X, wire 89
+  89,   7,  90  ! Plane X, wire 90
+  90,   7,  91  ! Plane X, wire 91
+  91,   7,  92  ! Plane X, wire 92
+  92,   7,  93  ! Plane X, wire 93
+  93,   7,  94  ! Plane X, wire 94
+  94,   7,  95  ! Plane X, wire 95
+  95,   7,  96  ! Plane X, wire 96
+  96,   7,  97  ! Plane X, wire 97
+  97,   7,  98  ! Plane X, wire 98
+  98,   7,  99  ! Plane X, wire 99
+  99,   7, 100  ! Plane X, wire 100
+ 100,   7, 101  ! Plane X, wire 101
+ 101,   7, 102  ! Plane X, wire 102
+ 102,   7, 103  ! Plane X, wire 103
+ 103,   7, 104  ! Plane X, wire 104
+ 104,   7, 105  ! Plane X, wire 105
+ 105,   7, 106  ! Plane X, wire 106
+ 106,   7, 107  ! Plane X, wire 107
+ 107,   7, 108  ! Plane X, wire 108
+ 108,   7, 109  ! Plane X, wire 109
+ 109,   7, 110  ! Plane X, wire 110
+ 110,   7, 111  ! Plane X, wire 111
+ 111,   7, 112  ! Plane X, wire 112
+ 112,  12,   1  ! Plane X', wire 1
+ 113,  12,   2  ! Plane X', wire 2
+ 114,  12,   3  ! Plane X', wire 3
+ 115,  12,   4  ! Plane X', wire 4
+ 116,  12,   5  ! Plane X', wire 5
+ 117,  12,   6  ! Plane X', wire 6
+ 118,  12,   7  ! Plane X', wire 7
+ 119,  12,   8  ! Plane X', wire 8
+ 120,  12,   9  ! Plane X', wire 9
+ 121,  12,  10  ! Plane X', wire 10
+ 122,  12,  11  ! Plane X', wire 11
+ 123,  12,  12  ! Plane X', wire 12
+ 124,  12,  13  ! Plane X', wire 13
+ 125,  12,  14  ! Plane X', wire 14
+ 126,  12,  15  ! Plane X', wire 15
+ 127,  12,  16  ! Plane X', wire 16
+
 SLOT=14
 REFINDEX=0
-! channel,plane,wire
-16,12,17 ! Plane X', wire 17
-17,12,18 ! Plane X', wire 18
-18,12,19 ! Plane X', wire 19
-19,12,20 ! Plane X', wire 20
-20,12,21 ! Plane X', wire 21
-21,12,22 ! Plane X', wire 22
-22,12,23 ! Plane X', wire 23
-23,12,24 ! Plane X', wire 24
-24,12,25 ! Plane X', wire 25
-25,12,26 ! Plane X', wire 26
-26,12,27 ! Plane X', wire 27
-27,12,28 ! Plane X', wire 28
-28,12,29 ! Plane X', wire 29
-29,12,30 ! Plane X', wire 30
-30,12,31 ! Plane X', wire 31
-31,12,32 ! Plane X', wire 32
+  16,  12,  17  ! Plane X', wire 17
+  17,  12,  18  ! Plane X', wire 18
+  18,  12,  19  ! Plane X', wire 19
+  19,  12,  20  ! Plane X', wire 20
+  20,  12,  21  ! Plane X', wire 21
+  21,  12,  22  ! Plane X', wire 22
+  22,  12,  23  ! Plane X', wire 23
+  23,  12,  24  ! Plane X', wire 24
+  24,  12,  25  ! Plane X', wire 25
+  25,  12,  26  ! Plane X', wire 26
+  26,  12,  27  ! Plane X', wire 27
+  27,  12,  28  ! Plane X', wire 28
+  28,  12,  29  ! Plane X', wire 29
+  29,  12,  30  ! Plane X', wire 30
+  30,  12,  31  ! Plane X', wire 31
+  31,  12,  32  ! Plane X', wire 32
+
 SLOT=16
 REFINDEX=0
-! channel,plane,wire
-0,12,33 ! Plane X', wire 33
-1,12,34 ! Plane X', wire 34
-2,12,35 ! Plane X', wire 35
-3,12,36 ! Plane X', wire 36
-4,12,37 ! Plane X', wire 37
-5,12,38 ! Plane X', wire 38
-6,12,39 ! Plane X', wire 39
-7,12,40 ! Plane X', wire 40
-8,12,41 ! Plane X', wire 41
-9,12,42 ! Plane X', wire 42
-10,12,43 ! Plane X', wire 43
-11,12,44 ! Plane X', wire 44
-12,12,45 ! Plane X', wire 45
-13,12,46 ! Plane X', wire 46
-14,12,47 ! Plane X', wire 47
-15,12,48 ! Plane X', wire 48
-16,12,49 ! Plane X', wire 49
-17,12,50 ! Plane X', wire 50
-18,12,51 ! Plane X', wire 51
-19,12,52 ! Plane X', wire 52
-20,12,53 ! Plane X', wire 53
-21,12,54 ! Plane X', wire 54
-22,12,55 ! Plane X', wire 55
-23,12,56 ! Plane X', wire 56
-24,12,57 ! Plane X', wire 57
-25,12,58 ! Plane X', wire 58
-26,12,59 ! Plane X', wire 59
-27,12,60 ! Plane X', wire 60
-28,12,61 ! Plane X', wire 61
-29,12,62 ! Plane X', wire 62
-30,12,63 ! Plane X', wire 63
-31,12,64 ! Plane X', wire 64
-32,12,65 ! Plane X', wire 65
-33,12,66 ! Plane X', wire 66
-34,12,67 ! Plane X', wire 67
-35,12,68 ! Plane X', wire 68
-36,12,69 ! Plane X', wire 69
-37,12,70 ! Plane X', wire 70
-38,12,71 ! Plane X', wire 71
-39,12,72 ! Plane X', wire 72
-40,12,73 ! Plane X', wire 73
-41,12,74 ! Plane X', wire 74
-42,12,75 ! Plane X', wire 75
-43,12,76 ! Plane X', wire 76
-44,12,77 ! Plane X', wire 77
-45,12,78 ! Plane X', wire 78
-46,12,79 ! Plane X', wire 79
-47,12,80 ! Plane X', wire 80
-48,12,81 ! Plane X', wire 81
-49,12,82 ! Plane X', wire 82
-50,12,83 ! Plane X', wire 83
-51,12,84 ! Plane X', wire 84
-52,12,85 ! Plane X', wire 85
-53,12,86 ! Plane X', wire 86
-54,12,87 ! Plane X', wire 87
-55,12,88 ! Plane X', wire 88
-56,12,89 ! Plane X', wire 89
-57,12,90 ! Plane X', wire 90
-58,12,91 ! Plane X', wire 91
-59,12,92 ! Plane X', wire 92
-60,12,93 ! Plane X', wire 93
-61,12,94 ! Plane X', wire 94
-62,12,95 ! Plane X', wire 95
-63,12,96 ! Plane X', wire 96
-64,12,97 ! Plane X', wire 97
-65,12,98 ! Plane X', wire 98
-66,12,99 ! Plane X', wire 99
-67,12,100 ! Plane X', wire 100
-68,12,101 ! Plane X', wire 101
-69,12,102 ! Plane X', wire 102
-70,12,103 ! Plane X', wire 103
-71,12,104 ! Plane X', wire 104
-72,12,105 ! Plane X', wire 105
-73,12,106 ! Plane X', wire 106
-74,12,107 ! Plane X', wire 107
-75,12,108 ! Plane X', wire 108
-76,12,109 ! Plane X', wire 109
-77,12,110 ! Plane X', wire 110
-78,12,111 ! Plane X', wire 111
-79,12,112 ! Plane X', wire 112
+   0,  12,  33  ! Plane X', wire 33
+   1,  12,  34  ! Plane X', wire 34
+   2,  12,  35  ! Plane X', wire 35
+   3,  12,  36  ! Plane X', wire 36
+   4,  12,  37  ! Plane X', wire 37
+   5,  12,  38  ! Plane X', wire 38
+   6,  12,  39  ! Plane X', wire 39
+   7,  12,  40  ! Plane X', wire 40
+   8,  12,  41  ! Plane X', wire 41
+   9,  12,  42  ! Plane X', wire 42
+  10,  12,  43  ! Plane X', wire 43
+  11,  12,  44  ! Plane X', wire 44
+  12,  12,  45  ! Plane X', wire 45
+  13,  12,  46  ! Plane X', wire 46
+  14,  12,  47  ! Plane X', wire 47
+  15,  12,  48  ! Plane X', wire 48
+  16,  12,  49  ! Plane X', wire 49
+  17,  12,  50  ! Plane X', wire 50
+  18,  12,  51  ! Plane X', wire 51
+  19,  12,  52  ! Plane X', wire 52
+  20,  12,  53  ! Plane X', wire 53
+  21,  12,  54  ! Plane X', wire 54
+  22,  12,  55  ! Plane X', wire 55
+  23,  12,  56  ! Plane X', wire 56
+  24,  12,  57  ! Plane X', wire 57
+  25,  12,  58  ! Plane X', wire 58
+  26,  12,  59  ! Plane X', wire 59
+  27,  12,  60  ! Plane X', wire 60
+  28,  12,  61  ! Plane X', wire 61
+  29,  12,  62  ! Plane X', wire 62
+  30,  12,  63  ! Plane X', wire 63
+  31,  12,  64  ! Plane X', wire 64
+  32,  12,  65  ! Plane X', wire 65
+  33,  12,  66  ! Plane X', wire 66
+  34,  12,  67  ! Plane X', wire 67
+  35,  12,  68  ! Plane X', wire 68
+  36,  12,  69  ! Plane X', wire 69
+  37,  12,  70  ! Plane X', wire 70
+  38,  12,  71  ! Plane X', wire 71
+  39,  12,  72  ! Plane X', wire 72
+  40,  12,  73  ! Plane X', wire 73
+  41,  12,  74  ! Plane X', wire 74
+  42,  12,  75  ! Plane X', wire 75
+  43,  12,  76  ! Plane X', wire 76
+  44,  12,  77  ! Plane X', wire 77
+  45,  12,  78  ! Plane X', wire 78
+  46,  12,  79  ! Plane X', wire 79
+  47,  12,  80  ! Plane X', wire 80
+  48,  12,  81  ! Plane X', wire 81
+  49,  12,  82  ! Plane X', wire 82
+  50,  12,  83  ! Plane X', wire 83
+  51,  12,  84  ! Plane X', wire 84
+  52,  12,  85  ! Plane X', wire 85
+  53,  12,  86  ! Plane X', wire 86
+  54,  12,  87  ! Plane X', wire 87
+  55,  12,  88  ! Plane X', wire 88
+  56,  12,  89  ! Plane X', wire 89
+  57,  12,  90  ! Plane X', wire 90
+  58,  12,  91  ! Plane X', wire 91
+  59,  12,  92  ! Plane X', wire 92
+  60,  12,  93  ! Plane X', wire 93
+  61,  12,  94  ! Plane X', wire 94
+  62,  12,  95  ! Plane X', wire 95
+  63,  12,  96  ! Plane X', wire 96
+  64,  12,  97  ! Plane X', wire 97
+  65,  12,  98  ! Plane X', wire 98
+  66,  12,  99  ! Plane X', wire 99
+  67,  12, 100  ! Plane X', wire 100
+  68,  12, 101  ! Plane X', wire 101
+  69,  12, 102  ! Plane X', wire 102
+  70,  12, 103  ! Plane X', wire 103
+  71,  12, 104  ! Plane X', wire 104
+  72,  12, 105  ! Plane X', wire 105
+  73,  12, 106  ! Plane X', wire 106
+  74,  12, 107  ! Plane X', wire 107
+  75,  12, 108  ! Plane X', wire 108
+  76,  12, 109  ! Plane X', wire 109
+  77,  12, 110  ! Plane X', wire 110
+  78,  12, 111  ! Plane X', wire 111
+  79,  12, 112  ! Plane X', wire 112
+
 SLOT=17
 REFINDEX=0
-! channel,plane,wire
-64,8,1 ! Plane Y, wire 1
-65,8,2 ! Plane Y, wire 2
-66,8,3 ! Plane Y, wire 3
-67,8,4 ! Plane Y, wire 4
-68,8,5 ! Plane Y, wire 5
-69,8,6 ! Plane Y, wire 6
-70,8,7 ! Plane Y, wire 7
-71,8,8 ! Plane Y, wire 8
-72,8,9 ! Plane Y, wire 9
-73,8,10 ! Plane Y, wire 10
-74,8,11 ! Plane Y, wire 11
-75,8,12 ! Plane Y, wire 12
-76,8,13 ! Plane Y, wire 13
-80,8,14 ! Plane Y, wire 14
-81,8,15 ! Plane Y, wire 15
-82,8,16 ! Plane Y, wire 16
-83,8,17 ! Plane Y, wire 17
-84,8,18 ! Plane Y, wire 18
-85,8,19 ! Plane Y, wire 19
-86,8,20 ! Plane Y, wire 20
-87,8,21 ! Plane Y, wire 21
-88,8,22 ! Plane Y, wire 22
-89,8,23 ! Plane Y, wire 23
-90,8,24 ! Plane Y, wire 24
-91,8,25 ! Plane Y, wire 25
-92,8,26 ! Plane Y, wire 26
-96,8,27 ! Plane Y, wire 27
-97,8,28 ! Plane Y, wire 28
-98,8,29 ! Plane Y, wire 29
-99,8,30 ! Plane Y, wire 30
-100,8,31 ! Plane Y, wire 31
-101,8,32 ! Plane Y, wire 32
-102,8,33 ! Plane Y, wire 33
-103,8,34 ! Plane Y, wire 34
-104,8,35 ! Plane Y, wire 35
-105,8,36 ! Plane Y, wire 36
-106,8,37 ! Plane Y, wire 37
-107,8,38 ! Plane Y, wire 38
-108,8,39 ! Plane Y, wire 39
-112,8,40 ! Plane Y, wire 40
-113,8,41 ! Plane Y, wire 41
-114,8,42 ! Plane Y, wire 42
-115,8,43 ! Plane Y, wire 43
-116,8,44 ! Plane Y, wire 44
-117,8,45 ! Plane Y, wire 45
-118,8,46 ! Plane Y, wire 46
-119,8,47 ! Plane Y, wire 47
-120,8,48 ! Plane Y, wire 48
-121,8,49 ! Plane Y, wire 49
-122,8,50 ! Plane Y, wire 50
-123,8,51 ! Plane Y, wire 51
-124,8,52 ! Plane Y, wire 52
+  64,   8,   1  ! Plane Y, wire 1
+  65,   8,   2  ! Plane Y, wire 2
+  66,   8,   3  ! Plane Y, wire 3
+  67,   8,   4  ! Plane Y, wire 4
+  68,   8,   5  ! Plane Y, wire 5
+  69,   8,   6  ! Plane Y, wire 6
+  70,   8,   7  ! Plane Y, wire 7
+  71,   8,   8  ! Plane Y, wire 8
+  72,   8,   9  ! Plane Y, wire 9
+  73,   8,  10  ! Plane Y, wire 10
+  74,   8,  11  ! Plane Y, wire 11
+  75,   8,  12  ! Plane Y, wire 12
+  76,   8,  13  ! Plane Y, wire 13
+  80,   8,  14  ! Plane Y, wire 14
+  81,   8,  15  ! Plane Y, wire 15
+  82,   8,  16  ! Plane Y, wire 16
+  83,   8,  17  ! Plane Y, wire 17
+  84,   8,  18  ! Plane Y, wire 18
+  85,   8,  19  ! Plane Y, wire 19
+  86,   8,  20  ! Plane Y, wire 20
+  87,   8,  21  ! Plane Y, wire 21
+  88,   8,  22  ! Plane Y, wire 22
+  89,   8,  23  ! Plane Y, wire 23
+  90,   8,  24  ! Plane Y, wire 24
+  91,   8,  25  ! Plane Y, wire 25
+  92,   8,  26  ! Plane Y, wire 26
+  96,   8,  27  ! Plane Y, wire 27
+  97,   8,  28  ! Plane Y, wire 28
+  98,   8,  29  ! Plane Y, wire 29
+  99,   8,  30  ! Plane Y, wire 30
+ 100,   8,  31  ! Plane Y, wire 31
+ 101,   8,  32  ! Plane Y, wire 32
+ 102,   8,  33  ! Plane Y, wire 33
+ 103,   8,  34  ! Plane Y, wire 34
+ 104,   8,  35  ! Plane Y, wire 35
+ 105,   8,  36  ! Plane Y, wire 36
+ 106,   8,  37  ! Plane Y, wire 37
+ 107,   8,  38  ! Plane Y, wire 38
+ 108,   8,  39  ! Plane Y, wire 39
+ 112,   8,  40  ! Plane Y, wire 40
+ 113,   8,  41  ! Plane Y, wire 41
+ 114,   8,  42  ! Plane Y, wire 42
+ 115,   8,  43  ! Plane Y, wire 43
+ 116,   8,  44  ! Plane Y, wire 44
+ 117,   8,  45  ! Plane Y, wire 45
+ 118,   8,  46  ! Plane Y, wire 46
+ 119,   8,  47  ! Plane Y, wire 47
+ 120,   8,  48  ! Plane Y, wire 48
+ 121,   8,  49  ! Plane Y, wire 49
+ 122,   8,  50  ! Plane Y, wire 50
+ 123,   8,  51  ! Plane Y, wire 51
+ 124,   8,  52  ! Plane Y, wire 52
+
 SLOT=10
 REFINDEX=0
-127,1000,0,1
-! channel,plane,wire
-64,11,1 ! Plane Y', wire 1
-65,11,2 ! Plane Y', wire 2
-66,11,3 ! Plane Y', wire 3
-67,11,4 ! Plane Y', wire 4
-68,11,5 ! Plane Y', wire 5
-69,11,6 ! Plane Y', wire 6
-70,11,7 ! Plane Y', wire 7
-71,11,8 ! Plane Y', wire 8
-72,11,9 ! Plane Y', wire 9
-73,11,10 ! Plane Y', wire 10
-74,11,11 ! Plane Y', wire 11
-75,11,12 ! Plane Y', wire 12
-76,11,13 ! Plane Y', wire 13
-80,11,14 ! Plane Y', wire 14
-81,11,15 ! Plane Y', wire 15
-82,11,16 ! Plane Y', wire 16
-83,11,17 ! Plane Y', wire 17
-84,11,18 ! Plane Y', wire 18
-85,11,19 ! Plane Y', wire 19
-86,11,20 ! Plane Y', wire 20
-87,11,21 ! Plane Y', wire 21
-88,11,22 ! Plane Y', wire 22
-89,11,23 ! Plane Y', wire 23
-90,11,24 ! Plane Y', wire 24
-91,11,25 ! Plane Y', wire 25
-92,11,26 ! Plane Y', wire 26
-96,11,27 ! Plane Y', wire 27
-97,11,28 ! Plane Y', wire 28
-98,11,29 ! Plane Y', wire 29
-99,11,30 ! Plane Y', wire 30
-100,11,31 ! Plane Y', wire 31
-101,11,32 ! Plane Y', wire 32
-102,11,33 ! Plane Y', wire 33
-103,11,34 ! Plane Y', wire 34
-104,11,35 ! Plane Y', wire 35
-105,11,36 ! Plane Y', wire 36
-106,11,37 ! Plane Y', wire 37
-107,11,38 ! Plane Y', wire 38
-108,11,39 ! Plane Y', wire 39
-112,11,40 ! Plane Y', wire 40
-113,11,41 ! Plane Y', wire 41
-114,11,42 ! Plane Y', wire 42
-115,11,43 ! Plane Y', wire 43
-116,11,44 ! Plane Y', wire 44
-117,11,45 ! Plane Y', wire 45
-118,11,46 ! Plane Y', wire 46
-119,11,47 ! Plane Y', wire 47
-120,11,48 ! Plane Y', wire 48
-121,11,49 ! Plane Y', wire 49
-122,11,50 ! Plane Y', wire 50
-123,11,51 ! Plane Y', wire 51
-124,11,52 ! Plane Y', wire 52
-
-
-
-
+ 127,1000,   0,   1
+  64,  11,   1  ! Plane Y', wire 1
+  65,  11,   2  ! Plane Y', wire 2
+  66,  11,   3  ! Plane Y', wire 3
+  67,  11,   4  ! Plane Y', wire 4
+  68,  11,   5  ! Plane Y', wire 5
+  69,  11,   6  ! Plane Y', wire 6
+  70,  11,   7  ! Plane Y', wire 7
+  71,  11,   8  ! Plane Y', wire 8
+  72,  11,   9  ! Plane Y', wire 9
+  73,  11,  10  ! Plane Y', wire 10
+  74,  11,  11  ! Plane Y', wire 11
+  75,  11,  12  ! Plane Y', wire 12
+  76,  11,  13  ! Plane Y', wire 13
+  80,  11,  14  ! Plane Y', wire 14
+  81,  11,  15  ! Plane Y', wire 15
+  82,  11,  16  ! Plane Y', wire 16
+  83,  11,  17  ! Plane Y', wire 17
+  84,  11,  18  ! Plane Y', wire 18
+  85,  11,  19  ! Plane Y', wire 19
+  86,  11,  20  ! Plane Y', wire 20
+  87,  11,  21  ! Plane Y', wire 21
+  88,  11,  22  ! Plane Y', wire 22
+  89,  11,  23  ! Plane Y', wire 23
+  90,  11,  24  ! Plane Y', wire 24
+  91,  11,  25  ! Plane Y', wire 25
+  92,  11,  26  ! Plane Y', wire 26
+  96,  11,  27  ! Plane Y', wire 27
+  97,  11,  28  ! Plane Y', wire 28
+  98,  11,  29  ! Plane Y', wire 29
+  99,  11,  30  ! Plane Y', wire 30
+ 100,  11,  31  ! Plane Y', wire 31
+ 101,  11,  32  ! Plane Y', wire 32
+ 102,  11,  33  ! Plane Y', wire 33
+ 103,  11,  34  ! Plane Y', wire 34
+ 104,  11,  35  ! Plane Y', wire 35
+ 105,  11,  36  ! Plane Y', wire 36
+ 106,  11,  37  ! Plane Y', wire 37
+ 107,  11,  38  ! Plane Y', wire 38
+ 108,  11,  39  ! Plane Y', wire 39
+ 112,  11,  40  ! Plane Y', wire 40
+ 113,  11,  41  ! Plane Y', wire 41
+ 114,  11,  42  ! Plane Y', wire 42
+ 115,  11,  43  ! Plane Y', wire 43
+ 116,  11,  44  ! Plane Y', wire 44
+ 117,  11,  45  ! Plane Y', wire 45
+ 118,  11,  46  ! Plane Y', wire 46
+ 119,  11,  47  ! Plane Y', wire 47
+ 120,  11,  48  ! Plane Y', wire 48
+ 121,  11,  49  ! Plane Y', wire 49
+ 122,  11,  50  ! Plane Y', wire 50
+ 123,  11,  51  ! Plane Y', wire 51
+ 124,  11,  52  ! Plane Y', wire 52
diff --git a/MAPS/HMS/DETEC/hdc_hhodo_htrig.map b/MAPS/HMS/DETEC/hdc_hhodo_htrig.map
index b6afdeaef38165da8fb21b7ac9a80791d0a847ff..679672b4453e913b5c752aaea7a165a311b548dc 100644
--- a/MAPS/HMS/DETEC/hdc_hhodo_htrig.map
+++ b/MAPS/HMS/DETEC/hdc_hhodo_htrig.map
@@ -1,6 +1,6 @@
-! THMS_ID=10       ::  TDC
-! HDC_ID=11        ::  TDC
-! HSCIN_ID=13      ::  TDC
+! THMS_ID=10       ::  ADC,TDC
+! HDC_ID=11        ::  ADC,TDC
+! HSCIN_ID=13      ::  ADC,TDC
 
 
 DETECTOR=10
@@ -1334,6 +1334,8 @@ SLOT=16
    7,   4,  10,   1  ! h2y10A-
 
 SLOT=20
+REFINDEX=0
+ 127,1000,   0,   0
    0,   1,   1,   2  ! h1x01T+
    1,   1,   3,   2  ! h1x03T+
    2,   1,   5,   2  ! h1x05T+
diff --git a/MAPS/HMS/DETEC/hdc_htrig.map b/MAPS/HMS/DETEC/hdc_htrig.map
index ed59f7cec9ddbe87f011eb2c61b4e83e46990d13..bb39d266fb3091148de0455847060f91ee40dfb7 100644
--- a/MAPS/HMS/DETEC/hdc_htrig.map
+++ b/MAPS/HMS/DETEC/hdc_htrig.map
@@ -1,10 +1,10 @@
-! THMS_ID=10       ::  TDC
-! HDC_ID=11        ::  TDC
+! THMS_ID=10       ::  ADC,TDC
+! HDC_ID=11        ::  ADC,TDC
 
 
 DETECTOR=10
 
-ROC=1
+ROC=11
 
 SLOT=17
    8,   1,   1,   0  ! hASUM
diff --git a/MAPS/HMS/DETEC/hhodo.map b/MAPS/HMS/DETEC/hhodo.map
index 5ce388a6ddec2e0713cb08df574c4d28c38a5cbf..32e3da271a64ba265fdcf8ac7a631c21b55af12d 100644
--- a/MAPS/HMS/DETEC/hhodo.map
+++ b/MAPS/HMS/DETEC/hhodo.map
@@ -126,6 +126,8 @@ SLOT=16
 
 ! Caen 1190 module
 SLOT=20
+REFINDEX=0
+  127,1000,   0,   0
 ! A0
 ! chan   plane     bar     sig
      0,      1,      1,      2!    h1x01T+
diff --git a/MAPS/HMS/DETEC/hhodo_htrig.map b/MAPS/HMS/DETEC/hhodo_htrig.map
index 24a39e233b4094de2b941babf17cf3393a7c5e72..eb7b107c6663eb1e9d33de57eba615da31dcf346 100644
--- a/MAPS/HMS/DETEC/hhodo_htrig.map
+++ b/MAPS/HMS/DETEC/hhodo_htrig.map
@@ -175,6 +175,8 @@ SLOT=16
    7,   4,  10,   1  ! h2y10A-
 
 SLOT=20
+REFINDEX=0
+ 127,1000,   0,   0
    0,   1,   1,   2  ! h1x01T+
    1,   1,   3,   2  ! h1x03T+
    2,   1,   5,   2  ! h1x05T+
diff --git a/MAPS/SHMS/DETEC/pcal.map b/MAPS/SHMS/DETEC/pcal.map
index ca8434c0c5979ab8b64eacd51f7020c577c7d2a0..96f05754586a8acbf93af81acb2fe57ac87324f5 100644
--- a/MAPS/SHMS/DETEC/pcal.map
+++ b/MAPS/SHMS/DETEC/pcal.map
@@ -1,4 +1,4 @@
-! SCAL_ID=26       ::  ADC
+! PCAL_ID=26       ::  ADC
 
 
 DETECTOR=26
diff --git a/MAPS/SHMS/DETEC/pdc.map b/MAPS/SHMS/DETEC/pdc.map
index 6fc30a7ffb50b5ea74055714f5645b49fbd00fc0..314a42bf303def3ad09ed6dda99bf38660b3c1b0 100644
--- a/MAPS/SHMS/DETEC/pdc.map
+++ b/MAPS/SHMS/DETEC/pdc.map
@@ -1,11 +1,12 @@
-! PDC_ID=21        ::  TDC
+! PDC_ID=22        ::  TDC
 
 
-DETECTOR=21  ! SHMS chambers
+DETECTOR=22  ! SHMS chambers
 
 ROC=6
 
 SLOT=9
+REFCHAN=79
   77,   1,   1  ! Plane U, wire 1
   76,   1,   2  ! Plane U, wire 2
   75,   1,   3  ! Plane U, wire 3
@@ -22,6 +23,7 @@ SLOT=9
   64,   1,  14  ! Plane U, wire 14
 
 SLOT=7
+REFCHAN=79
   31,   1,  15  ! Plane U, wire 15
   30,   1,  16  ! Plane U, wire 16
   29,   1,  17  ! Plane U, wire 17
@@ -40,6 +42,7 @@ SLOT=7
   16,   1,  30  ! Plane U, wire 30
 
 SLOT=6
+REFCHAN=79
   95,   1,  31  ! Plane U, wire 31
   94,   1,  32  ! Plane U, wire 32
   93,   1,  33  ! Plane U, wire 33
@@ -74,6 +77,7 @@ SLOT=6
   16,   1,  62  ! Plane U, wire 62
 
 SLOT=8
+REFCHAN=79
  112,   1,  63  ! Plane U, wire 63
  113,   1,  64  ! Plane U, wire 64
  114,   1,  65  ! Plane U, wire 65
@@ -107,6 +111,7 @@ SLOT=8
   62,   1,  93  ! Plane U, wire 93
 
 SLOT=9
+REFCHAN=79
   78,   1,  94  ! Plane U, wire 94
  112,   1,  95  ! Plane U, wire 95
  113,   1,  96  ! Plane U, wire 96
@@ -122,6 +127,7 @@ SLOT=9
  123,   1, 106  ! Plane U, wire 106
 
 SLOT=8
+REFCHAN=79
   74,   2,   1  ! Plane U', wire 1
   73,   2,   2  ! Plane U', wire 2
   72,   2,   3  ! Plane U', wire 3
@@ -135,6 +141,7 @@ SLOT=8
   64,   2,  11  ! Plane U', wire 11
 
 SLOT=6
+REFCHAN=79
  127,   2,  12  ! Plane U', wire 12
  126,   2,  13  ! Plane U', wire 13
  125,   2,  14  ! Plane U', wire 14
@@ -168,9 +175,11 @@ SLOT=6
   33,   2,  42  ! Plane U', wire 42
 
 SLOT=8
+REFCHAN=79
   75,   2,  43  ! Plane U', wire 43
 
 SLOT=9
+REFCHAN=79
    0,   2,  44  ! Plane U', wire 44
    1,   2,  45  ! Plane U', wire 45
    2,   2,  46  ! Plane U', wire 46
@@ -189,6 +198,7 @@ SLOT=9
   15,   2,  59  ! Plane U', wire 59
 
 SLOT=8
+REFCHAN=79
   96,   2,  60  ! Plane U', wire 60
   97,   2,  61  ! Plane U', wire 61
   98,   2,  62  ! Plane U', wire 62
@@ -207,6 +217,7 @@ SLOT=8
  111,   2,  75  ! Plane U', wire 75
 
 SLOT=10
+REFCHAN=79
   80,   2,  76  ! Plane U', wire 76
   81,   2,  77  ! Plane U', wire 77
   82,   2,  78  ! Plane U', wire 78
@@ -240,6 +251,7 @@ SLOT=10
   30,   2, 106  ! Plane U', wire 106
 
 SLOT=9
+REFCHAN=79
   45,   5,   1  ! Plane V, wire 1
   44,   5,   2  ! Plane V, wire 2
   43,   5,   3  ! Plane V, wire 3
@@ -256,6 +268,7 @@ SLOT=9
   32,   5,  14  ! Plane V, wire 14
 
 SLOT=8
+REFCHAN=79
   31,   5,  15  ! Plane V, wire 15
   30,   5,  16  ! Plane V, wire 16
   29,   5,  17  ! Plane V, wire 17
@@ -274,6 +287,7 @@ SLOT=8
   16,   5,  30  ! Plane V, wire 30
 
 SLOT=10
+REFCHAN=79
   15,   5,  31  ! Plane V, wire 31
   14,   5,  32  ! Plane V, wire 32
   13,   5,  33  ! Plane V, wire 33
@@ -292,6 +306,7 @@ SLOT=10
    0,   5,  46  ! Plane V, wire 46
 
 SLOT=9
+REFCHAN=79
   63,   5,  47  ! Plane V, wire 47
   62,   5,  48  ! Plane V, wire 48
   61,   5,  49  ! Plane V, wire 49
@@ -310,6 +325,7 @@ SLOT=9
   48,   5,  62  ! Plane V, wire 62
 
 SLOT=7
+REFCHAN=79
   32,   5,  63  ! Plane V, wire 63
   33,   5,  64  ! Plane V, wire 64
   34,   5,  65  ! Plane V, wire 65
@@ -355,9 +371,11 @@ SLOT=7
   74,   5, 105  ! Plane V, wire 105
 
 SLOT=9
+REFCHAN=79
   46,   5, 106  ! Plane V, wire 106
 
 SLOT=10
+REFCHAN=79
   74,   6,   1  ! Plane V', wire 1
   73,   6,   2  ! Plane V', wire 2
   72,   6,   3  ! Plane V', wire 3
@@ -387,6 +405,7 @@ SLOT=10
   32,   6,  27  ! Plane V', wire 27
 
 SLOT=9
+REFCHAN=79
  111,   6,  28  ! Plane V', wire 28
  110,   6,  29  ! Plane V', wire 29
  109,   6,  30  ! Plane V', wire 30
@@ -405,6 +424,7 @@ SLOT=9
   96,   6,  43  ! Plane V', wire 43
 
 SLOT=8
+REFCHAN=79
   80,   6,  44  ! Plane V', wire 44
   81,   6,  45  ! Plane V', wire 45
   82,   6,  46  ! Plane V', wire 46
@@ -423,6 +443,7 @@ SLOT=8
   95,   6,  59  ! Plane V', wire 59
 
 SLOT=7
+REFCHAN=79
  112,   6,  60  ! Plane V', wire 60
  113,   6,  61  ! Plane V', wire 61
  114,   6,  62  ! Plane V', wire 62
@@ -457,6 +478,7 @@ SLOT=7
   95,   6,  91  ! Plane V', wire 91
 
 SLOT=6
+REFCHAN=79
   64,   6,  92  ! Plane V', wire 92
   65,   6,  93  ! Plane V', wire 93
   66,   6,  94  ! Plane V', wire 94
@@ -473,9 +495,11 @@ SLOT=6
   77,   6, 105  ! Plane V', wire 105
 
 SLOT=10
+REFCHAN=79
   75,   6, 106  ! Plane V', wire 106
 
 SLOT=8
+REFCHAN=79
   14,   3,   1  ! Plane X, wire 1
   13,   3,   2  ! Plane X, wire 2
   12,   3,   3  ! Plane X, wire 3
@@ -493,6 +517,7 @@ SLOT=8
    0,   3,  15  ! Plane X, wire 15
 
 SLOT=7
+REFCHAN=79
   63,   3,  16  ! Plane X, wire 16
   62,   3,  17  ! Plane X, wire 17
   61,   3,  18  ! Plane X, wire 18
@@ -511,6 +536,7 @@ SLOT=7
   48,   3,  31  ! Plane X, wire 31
 
 SLOT=6
+REFCHAN=79
   63,   3,  32  ! Plane X, wire 32
   62,   3,  33  ! Plane X, wire 33
   61,   3,  34  ! Plane X, wire 34
@@ -528,9 +554,11 @@ SLOT=6
   49,   3,  46  ! Plane X, wire 46
 
 SLOT=8
+REFCHAN=79
   15,   3,  47  ! Plane X, wire 47
 
 SLOT=10
+REFCHAN=79
   48,   3,  48  ! Plane X, wire 48
   49,   3,  49  ! Plane X, wire 49
   50,   3,  50  ! Plane X, wire 50
@@ -549,6 +577,7 @@ SLOT=10
   63,   3,  63  ! Plane X, wire 63
 
 SLOT=9
+REFCHAN=79
   80,   3,  64  ! Plane X, wire 64
   81,   3,  65  ! Plane X, wire 65
   82,   3,  66  ! Plane X, wire 66
@@ -580,6 +609,7 @@ SLOT=9
   16,   4,  14  ! Plane X', wire 14
 
 SLOT=8
+REFCHAN=79
   47,   4,  15  ! Plane X', wire 15
   46,   4,  16  ! Plane X', wire 16
   45,   4,  17  ! Plane X', wire 17
@@ -598,6 +628,7 @@ SLOT=8
   32,   4,  30  ! Plane X', wire 30
 
 SLOT=7
+REFCHAN=79
    0,   4,  31  ! Plane X', wire 31
    1,   4,  32  ! Plane X', wire 32
    2,   4,  33  ! Plane X', wire 33
@@ -616,6 +647,7 @@ SLOT=7
   15,   4,  46  ! Plane X', wire 46
 
 SLOT=6
+REFCHAN=79
   96,   4,  47  ! Plane X', wire 47
   97,   4,  48  ! Plane X', wire 48
   98,   4,  49  ! Plane X', wire 49
@@ -649,9 +681,11 @@ SLOT=6
   14,   4,  77  ! Plane X', wire 77
 
 SLOT=9
+REFCHAN=79
   30,   4,  78  ! Plane X', wire 78
 
 SLOT=14
+REFCHAN=15
   45,  12,   1  ! Plane U, wire 1
   44,  12,   2  ! Plane U, wire 2
   43,  12,   3  ! Plane U, wire 3
@@ -668,6 +702,7 @@ SLOT=14
   32,  12,  14  ! Plane U, wire 14
 
 SLOT=11
+REFCHAN=47
  127,  12,  15  ! Plane U, wire 15
  126,  12,  16  ! Plane U, wire 16
  125,  12,  17  ! Plane U, wire 17
@@ -702,6 +737,7 @@ SLOT=11
   48,  12,  46  ! Plane U, wire 46
 
 SLOT=10
+REFCHAN=79
  127,  12,  47  ! Plane U, wire 47
  126,  12,  48  ! Plane U, wire 48
  125,  12,  49  ! Plane U, wire 49
@@ -720,6 +756,7 @@ SLOT=10
  112,  12,  62  ! Plane U, wire 62
 
 SLOT=13
+REFCHAN=47
   80,  12,  63  ! Plane U, wire 63
   81,  12,  64  ! Plane U, wire 64
   82,  12,  65  ! Plane U, wire 65
@@ -753,6 +790,7 @@ SLOT=13
   30,  12,  93  ! Plane U, wire 93
 
 SLOT=14
+REFCHAN=15
   46,  12,  94  ! Plane U, wire 94
   80,  12,  95  ! Plane U, wire 95
   81,  12,  96  ! Plane U, wire 96
@@ -768,6 +806,7 @@ SLOT=14
   91,  12, 106  ! Plane U, wire 106
 
 SLOT=13
+REFCHAN=47
   42,  11,   1  ! Plane U', wire 1
   41,  11,   2  ! Plane U', wire 2
   40,  11,   3  ! Plane U', wire 3
@@ -781,6 +820,7 @@ SLOT=13
   32,  11,  11  ! Plane U', wire 11
 
 SLOT=11
+REFCHAN=47
   95,  11,  12  ! Plane U', wire 12
   94,  11,  13  ! Plane U', wire 13
   93,  11,  14  ! Plane U', wire 14
@@ -814,6 +854,7 @@ SLOT=11
    1,  11,  42  ! Plane U', wire 42
 
 SLOT=13
+REFCHAN=47
   43,  11,  43  ! Plane U', wire 43
   96,  11,  44  ! Plane U', wire 44
   97,  11,  45  ! Plane U', wire 45
@@ -849,6 +890,7 @@ SLOT=13
   79,  11,  75  ! Plane U', wire 75
 
 SLOT=15
+REFCHAN=47
   48,  11,  76  ! Plane U', wire 76
   49,  11,  77  ! Plane U', wire 77
   50,  11,  78  ! Plane U', wire 78
@@ -867,6 +909,7 @@ SLOT=15
   63,  11,  91  ! Plane U', wire 91
 
 SLOT=14
+REFCHAN=15
  112,  11,  92  ! Plane U', wire 92
  113,  11,  93  ! Plane U', wire 93
  114,  11,  94  ! Plane U', wire 94
@@ -898,6 +941,7 @@ SLOT=14
    0,   8,  14  ! Plane V, wire 14
 
 SLOT=12
+REFCHAN=47
  127,   8,  15  ! Plane V, wire 15
  126,   8,  16  ! Plane V, wire 16
  125,   8,  17  ! Plane V, wire 17
@@ -916,6 +960,7 @@ SLOT=12
  112,   8,  30  ! Plane V, wire 30
 
 SLOT=14
+REFCHAN=15
  111,   8,  31  ! Plane V, wire 31
  110,   8,  32  ! Plane V, wire 32
  109,   8,  33  ! Plane V, wire 33
@@ -950,6 +995,7 @@ SLOT=14
   16,   8,  62  ! Plane V, wire 62
 
 SLOT=12
+REFCHAN=47
    0,   8,  63  ! Plane V, wire 63
    1,   8,  64  ! Plane V, wire 64
    2,   8,  65  ! Plane V, wire 65
@@ -995,9 +1041,11 @@ SLOT=12
   42,   8, 105  ! Plane V, wire 105
 
 SLOT=14
+REFCHAN=15
   14,   8, 106  ! Plane V, wire 106
 
 SLOT=15
+REFCHAN=47
   42,   7,   1  ! Plane V', wire 1
   41,   7,   2  ! Plane V', wire 2
   40,   7,   3  ! Plane V', wire 3
@@ -1027,6 +1075,7 @@ SLOT=15
    0,   7,  27  ! Plane V', wire 27
 
 SLOT=14
+REFCHAN=15
   79,   7,  28  ! Plane V', wire 28
   78,   7,  29  ! Plane V', wire 29
   77,   7,  30  ! Plane V', wire 30
@@ -1045,6 +1094,7 @@ SLOT=14
   64,   7,  43  ! Plane V', wire 43
 
 SLOT=13
+REFCHAN=47
   48,   7,  44  ! Plane V', wire 44
   49,   7,  45  ! Plane V', wire 45
   50,   7,  46  ! Plane V', wire 46
@@ -1063,6 +1113,7 @@ SLOT=13
   63,   7,  59  ! Plane V', wire 59
 
 SLOT=12
+REFCHAN=47
   80,   7,  60  ! Plane V', wire 60
   81,   7,  61  ! Plane V', wire 61
   82,   7,  62  ! Plane V', wire 62
@@ -1097,6 +1148,7 @@ SLOT=12
   63,   7,  91  ! Plane V', wire 91
 
 SLOT=11
+REFCHAN=47
   32,   7,  92  ! Plane V', wire 92
   33,   7,  93  ! Plane V', wire 93
   34,   7,  94  ! Plane V', wire 94
@@ -1113,9 +1165,11 @@ SLOT=11
   45,   7, 105  ! Plane V', wire 105
 
 SLOT=15
+REFCHAN=47
   43,   7, 106  ! Plane V', wire 106
 
 SLOT=12
+REFCHAN=47
  110,  10,   1  ! Plane X, wire 1
  109,  10,   2  ! Plane X, wire 2
  108,  10,   3  ! Plane X, wire 3
@@ -1149,6 +1203,7 @@ SLOT=12
   16,  10,  31  ! Plane X, wire 31
 
 SLOT=11
+REFCHAN=47
   31,  10,  32  ! Plane X, wire 32
   30,  10,  33  ! Plane X, wire 33
   29,  10,  34  ! Plane X, wire 34
@@ -1166,9 +1221,11 @@ SLOT=11
   17,  10,  46  ! Plane X, wire 46
 
 SLOT=12
+REFCHAN=47
  111,  10,  47  ! Plane X, wire 47
 
 SLOT=15
+REFCHAN=47
   16,  10,  48  ! Plane X, wire 48
   17,  10,  49  ! Plane X, wire 49
   18,  10,  50  ! Plane X, wire 50
@@ -1187,6 +1244,7 @@ SLOT=15
   31,  10,  63  ! Plane X, wire 63
 
 SLOT=14
+REFCHAN=15
   48,  10,  64  ! Plane X, wire 64
   49,  10,  65  ! Plane X, wire 65
   50,  10,  66  ! Plane X, wire 66
@@ -1204,6 +1262,7 @@ SLOT=14
   62,  10,  78  ! Plane X, wire 78
 
 SLOT=13
+REFCHAN=47
  125,   9,   1  ! Plane X', wire 1
  124,   9,   2  ! Plane X', wire 2
  123,   9,   3  ! Plane X', wire 3
@@ -1236,6 +1295,7 @@ SLOT=13
    0,   9,  30  ! Plane X', wire 30
 
 SLOT=11
+REFCHAN=47
   96,   9,  31  ! Plane X', wire 31
   97,   9,  32  ! Plane X', wire 32
   98,   9,  33  ! Plane X', wire 33
@@ -1270,6 +1330,7 @@ SLOT=11
   79,   9,  62  ! Plane X', wire 62
 
 SLOT=10
+REFCHAN=79
   96,   9,  63  ! Plane X', wire 63
   97,   9,  64  ! Plane X', wire 64
   98,   9,  65  ! Plane X', wire 65
@@ -1287,4 +1348,5 @@ SLOT=10
  110,   9,  77  ! Plane X', wire 77
 
 SLOT=13
+REFCHAN=47
  126,   9,  78  ! Plane X', wire 78
diff --git a/MAPS/SHMS/DETEC/phodo.map b/MAPS/SHMS/DETEC/phodo.map
index 970b2b8ea79f2705997a55e2f5e1874f09db84a6..7a131ce488e33bfc2e8c7dd1ddf88d19c12ba912 100644
--- a/MAPS/SHMS/DETEC/phodo.map
+++ b/MAPS/SHMS/DETEC/phodo.map
@@ -1,4 +1,4 @@
-! PSCIN_ID=23      ::  ADC+,ADC-,TDC+,TDC-
+! PSCIN_ID=23      ::  ::,ADC+,ADC-,TDC+,TDC-
 
 
 DETECTOR=23
@@ -6,34 +6,34 @@ DETECTOR=23
 ROC=2
 
 SLOT=3
-   0,   1,   1,   1  ! S1X001L
-   1,   1,   2,   1  ! S1X002L
-   2,   1,   3,   1  ! S1X003L
-   3,   1,   4,   1  ! S1X004L
-   4,   1,   5,   1  ! S1X005L
-   5,   1,   6,   1  ! S1X006L
-   6,   1,   7,   1  ! S1X007L
-   7,   1,   8,   1  ! S1X008L
-   8,   1,   9,   1  ! S1X009L
-   9,   1,  10,   1  ! S1X010L
-  10,   1,  11,   1  ! S1X011L
-  11,   1,  12,   1  ! S1X012L
-  12,   1,  13,   1  ! S1X013L
-  13,   1,   1,   0  ! S1X001R
-  14,   1,   2,   0  ! S1X002R
-  15,   1,   3,   0  ! S1X003R
+   0,   1,   1,   0  ! S1X001L
+   1,   1,   2,   0  ! S1X002L
+   2,   1,   3,   0  ! S1X003L
+   3,   1,   4,   0  ! S1X004L
+   4,   1,   5,   0  ! S1X005L
+   5,   1,   6,   0  ! S1X006L
+   6,   1,   7,   0  ! S1X007L
+   7,   1,   8,   0  ! S1X008L
+   8,   1,   9,   0  ! S1X009L
+   9,   1,  10,   0  ! S1X010L
+  10,   1,  11,   0  ! S1X011L
+  11,   1,  12,   0  ! S1X012L
+  12,   1,  13,   0  ! S1X013L
+  13,   1,   1,   1  ! S1X001R
+  14,   1,   2,   1  ! S1X002R
+  15,   1,   3,   1  ! S1X003R
 
 SLOT=4
-   0,   1,   4,   0  ! S1X004R
-   1,   1,   5,   0  ! S1X005R
-   2,   1,   6,   0  ! S1X006R
-   3,   1,   7,   0  ! S1X007R
-   4,   1,   8,   0  ! S1X008R
-   5,   1,   9,   0  ! S1X009R
-   6,   1,  10,   0  ! S1X010R
-   7,   1,  11,   0  ! S1X011R
-   8,   1,  12,   0  ! S1X012R
-   9,   1,  13,   0  ! S1X013R
+   0,   1,   4,   1  ! S1X004R
+   1,   1,   5,   1  ! S1X005R
+   2,   1,   6,   1  ! S1X006R
+   3,   1,   7,   1  ! S1X007R
+   4,   1,   8,   1  ! S1X008R
+   5,   1,   9,   1  ! S1X009R
+   6,   1,  10,   1  ! S1X010R
+   7,   1,  11,   1  ! S1X011R
+   8,   1,  12,   1  ! S1X012R
+   9,   1,  13,   1  ! S1X013R
   10,   2,   1,   1  ! S1Y001T
   11,   2,   2,   1  ! S1Y002T
   12,   2,   3,   1  ! S1Y003T
@@ -64,36 +64,36 @@ SLOT=6
    1,   2,  11,   0  ! S1Y011B
    2,   2,  12,   0  ! S1Y012B
    3,   2,  13,   0  ! S1Y013B
-   4,   3,   1,   1  ! S2X001L
-   5,   3,   2,   1  ! S2X002L
-   6,   3,   3,   1  ! S2X003L
-   7,   3,   4,   1  ! S2X004L
-   8,   3,   5,   1  ! S2X005L
-   9,   3,   6,   1  ! S2X006L
-  10,   3,   7,   1  ! S2X007L
-  11,   3,   8,   1  ! S2X008L
-  12,   3,   9,   1  ! S2X009L
-  13,   3,  10,   1  ! S2X010L
-  14,   3,  11,   1  ! S2X011L
-  15,   3,  12,   1  ! S2X012L
+   4,   3,   1,   0  ! S2X001L
+   5,   3,   2,   0  ! S2X002L
+   6,   3,   3,   0  ! S2X003L
+   7,   3,   4,   0  ! S2X004L
+   8,   3,   5,   0  ! S2X005L
+   9,   3,   6,   0  ! S2X006L
+  10,   3,   7,   0  ! S2X007L
+  11,   3,   8,   0  ! S2X008L
+  12,   3,   9,   0  ! S2X009L
+  13,   3,  10,   0  ! S2X010L
+  14,   3,  11,   0  ! S2X011L
+  15,   3,  12,   0  ! S2X012L
 
 SLOT=7
-   0,   3,  13,   1  ! S2X013L
-   1,   3,  14,   1  ! S2X014L
-   2,   3,   1,   0  ! S2X001R
-   3,   3,   2,   0  ! S2X002R
-   4,   3,   3,   0  ! S2X003R
-   5,   3,   4,   0  ! S2X004R
-   6,   3,   5,   0  ! S2X005R
-   7,   3,   6,   0  ! S2X006R
-   8,   3,   7,   0  ! S2X007R
-   9,   3,   8,   0  ! S2X008R
-  10,   3,   9,   0  ! S2X009R
-  11,   3,  10,   0  ! S2X010R
-  12,   3,  11,   0  ! S2X011R
-  13,   3,  12,   0  ! S2X012R
-  14,   3,  13,   0  ! S2X013R
-  15,   3,  14,   0  ! S2X014R
+   0,   3,  13,   0  ! S2X013L
+   1,   3,  14,   0  ! S2X014L
+   2,   3,   1,   1  ! S2X001R
+   3,   3,   2,   1  ! S2X002R
+   4,   3,   3,   1  ! S2X003R
+   5,   3,   4,   1  ! S2X004R
+   6,   3,   5,   1  ! S2X005R
+   7,   3,   6,   1  ! S2X006R
+   8,   3,   7,   1  ! S2X007R
+   9,   3,   8,   1  ! S2X008R
+  10,   3,   9,   1  ! S2X009R
+  11,   3,  10,   1  ! S2X010R
+  12,   3,  11,   1  ! S2X011R
+  13,   3,  12,   1  ! S2X012R
+  14,   3,  13,   1  ! S2X013R
+  15,   3,  14,   1  ! S2X014R
 
 SLOT=8
    0,   4,   1,   1  ! S2Y001T
@@ -142,3 +142,133 @@ SLOT=10
    7,   4,  19,   0  ! S2Y019B
    8,   4,  20,   0  ! S2Y020B
    9,   4,  21,   0  ! S2Y021B
+
+SLOT=20
+REFINDEX=0
+  15,1000,   0,   0
+   0,   1,   1,   2  ! S1X001L
+   1,   1,   3,   2  ! S1X003L
+   2,   1,   5,   2  ! S1X005L
+   3,   1,   7,   2  ! S1X007L
+   4,   1,   2,   2  ! S1X002L
+   5,   1,   4,   2  ! S1X004L
+   6,   1,   6,   2  ! S1X006L
+   7,   1,   8,   2  ! S1X008L
+   8,   1,   9,   2  ! S1X009L
+   9,   1,  11,   2  ! S1X011L
+  10,   1,  13,   2  ! S1X013L
+  12,   1,  10,   2  ! S1X010L
+  13,   1,  12,   2  ! S1X012L
+  16,   1,   1,   3  ! S1X001R
+  17,   1,   3,   3  ! S1X003R
+  18,   1,   5,   3  ! S1X005R
+  19,   1,   7,   3  ! S1X007R
+  20,   1,   2,   3  ! S1X002R
+  21,   1,   4,   3  ! S1X004R
+  22,   1,   6,   3  ! S1X006R
+  23,   1,   8,   3  ! S1X008R
+  24,   1,   9,   3  ! S1X009R
+  25,   1,  11,   3  ! S1X011R
+  26,   1,  13,   3  ! S1X013R
+  28,   1,  10,   3  ! S1X010R
+  29,   1,  12,   3  ! S1X012R
+  32,   2,   1,   3  ! S1Y001T
+  33,   2,   3,   3  ! S1Y003T
+  34,   2,   5,   3  ! S1Y005T
+  35,   2,   7,   3  ! S1Y007T
+  36,   2,   2,   3  ! S1Y002T
+  37,   2,   4,   3  ! S1Y004T
+  38,   2,   6,   3  ! S1Y006T
+  39,   2,   8,   3  ! S1Y008T
+  40,   2,   9,   3  ! S1Y009T
+  41,   2,  11,   3  ! S1Y011T
+  42,   2,  13,   3  ! S1Y013T
+  44,   2,  10,   3  ! S1Y010T
+  45,   2,  12,   3  ! S1Y012T
+  48,   2,   1,   2  ! S1Y001B
+  49,   2,   3,   2  ! S1Y003B
+  50,   2,   5,   2  ! S1Y005B
+  51,   2,   7,   2  ! S1Y007B
+  52,   2,   2,   2  ! S1Y002B
+  53,   2,   4,   2  ! S1Y004B
+  54,   2,   6,   2  ! S1Y006B
+  55,   2,   8,   2  ! S1Y008B
+  56,   2,   9,   2  ! S1Y009B
+  57,   2,  11,   2  ! S1Y011B
+  58,   2,  13,   2  ! S1Y013B
+  60,   2,  10,   2  ! S1Y010B
+  61,   2,  12,   2  ! S1Y012B
+  64,   3,   1,   2  ! S2X001L
+  65,   3,   3,   2  ! S2X003L
+  66,   3,   5,   2  ! S2X005L
+  67,   3,   7,   2  ! S2X007L
+  68,   3,   2,   2  ! S2X002L
+  69,   3,   4,   2  ! S2X004L
+  70,   3,   6,   2  ! S2X006L
+  71,   3,   8,   2  ! S2X008L
+  72,   3,   9,   2  ! S2X009L
+  73,   3,  11,   2  ! S2X011L
+  74,   3,  13,   2  ! S2X013L
+  76,   3,  10,   2  ! S2X010L
+  77,   3,  12,   2  ! S2X012L
+  78,   3,  14,   2  ! S2X014L
+  80,   3,   1,   3  ! S2X001R
+  81,   3,   3,   3  ! S2X003R
+  82,   3,   5,   3  ! S2X005R
+  83,   3,   7,   3  ! S2X007R
+  84,   3,   2,   3  ! S2X002R
+  85,   3,   4,   3  ! S2X004R
+  86,   3,   6,   3  ! S2X006R
+  87,   3,   8,   3  ! S2X008R
+  88,   3,   9,   3  ! S2X009R
+  89,   3,  11,   3  ! S2X011R
+  90,   3,  13,   3  ! S2X013R
+  92,   3,  10,   3  ! S2X010R
+  93,   3,  12,   3  ! S2X012R
+  94,   3,  14,   3  ! S2X014R
+  96,   4,   1,   3  ! S2Y001T
+  97,   4,   3,   3  ! S2Y003T
+  98,   4,   5,   3  ! S2Y005T
+  99,   4,   7,   3  ! S2Y007T
+ 100,   4,   2,   3  ! S2Y002T
+ 101,   4,   4,   3  ! S2Y004T
+ 102,   4,   6,   3  ! S2Y006T
+ 103,   4,   8,   3  ! S2Y008T
+ 104,   4,   9,   3  ! S2Y009T
+ 105,   4,  11,   3  ! S2Y011T
+ 106,   4,  13,   3  ! S2Y013T
+ 107,   4,  15,   3  ! S2Y015T
+ 108,   4,  10,   3  ! S2Y010T
+ 109,   4,  12,   3  ! S2Y012T
+ 110,   4,  14,   3  ! S2Y014T
+ 111,   4,  16,   3  ! S2Y016T
+ 112,   4,  17,   3  ! S2Y017T
+ 113,   4,  19,   3  ! S2Y019T
+ 114,   4,  21,   3  ! S2Y021T
+ 116,   4,  18,   3  ! S2Y018T
+ 117,   4,  20,   3  ! S2Y020T
+
+SLOT=19
+REFINDEX=0
+  31,1000,   0,   1
+   0,   4,   1,   2  ! S2Y001B
+   1,   4,   3,   2  ! S2Y003B
+   2,   4,   5,   2  ! S2Y005B
+   3,   4,   7,   2  ! S2Y007B
+   4,   4,   2,   2  ! S2Y002B
+   5,   4,   4,   2  ! S2Y004B
+   6,   4,   6,   2  ! S2Y006B
+   7,   4,   8,   2  ! S2Y008B
+   8,   4,   9,   2  ! S2Y009B
+   9,   4,  11,   2  ! S2Y011B
+  10,   4,  13,   2  ! S2Y013B
+  11,   4,  15,   2  ! S2Y015B
+  12,   4,  10,   2  ! S2Y010B
+  13,   4,  12,   2  ! S2Y012B
+  14,   4,  14,   2  ! S2Y014B
+  15,   4,  16,   2  ! S2Y016B
+  16,   4,  17,   2  ! S2Y017B
+  17,   4,  19,   2  ! S2Y019B
+  18,   4,  21,   2  ! S2Y021B
+  20,   4,  18,   2  ! S2Y018B
+  21,   4,  20,   2  ! S2Y020B
diff --git a/MAPS/SHMS/DETEC/phodo_ptrig.map b/MAPS/SHMS/DETEC/phodo_ptrig.map
new file mode 100644
index 0000000000000000000000000000000000000000..aebb6aa52c8e34e3f06c436280d5fe5f6195b8e6
--- /dev/null
+++ b/MAPS/SHMS/DETEC/phodo_ptrig.map
@@ -0,0 +1,333 @@
+! TSHMS_ID=20      ::  ::,::,ADC+,ADC-,TDC+,TDC-
+! PSCIN_ID=23      ::  ::,::,ADC+,ADC-,TDC+,TDC-
+
+
+DETECTOR=20
+
+ROC=2
+
+SLOT=14
+   0,   1,   1,   0  ! pAERSUM
+   1,   1,   2,   0  ! pHGCSUM
+   2,   1,   3,   0  ! pNGCSUM
+
+SLOT=20
+  15,   2,   1,   1  ! pT1
+
+SLOT=19
+  31,   2,   2,   1  ! pT2
+  32,   2,   3,   1  ! p1X
+  33,   2,   4,   1  ! p1Y
+  34,   2,   5,   1  ! p2X
+  35,   2,   6,   1  ! p2Y
+  36,   2,   7,   1  ! p1T
+  37,   2,   8,   1  ! p2T
+  38,   2,   9,   1  ! pT3
+  39,   2,  10,   1  ! pAERSUM
+  40,   2,  11,   1  ! pHGCSUM
+  41,   2,  12,   1  ! pNGCSUM
+
+ROC=6
+
+SLOT=6
+  79,   2,  13,   1  ! pDCREF1
+
+SLOT=7
+  79,   2,  14,   1  ! pDCREF2
+
+SLOT=8
+  79,   2,  15,   1  ! pDCREF3
+
+SLOT=9
+  79,   2,  16,   1  ! pDCREF4
+
+SLOT=10
+  79,   2,  17,   1  ! pDCREF5
+
+SLOT=11
+  47,   2,  18,   1  ! pDCREF6
+
+SLOT=12
+  47,   2,  19,   1  ! pDCREF7
+
+SLOT=13
+  47,   2,  20,   1  ! pDCREF8
+
+SLOT=14
+  15,   2,  21,   1  ! pDCREF9
+
+SLOT=15
+  47,   2,  22,   1  ! pDCREF10
+
+
+DETECTOR=23
+
+ROC=2
+
+SLOT=3
+   0,   1,   1,   0  ! S1X001L
+   1,   1,   2,   0  ! S1X002L
+   2,   1,   3,   0  ! S1X003L
+   3,   1,   4,   0  ! S1X004L
+   4,   1,   5,   0  ! S1X005L
+   5,   1,   6,   0  ! S1X006L
+   6,   1,   7,   0  ! S1X007L
+   7,   1,   8,   0  ! S1X008L
+   8,   1,   9,   0  ! S1X009L
+   9,   1,  10,   0  ! S1X010L
+  10,   1,  11,   0  ! S1X011L
+  11,   1,  12,   0  ! S1X012L
+  12,   1,  13,   0  ! S1X013L
+  13,   1,   1,   1  ! S1X001R
+  14,   1,   2,   1  ! S1X002R
+  15,   1,   3,   1  ! S1X003R
+
+SLOT=4
+   0,   1,   4,   1  ! S1X004R
+   1,   1,   5,   1  ! S1X005R
+   2,   1,   6,   1  ! S1X006R
+   3,   1,   7,   1  ! S1X007R
+   4,   1,   8,   1  ! S1X008R
+   5,   1,   9,   1  ! S1X009R
+   6,   1,  10,   1  ! S1X010R
+   7,   1,  11,   1  ! S1X011R
+   8,   1,  12,   1  ! S1X012R
+   9,   1,  13,   1  ! S1X013R
+  10,   2,   1,   1  ! S1Y001T
+  11,   2,   2,   1  ! S1Y002T
+  12,   2,   3,   1  ! S1Y003T
+  13,   2,   4,   1  ! S1Y004T
+  14,   2,   5,   1  ! S1Y005T
+  15,   2,   6,   1  ! S1Y006T
+
+SLOT=5
+   0,   2,   7,   1  ! S1Y007T
+   1,   2,   8,   1  ! S1Y008T
+   2,   2,   9,   1  ! S1Y009T
+   3,   2,  10,   1  ! S1Y010T
+   4,   2,  11,   1  ! S1Y011T
+   5,   2,  12,   1  ! S1Y012T
+   6,   2,  13,   1  ! S1Y013T
+   7,   2,   1,   0  ! S1Y001B
+   8,   2,   2,   0  ! S1Y002B
+   9,   2,   3,   0  ! S1Y003B
+  10,   2,   4,   0  ! S1Y004B
+  11,   2,   5,   0  ! S1Y005B
+  12,   2,   6,   0  ! S1Y006B
+  13,   2,   7,   0  ! S1Y007B
+  14,   2,   8,   0  ! S1Y008B
+  15,   2,   9,   0  ! S1Y009B
+
+SLOT=6
+   0,   2,  10,   0  ! S1Y010B
+   1,   2,  11,   0  ! S1Y011B
+   2,   2,  12,   0  ! S1Y012B
+   3,   2,  13,   0  ! S1Y013B
+   4,   3,   1,   0  ! S2X001L
+   5,   3,   2,   0  ! S2X002L
+   6,   3,   3,   0  ! S2X003L
+   7,   3,   4,   0  ! S2X004L
+   8,   3,   5,   0  ! S2X005L
+   9,   3,   6,   0  ! S2X006L
+  10,   3,   7,   0  ! S2X007L
+  11,   3,   8,   0  ! S2X008L
+  12,   3,   9,   0  ! S2X009L
+  13,   3,  10,   0  ! S2X010L
+  14,   3,  11,   0  ! S2X011L
+  15,   3,  12,   0  ! S2X012L
+
+SLOT=7
+   0,   3,  13,   0  ! S2X013L
+   1,   3,  14,   0  ! S2X014L
+   2,   3,   1,   1  ! S2X001R
+   3,   3,   2,   1  ! S2X002R
+   4,   3,   3,   1  ! S2X003R
+   5,   3,   4,   1  ! S2X004R
+   6,   3,   5,   1  ! S2X005R
+   7,   3,   6,   1  ! S2X006R
+   8,   3,   7,   1  ! S2X007R
+   9,   3,   8,   1  ! S2X008R
+  10,   3,   9,   1  ! S2X009R
+  11,   3,  10,   1  ! S2X010R
+  12,   3,  11,   1  ! S2X011R
+  13,   3,  12,   1  ! S2X012R
+  14,   3,  13,   1  ! S2X013R
+  15,   3,  14,   1  ! S2X014R
+
+SLOT=8
+   0,   4,   1,   1  ! S2Y001T
+   1,   4,   2,   1  ! S2Y002T
+   2,   4,   3,   1  ! S2Y003T
+   3,   4,   4,   1  ! S2Y004T
+   4,   4,   5,   1  ! S2Y005T
+   5,   4,   6,   1  ! S2Y006T
+   6,   4,   7,   1  ! S2Y007T
+   7,   4,   8,   1  ! S2Y008T
+   8,   4,   9,   1  ! S2Y009T
+   9,   4,  10,   1  ! S2Y010T
+  10,   4,  11,   1  ! S2Y011T
+  11,   4,  12,   1  ! S2Y012T
+  12,   4,  13,   1  ! S2Y013T
+  13,   4,  14,   1  ! S2Y014T
+  14,   4,  15,   1  ! S2Y015T
+  15,   4,  16,   1  ! S2Y016T
+
+SLOT=9
+   0,   4,  17,   1  ! S2Y017T
+   1,   4,  18,   1  ! S2Y018T
+   2,   4,  19,   1  ! S2Y019T
+   3,   4,  20,   1  ! S2Y020T
+   4,   4,  21,   1  ! S2Y021T
+   5,   4,   1,   0  ! S2Y001B
+   6,   4,   2,   0  ! S2Y002B
+   7,   4,   3,   0  ! S2Y003B
+   8,   4,   4,   0  ! S2Y004B
+   9,   4,   5,   0  ! S2Y005B
+  10,   4,   6,   0  ! S2Y006B
+  11,   4,   7,   0  ! S2Y007B
+  12,   4,   8,   0  ! S2Y008B
+  13,   4,   9,   0  ! S2Y009B
+  14,   4,  10,   0  ! S2Y010B
+  15,   4,  11,   0  ! S2Y011B
+
+SLOT=10
+   0,   4,  12,   0  ! S2Y012B
+   1,   4,  13,   0  ! S2Y013B
+   2,   4,  14,   0  ! S2Y014B
+   3,   4,  15,   0  ! S2Y015B
+   4,   4,  16,   0  ! S2Y016B
+   5,   4,  17,   0  ! S2Y017B
+   6,   4,  18,   0  ! S2Y018B
+   7,   4,  19,   0  ! S2Y019B
+   8,   4,  20,   0  ! S2Y020B
+   9,   4,  21,   0  ! S2Y021B
+
+SLOT=20
+REFINDEX=0
+  15,1000,   0,   0
+   0,   1,   1,   2  ! S1X001L
+   1,   1,   3,   2  ! S1X003L
+   2,   1,   5,   2  ! S1X005L
+   3,   1,   7,   2  ! S1X007L
+   4,   1,   2,   2  ! S1X002L
+   5,   1,   4,   2  ! S1X004L
+   6,   1,   6,   2  ! S1X006L
+   7,   1,   8,   2  ! S1X008L
+   8,   1,   9,   2  ! S1X009L
+   9,   1,  11,   2  ! S1X011L
+  10,   1,  13,   2  ! S1X013L
+  12,   1,  10,   2  ! S1X010L
+  13,   1,  12,   2  ! S1X012L
+  16,   1,   1,   3  ! S1X001R
+  17,   1,   3,   3  ! S1X003R
+  18,   1,   5,   3  ! S1X005R
+  19,   1,   7,   3  ! S1X007R
+  20,   1,   2,   3  ! S1X002R
+  21,   1,   4,   3  ! S1X004R
+  22,   1,   6,   3  ! S1X006R
+  23,   1,   8,   3  ! S1X008R
+  24,   1,   9,   3  ! S1X009R
+  25,   1,  11,   3  ! S1X011R
+  26,   1,  13,   3  ! S1X013R
+  28,   1,  10,   3  ! S1X010R
+  29,   1,  12,   3  ! S1X012R
+  32,   2,   1,   3  ! S1Y001T
+  33,   2,   3,   3  ! S1Y003T
+  34,   2,   5,   3  ! S1Y005T
+  35,   2,   7,   3  ! S1Y007T
+  36,   2,   2,   3  ! S1Y002T
+  37,   2,   4,   3  ! S1Y004T
+  38,   2,   6,   3  ! S1Y006T
+  39,   2,   8,   3  ! S1Y008T
+  40,   2,   9,   3  ! S1Y009T
+  41,   2,  11,   3  ! S1Y011T
+  42,   2,  13,   3  ! S1Y013T
+  44,   2,  10,   3  ! S1Y010T
+  45,   2,  12,   3  ! S1Y012T
+  48,   2,   1,   2  ! S1Y001B
+  49,   2,   3,   2  ! S1Y003B
+  50,   2,   5,   2  ! S1Y005B
+  51,   2,   7,   2  ! S1Y007B
+  52,   2,   2,   2  ! S1Y002B
+  53,   2,   4,   2  ! S1Y004B
+  54,   2,   6,   2  ! S1Y006B
+  55,   2,   8,   2  ! S1Y008B
+  56,   2,   9,   2  ! S1Y009B
+  57,   2,  11,   2  ! S1Y011B
+  58,   2,  13,   2  ! S1Y013B
+  60,   2,  10,   2  ! S1Y010B
+  61,   2,  12,   2  ! S1Y012B
+  64,   3,   1,   2  ! S2X001L
+  65,   3,   3,   2  ! S2X003L
+  66,   3,   5,   2  ! S2X005L
+  67,   3,   7,   2  ! S2X007L
+  68,   3,   2,   2  ! S2X002L
+  69,   3,   4,   2  ! S2X004L
+  70,   3,   6,   2  ! S2X006L
+  71,   3,   8,   2  ! S2X008L
+  72,   3,   9,   2  ! S2X009L
+  73,   3,  11,   2  ! S2X011L
+  74,   3,  13,   2  ! S2X013L
+  76,   3,  10,   2  ! S2X010L
+  77,   3,  12,   2  ! S2X012L
+  78,   3,  14,   2  ! S2X014L
+  80,   3,   1,   3  ! S2X001R
+  81,   3,   3,   3  ! S2X003R
+  82,   3,   5,   3  ! S2X005R
+  83,   3,   7,   3  ! S2X007R
+  84,   3,   2,   3  ! S2X002R
+  85,   3,   4,   3  ! S2X004R
+  86,   3,   6,   3  ! S2X006R
+  87,   3,   8,   3  ! S2X008R
+  88,   3,   9,   3  ! S2X009R
+  89,   3,  11,   3  ! S2X011R
+  90,   3,  13,   3  ! S2X013R
+  92,   3,  10,   3  ! S2X010R
+  93,   3,  12,   3  ! S2X012R
+  94,   3,  14,   3  ! S2X014R
+  96,   4,   1,   3  ! S2Y001T
+  97,   4,   3,   3  ! S2Y003T
+  98,   4,   5,   3  ! S2Y005T
+  99,   4,   7,   3  ! S2Y007T
+ 100,   4,   2,   3  ! S2Y002T
+ 101,   4,   4,   3  ! S2Y004T
+ 102,   4,   6,   3  ! S2Y006T
+ 103,   4,   8,   3  ! S2Y008T
+ 104,   4,   9,   3  ! S2Y009T
+ 105,   4,  11,   3  ! S2Y011T
+ 106,   4,  13,   3  ! S2Y013T
+ 107,   4,  15,   3  ! S2Y015T
+ 108,   4,  10,   3  ! S2Y010T
+ 109,   4,  12,   3  ! S2Y012T
+ 110,   4,  14,   3  ! S2Y014T
+ 111,   4,  16,   3  ! S2Y016T
+ 112,   4,  17,   3  ! S2Y017T
+ 113,   4,  19,   3  ! S2Y019T
+ 114,   4,  21,   3  ! S2Y021T
+ 116,   4,  18,   3  ! S2Y018T
+ 117,   4,  20,   3  ! S2Y020T
+
+SLOT=19
+REFINDEX=0
+  31,1000,   0,   1
+   0,   4,   1,   2  ! S2Y001B
+   1,   4,   3,   2  ! S2Y003B
+   2,   4,   5,   2  ! S2Y005B
+   3,   4,   7,   2  ! S2Y007B
+   4,   4,   2,   2  ! S2Y002B
+   5,   4,   4,   2  ! S2Y004B
+   6,   4,   6,   2  ! S2Y006B
+   7,   4,   8,   2  ! S2Y008B
+   8,   4,   9,   2  ! S2Y009B
+   9,   4,  11,   2  ! S2Y011B
+  10,   4,  13,   2  ! S2Y013B
+  11,   4,  15,   2  ! S2Y015B
+  12,   4,  10,   2  ! S2Y010B
+  13,   4,  12,   2  ! S2Y012B
+  14,   4,  14,   2  ! S2Y014B
+  15,   4,  16,   2  ! S2Y016B
+  16,   4,  17,   2  ! S2Y017B
+  17,   4,  19,   2  ! S2Y019B
+  18,   4,  21,   2  ! S2Y021B
+  20,   4,  18,   2  ! S2Y018B
+  21,   4,  20,   2  ! S2Y020B
diff --git a/MAPS/SHMS/DETEC/ptrig.map b/MAPS/SHMS/DETEC/ptrig.map
new file mode 100644
index 0000000000000000000000000000000000000000..3862ecb12113ef0e2e67695deff707b1049d4fe2
--- /dev/null
+++ b/MAPS/SHMS/DETEC/ptrig.map
@@ -0,0 +1,59 @@
+! TSHMS_ID=20      ::  ADC,TDC
+
+
+DETECTOR=20
+
+ROC=2
+
+SLOT=14
+   0,   1,   1,   0  ! pAERSUM
+   1,   1,   2,   0  ! pHGCSUM
+   2,   1,   3,   0  ! pNGCSUM
+
+SLOT=20
+  15,   2,   1,   1  ! pT1
+
+SLOT=19
+  31,   2,   2,   1  ! pT2
+  32,   2,   3,   1  ! p1X
+  33,   2,   4,   1  ! p1Y
+  34,   2,   5,   1  ! p2X
+  35,   2,   6,   1  ! p2Y
+  36,   2,   7,   1  ! p1T
+  37,   2,   8,   1  ! p2T
+  38,   2,   9,   1  ! pT3
+  39,   2,  10,   1  ! pAERSUM
+  40,   2,  11,   1  ! pHGCSUM
+  41,   2,  12,   1  ! pNGCSUM
+
+ROC=6
+
+SLOT=6
+  79,   2,  13,   1  ! pDCREF1
+
+SLOT=7
+  79,   2,  14,   1  ! pDCREF2
+
+SLOT=8
+  79,   2,  15,   1  ! pDCREF3
+
+SLOT=9
+  79,   2,  16,   1  ! pDCREF4
+
+SLOT=10
+  79,   2,  17,   1  ! pDCREF5
+
+SLOT=11
+  47,   2,  18,   1  ! pDCREF6
+
+SLOT=12
+  47,   2,  19,   1  ! pDCREF7
+
+SLOT=13
+  47,   2,  20,   1  ! pDCREF8
+
+SLOT=14
+  15,   2,  21,   1  ! pDCREF9
+
+SLOT=15
+  47,   2,  22,   1  ! pDCREF10
diff --git a/PARAM/SHMS/CAL/pcal.param b/PARAM/SHMS/CAL/pcal.param
new file mode 100644
index 0000000000000000000000000000000000000000..81415ca2e61b63127cef6632cba27033febd3125
--- /dev/null
+++ b/PARAM/SHMS/CAL/pcal.param
@@ -0,0 +1,81 @@
+
+pcal_array = 1
+pcal_layer_names = "pr fly"
+pcal_pr_nr = 14 # Num of rows in preshower
+pcal_num_layers = 1
+pcal_arr_nrows = 16
+pcal_arr_ncolumns = 14
+
+pcal_arr_front_x = 1.0
+pcal_arr_front_y = 1.0
+pcal_arr_front_z = 1.0
+pcal_arr_xstep = 1.0
+pcal_arr_ystep = 1.0
+pcal_arr_zsize = 1.0
+pcal_arr_ped_limit = 1.0
+pcal_arr_cal_const = 1.0
+pcal_arr_gain_cor = 1.0
+
+
+; Exclusion bandwidth for calorimeter fiducial volume.
+pcal_fv_delta = 5
+# Constants for the coordiante correction of the calorimeter energy depositions
+pcal_a_cor = 200.
+pcal_b_cor = 8000.
+pcal_c_cor = 64.36, 64.36	# for positive and negative sides
+pcal_d_cor =  1.66,  1.66
+
+; Parameters copied from HMS
+; Slop in x possitino.  Allowed distance between track and edge of block
+pcal_slop = 7.5 
+
+pcal_pr_thick = 10.0
+; Z Position of from of preshower
+pcal_pr_zpos = 200.0
+
+pcal_pr_left  =  35.0
+pcal_pr_right = -35.0
+pcal_pr_top   = (-69.0-1.4)
+                 (-59.0-1.4)
+                 (-49.0-1.4)
+                 (-39.0-1.4)
+                 (-29.0-1.4)
+                 (-19.0-1.4)
+                 ( -9.0-1.4)
+                 (  1.0-1.4)
+                 ( 11.0-1.4)
+                 ( 21.0-1.4)
+                 ( 31.0-1.4)
+                 ( 41.0-1.4)
+                 ( 51.0-1.4)
+                 ( 61.0-1.4)
+pcal_pos_cal_const =0.001,0.001,0.001,0.001,0.001,0.001,0.001,0.001,
+        0.001,0.001,0.001,0.001,0.001,0.001
+pcal_neg_cal_const =0.001,0.001,0.001,0.001,0.001,0.001,0.001,0.001,
+        0.001,0.001,0.001,0.001,0.001,0.001
+pcal_pos_ped_limit=1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,
+	1000,1000,1000,1000
+pcal_neg_ped_limit=1000,1000,1000,1000,1000,1000,1000,1000,1000,1000,
+	1000,1000,1000,1000
+pcal_pos_gain_cor=1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
+pcal_neg_gain_cor=1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0
+
+pcal_min_peds = 500
+
+; Parameters we need to keep THcHallCSpectrometer Happy
+p_recon_coeff_filename = ""
+ptheta_offset = 0.0
+pphi_offset = 0.0
+pdelta_offset = 0.0
+pthetacentral_offset = 0.0
+p_oopcentral_offset = 0.0
+ppcentral_offset = 0.0
+ppcentral = 0.0
+ptheta_lab = 0.0
+ppartmass = 0.139
+phodo_num_planes = 1
+
+; "Hodoscope" parameters
+; Not used, but to keep THcTestPaddles happy
+pref_offset = 0
+pref_nsperchan = 0.1
\ No newline at end of file
diff --git a/PARAM/SHMS/DC/pdc.param.ori b/PARAM/SHMS/DC/pdc.param.ori
deleted file mode 100644
index 7d1d76cf442116fbf659ed66afee7b0571919598..0000000000000000000000000000000000000000
--- a/PARAM/SHMS/DC/pdc.param.ori
+++ /dev/null
@@ -1,14 +0,0 @@
-
-ppartmass = 0.139
-phodo_num_planes = 1
-
-; Scintillator parameters
-pref_npaddles = 6
-pref_nsperchan = 0.1
-pref_offset = 0.0
-
-
-
-
-
-
diff --git a/PARAM/SHMS/DC/pdc.param.ori.dnd b/PARAM/SHMS/DC/pdc.param.ori.dnd
deleted file mode 100644
index 4ba25d481eb391a28d5bb83bd6d13c5203c456f5..0000000000000000000000000000000000000000
--- a/PARAM/SHMS/DC/pdc.param.ori.dnd
+++ /dev/null
@@ -1,377 +0,0 @@
-
-raddeg=3.14159265/180
-
-; Parameters we need to keep THcHallCSpectrometer Happy
-p_recon_coeff_filename = ""
-ptheta_offset = 0.0
-pphi_offset = 0.0
-pdelta_offset = 0.0
-pthetacentral_offset = 0.0
-p_oopcentral_offset = 0.0
-ppcentral_offset = 0.0
-ppcentral = 0.0
-ptheta_lab = 0.0
-ppartmass = 0.139
-phodo_num_planes = 1
-
-; Scintillator parameters
-pref_npaddles = 6
-pref_nsperchan = 0.1
-pref_offset = 0.0
-;
-
-; Number of chambers in test setup
-
-
-  pdc_num_chambers = 2
-  pdc_num_planes = 12
-  pdc_tdc_time_per_channel = -0.10 ; TDC step size  100ps?
-  pdc_wire_velocity = 13.0
-  pdc_central_time = 1,1,1,1,1,1,1,1,1,1,1,1
-  pdc_plane_names = "1u1 1u2 1x1 1x2 1v1 1v2 2v2 2v1 2x2 2x1 2u2 2u1
-  pdc_xcenter = 0.0, 0.0
-  pdc_ycenter = 0.0, 0.0
-; Order in which wires are readout
-  pdc_wire_counting = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-; If pdc_wire_counting(plane) = 0
-;  the wire center is at (wire - pdc_central_wire) * pitch
-; If pdc_wire_counting(plane) = 1
-;  the wire center is at ( pdc_nrwire + 1 - wire - pdc_central_wire) * pitch
-
-; The velocity correction is the distance from the center of the wire divided
-; by the velocity of propagation times pdc_drifttime_sign(pln).  +/-1
-; for disc. card at +/- coord. (i.e. top = -x direction, so top readout is +1)
-;
-; These are guesses taken from the SOS Chambers
-;
-  pdc_drifttime_sign = 1, -1, -1, 1, 1, -1,  1, -1, -1, 1, 1, -1
-;
-; Wire number of center of wire chamber
-; Note the convention : x : low number =  -x , u,v : low number = "-x"
-; x1 and x2, u1 and u2, v1 and v2 are offset by half a cell length
-; assume 1st wire of 1st dc of a set is closest to edge where counting starts
-; (These taken from SOS.  Will be different for SHMS
-      pdc_central_wire = 54.25
-                         53.75
-                         40.25
-                         40.75
-                         54.25
-                         53.75 
-			 53.75
-			 54.25
-			 40.75
-			 40.25
-			 53.75
-			 54.25
-
-; sigma of wire chabmer resolution for each plane
-  pdc_sigma = 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02, 0.02
-
-; tdc window.  Wide limits for now
-  pdc_tdc_min_win = -55000,-55000,-55000,-55000,-55000,-55000,-55000,-55000,-55000,-55000,-55000,-55000
-  pdc_tdc_max_win = 55000,55000,55000,55000,55000,55000,55000,55000,55000,55000,55000,55000
-; zero time.  Decreasing moves sdtime plots to lower time
-  pdc_plane_time_zero = 120.0,120.0,120.0,120.0,120.0,120.0,120.0,120.0,120.0,120.0,120.0,120.0
-  pdc_chamber_planes = 1,1,1,1,1,1,2,2,2,2,2,2  ;  Chamber # for each plane
-
-
-; pdc_1_zpos = -14.5*2.54
-  pdc_1_zpos = 0    ; Don't try to project to scintillators
-
-; Use geometry of SOS chambers for now
-  pdc_zpos   = pdc_1_zpos - 1.5875
-               pdc_1_zpos - 0.9525
-               pdc_1_zpos - 0.3175
-               pdc_1_zpos + 0.3175
-               pdc_1_zpos + 0.9525
-               pdc_1_zpos + 1.5875
-	       pdc_1_zpos - 1.5875	  
-               pdc_1_zpos - 0.9525
-               pdc_1_zpos - 0.3175
-               pdc_1_zpos + 0.3175
-               pdc_1_zpos + 0.9525
-               pdc_1_zpos + 1.5875
-
-; Angle alpha of wires in wire chamber planes
-  pdc_roll = 0.0 ; SOS chambers had roll as installed
-  pdc_alpha_angle = (30-pdc_roll)*raddeg
-  		    (30-pdc_roll)*raddeg
-  		    (90-pdc_roll)*raddeg
-  		    (90-pdc_roll)*raddeg
-  		    (150-pdc_roll)*raddeg
-  		    (150-pdc_roll)*raddeg
-		    (30-pdc_roll)*raddeg
-  		    (30-pdc_roll)*raddeg
-  		    (90-pdc_roll)*raddeg
-  		    (90-pdc_roll)*raddeg
-  		    (150-pdc_roll)*raddeg
-  		    (150-pdc_roll)*raddeg
-  pdc_beta = 0.0
-  pdc_beta_angle = pdc_beta
-                   pdc_beta
-                   pdc_beta
-                   pdc_beta
-                   pdc_beta
-                   pdc_beta
-		   pdc_beta
-                   pdc_beta
-                   pdc_beta
-                   pdc_beta
-                   pdc_beta
-                   pdc_beta
-
-  pdc_gamma = 0.0
-  pdc_gamma_angle = pdc_gamma
-                    pdc_gamma
-                    pdc_gamma
-                    pdc_gamma
-                    pdc_gamma
-                    pdc_gamma
-		    pdc_gamma
-                    pdc_gamma
-                    pdc_gamma
-                    pdc_gamma
-                    pdc_gamma
-                    pdc_gamma
-  pdc_pitch = 1.0000
-              1.0000
-              1.0000
-              1.0000
-              1.0000
-              1.0000
-	      1.0000	      
-              1.0000
-              1.0000
-              1.0000
-              1.0000
-              1.0000
-; Number of wires per plane
-      pdc_nrwire = 107
-                   107
-                   79
-                   79
-                   107
-                   107
-		   107
-                   107
-                   79
-                   79
-                   107
-                   107
-
-; Tracking parameters
-
-  pmax_pr_hits = 25, 25
-  pmin_hit = 5, 5
-  pmin_combos = 6, 6
-  pspace_point_criterion = 1.2, 1.2
-
-; The following four criteria are applied to the stub fit results at the
-; focal plane position to link stubs to tracks
-  pntracks_max_fp = 10
-  pxt_track_criterion = 100.0
-  pyt_track_criterion = 2.0
-  pxpt_track_criterion = 1.0
-  pypt_track_criterion = 1.0
-
-  psingle_stub = 1 ; make a track of all single stubs
-                   ; normally 0
-  pSmallAngleApprox = 0 ; No small angle approximation for
-                        ; cosmic ray tests
-
-; Compatibility parameters.  Should be zero to precisely mimic ENGINE
-; behavior, but one for more correct behavior
-pdc_fix_lr = 1 ; Let hit have different L/R assignment for different space point
-pdc_fix_propcorr = 1 ; do propagation along wire each time hit appeears
-                     ; in a space point
-
-; Debugging flags - not all these implemented in hcana
-pdebuglinkstubs = 0 ; Dump link stub results
-pdebugprintrawdc = 0 ; Dump PDC_RAW_DC bank
-pdebugprintdecodeddc = 0 ; Dump PDC_DECODED_DC bank
-pdebugflagpr = 0 ; Dump intermediate pattern recognition results
-pdebugflagstubs= 0 ; Dump stub fit results
-pdebugtrackprint = 0 ; Dump focal plane track fit results
-pdebugstubchisq = 0; Dump chi2 of left-right fits
-
-; Drift map parameters
-pdriftbins = 138
-; Number of 1st bin in table
-pdrift1stbin = -24
-; Bin size in ns
-pdriftbinsz = 2
-; Drift maps simply copied from the SOS chambers
-pwc1u1fract=0.0002,0.0005,0.0009,0.0011,0.0015,0.0018,0.0022,0.0027
-0.0029,0.0033,0.0038,0.0044,0.0048,0.0051,0.0057,0.0070,0.0090,0.0121
-0.0167,0.0217,0.0282,0.0371,0.0467,0.0582,0.0723,0.0873,0.1038,0.1211
-0.1409,0.1609,0.1826,0.2060,0.2302,0.2542,0.2796,0.3043,0.3294,0.3555
-0.3819,0.4085,0.4343,0.4618,0.4890,0.5140,0.5384,0.5635,0.5880,0.6100
-0.6311,0.6522,0.6722,0.6928,0.7120,0.7316,0.7495,0.7684,0.7853,0.8026
-0.8191,0.8334,0.8491,0.8629,0.8771,0.8888,0.8994,0.9089,0.9170,0.9242
-0.9308,0.9364,0.9411,0.9457,0.9496,0.9538,0.9571,0.9602,0.9630,0.9654
-0.9679,0.9698,0.9718,0.9735,0.9750,0.9765,0.9778,0.9791,0.9804,0.9815
-0.9825,0.9833,0.9844,0.9851,0.9855,0.9862,0.9870,0.9874,0.9877,0.9883
-0.9889,0.9893,0.9895,0.9898,0.9901,0.9904,0.9910,0.9918,0.9923,0.9927
-0.9930,0.9935,0.9937,0.9941,0.9943,0.9947,0.9949,0.9952,0.9957,0.9962
-0.9964,0.9966,0.9970,0.9973,0.9975,0.9977,0.9979,0.9982,0.9986,0.9988
-0.9990,0.9991,0.9994,0.9995,0.9998,0.9999,1.0000,1.0000,1.0000,1.0000
-pwc1x1fract=0.0004,0.0006,0.0008,0.0010,0.0012,0.0015,0.0017,0.0021
-0.0025,0.0028,0.0031,0.0033,0.0036,0.0041,0.0045,0.0051,0.0060,0.0075
-0.0104,0.0138,0.0191,0.0265,0.0356,0.0463,0.0596,0.0743,0.0916,0.1114
-0.1316,0.1533,0.1757,0.1988,0.2209,0.2455,0.2689,0.2945,0.3196,0.3437
-0.3697,0.3950,0.4196,0.4448,0.4702,0.4953,0.5186,0.5416,0.5650,0.5877
-0.6099,0.6316,0.6519,0.6719,0.6909,0.7099,0.7277,0.7463,0.7645,0.7821
-0.7979,0.8154,0.8320,0.8477,0.8612,0.8740,0.8865,0.8973,0.9077,0.9161
-0.9234,0.9301,0.9351,0.9406,0.9454,0.9497,0.9531,0.9570,0.9605,0.9631
-0.9660,0.9690,0.9713,0.9728,0.9748,0.9762,0.9775,0.9786,0.9800,0.9807
-0.9818,0.9827,0.9833,0.9843,0.9849,0.9857,0.9861,0.9866,0.9871,0.9877
-0.9883,0.9887,0.9891,0.9895,0.9898,0.9901,0.9907,0.9913,0.9916,0.9918
-0.9921,0.9925,0.9929,0.9931,0.9935,0.9940,0.9944,0.9946,0.9949,0.9952
-0.9956,0.9960,0.9966,0.9968,0.9970,0.9972,0.9974,0.9976,0.9979,0.9980
-0.9984,0.9985,0.9988,0.9990,0.9991,0.9993,0.9996,0.9998,0.9999,1.0000
-pwc1v1fract=0.0002,0.0006,0.0008,0.0011,0.0013,0.0016,0.0019,0.0020
-0.0022,0.0025,0.0030,0.0035,0.0038,0.0042,0.0049,0.0057,0.0076,0.0103
-0.0149,0.0200,0.0273,0.0353,0.0455,0.0574,0.0719,0.0865,0.1045,0.1224
-0.1416,0.1630,0.1844,0.2074,0.2317,0.2555,0.2807,0.3046,0.3298,0.3553
-0.3826,0.4075,0.4316,0.4563,0.4823,0.5065,0.5315,0.5554,0.5781,0.6014
-0.6235,0.6434,0.6643,0.6853,0.7050,0.7238,0.7415,0.7602,0.7787,0.7975
-0.8152,0.8307,0.8456,0.8595,0.8723,0.8851,0.8957,0.9043,0.9126,0.9205
-0.9276,0.9330,0.9383,0.9437,0.9484,0.9521,0.9553,0.9582,0.9607,0.9634
-0.9657,0.9676,0.9701,0.9722,0.9738,0.9755,0.9767,0.9781,0.9794,0.9804
-0.9814,0.9825,0.9835,0.9842,0.9847,0.9853,0.9861,0.9866,0.9871,0.9878
-0.9882,0.9888,0.9891,0.9897,0.9900,0.9903,0.9909,0.9910,0.9917,0.9919
-0.9924,0.9929,0.9937,0.9939,0.9944,0.9948,0.9954,0.9956,0.9961,0.9966
-0.9968,0.9972,0.9974,0.9978,0.9980,0.9981,0.9984,0.9986,0.9989,0.9991
-0.9995,0.9996,0.9998,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000
-pwc1u2fract=0.0003,0.0004,0.0008,0.0011,0.0015,0.0018,0.0021,0.0024
-0.0027,0.0030,0.0033,0.0037,0.0039,0.0043,0.0046,0.0049,0.0059,0.0073
-0.0094,0.0129,0.0184,0.0267,0.0352,0.0446,0.0563,0.0707,0.0863,0.1030
-0.1206,0.1411,0.1629,0.1845,0.2087,0.2325,0.2578,0.2837,0.3091,0.3357
-0.3606,0.3867,0.4119,0.4362,0.4608,0.4857,0.5099,0.5349,0.5587,0.5814
-0.6047,0.6260,0.6480,0.6685,0.6892,0.7099,0.7282,0.7456,0.7643,0.7812
-0.7988,0.8141,0.8309,0.8454,0.8616,0.8738,0.8847,0.8955,0.9049,0.9133
-0.9199,0.9274,0.9341,0.9399,0.9445,0.9489,0.9529,0.9561,0.9593,0.9620
-0.9645,0.9667,0.9689,0.9701,0.9720,0.9740,0.9756,0.9771,0.9785,0.9796
-0.9808,0.9816,0.9823,0.9832,0.9839,0.9846,0.9854,0.9860,0.9867,0.9874
-0.9876,0.9881,0.9885,0.9889,0.9895,0.9900,0.9902,0.9907,0.9910,0.9916
-0.9919,0.9923,0.9927,0.9930,0.9934,0.9937,0.9942,0.9945,0.9949,0.9953
-0.9957,0.9962,0.9965,0.9968,0.9971,0.9973,0.9976,0.9979,0.9981,0.9984
-0.9986,0.9988,0.9989,0.9993,0.9995,0.9998,0.9999,0.9999,1.0000,1.0000
-pwc1x2fract=0.0002,0.0005,0.0008,0.0011,0.0014,0.0017,0.0021,0.0025
-0.0027,0.0031,0.0032,0.0034,0.0040,0.0045,0.0052,0.0065,0.0083,0.0112
-0.0150,0.0200,0.0264,0.0341,0.0435,0.0560,0.0701,0.0862,0.1027,0.1210
-0.1417,0.1628,0.1833,0.2069,0.2301,0.2547,0.2799,0.3062,0.3314,0.3582
-0.3860,0.4141,0.4390,0.4656,0.4903,0.5161,0.5410,0.5649,0.5874,0.6090
-0.6298,0.6507,0.6721,0.6923,0.7117,0.7312,0.7510,0.7706,0.7881,0.8052
-0.8204,0.8360,0.8525,0.8666,0.8793,0.8906,0.9019,0.9103,0.9194,0.9274
-0.9340,0.9397,0.9442,0.9483,0.9523,0.9557,0.9596,0.9625,0.9653,0.9678
-0.9698,0.9718,0.9732,0.9751,0.9768,0.9782,0.9793,0.9804,0.9813,0.9821
-0.9828,0.9834,0.9842,0.9848,0.9852,0.9857,0.9861,0.9864,0.9872,0.9877
-0.9880,0.9886,0.9889,0.9894,0.9898,0.9903,0.9908,0.9915,0.9921,0.9924
-0.9927,0.9930,0.9935,0.9939,0.9943,0.9945,0.9949,0.9952,0.9957,0.9960
-0.9963,0.9965,0.9967,0.9972,0.9975,0.9979,0.9980,0.9985,0.9987,0.9988
-0.9990,0.9991,0.9992,0.9995,0.9997,1.0000,1.0000,1.0000,1.0000,1.0000
-pwc1v2fract=0.0004,0.0006,0.0008,0.0012,0.0013,0.0016,0.0018,0.0021
-0.0024,0.0027,0.0029,0.0032,0.0036,0.0039,0.0043,0.0049,0.0063,0.0080
-0.0113,0.0155,0.0218,0.0300,0.0397,0.0508,0.0645,0.0793,0.0949,0.1135
-0.1343,0.1560,0.1786,0.2019,0.2250,0.2498,0.2756,0.3011,0.3270,0.3526
-0.3778,0.4042,0.4299,0.4570,0.4821,0.5077,0.5311,0.5540,0.5784,0.6010
-0.6219,0.6429,0.6633,0.6830,0.7023,0.7214,0.7403,0.7590,0.7786,0.7948
-0.8118,0.8288,0.8444,0.8587,0.8725,0.8842,0.8946,0.9044,0.9136,0.9208
-0.9264,0.9323,0.9377,0.9428,0.9472,0.9506,0.9541,0.9576,0.9602,0.9635
-0.9656,0.9675,0.9695,0.9715,0.9732,0.9751,0.9768,0.9777,0.9789,0.9802
-0.9809,0.9819,0.9828,0.9835,0.9841,0.9850,0.9858,0.9863,0.9866,0.9870
-0.9875,0.9880,0.9884,0.9888,0.9894,0.9899,0.9901,0.9905,0.9909,0.9912
-0.9917,0.9919,0.9922,0.9926,0.9931,0.9936,0.9941,0.9945,0.9951,0.9954
-0.9959,0.9962,0.9964,0.9967,0.9969,0.9971,0.9975,0.9978,0.9980,0.9983
-0.9986,0.9988,0.9991,0.9995,0.9998,0.9999,0.9999,0.9999,1.0000,1.0000
-
-pwc2u1fract=0.0002,0.0005,0.0009,0.0011,0.0015,0.0018,0.0022,0.0027
-0.0029,0.0033,0.0038,0.0044,0.0048,0.0051,0.0057,0.0070,0.0090,0.0121
-0.0167,0.0217,0.0282,0.0371,0.0467,0.0582,0.0723,0.0873,0.1038,0.1211
-0.1409,0.1609,0.1826,0.2060,0.2302,0.2542,0.2796,0.3043,0.3294,0.3555
-0.3819,0.4085,0.4343,0.4618,0.4890,0.5140,0.5384,0.5635,0.5880,0.6100
-0.6311,0.6522,0.6722,0.6928,0.7120,0.7316,0.7495,0.7684,0.7853,0.8026
-0.8191,0.8334,0.8491,0.8629,0.8771,0.8888,0.8994,0.9089,0.9170,0.9242
-0.9308,0.9364,0.9411,0.9457,0.9496,0.9538,0.9571,0.9602,0.9630,0.9654
-0.9679,0.9698,0.9718,0.9735,0.9750,0.9765,0.9778,0.9791,0.9804,0.9815
-0.9825,0.9833,0.9844,0.9851,0.9855,0.9862,0.9870,0.9874,0.9877,0.9883
-0.9889,0.9893,0.9895,0.9898,0.9901,0.9904,0.9910,0.9918,0.9923,0.9927
-0.9930,0.9935,0.9937,0.9941,0.9943,0.9947,0.9949,0.9952,0.9957,0.9962
-0.9964,0.9966,0.9970,0.9973,0.9975,0.9977,0.9979,0.9982,0.9986,0.9988
-0.9990,0.9991,0.9994,0.9995,0.9998,0.9999,1.0000,1.0000,1.0000,1.0000
-pwc2x1fract=0.0004,0.0006,0.0008,0.0010,0.0012,0.0015,0.0017,0.0021
-0.0025,0.0028,0.0031,0.0033,0.0036,0.0041,0.0045,0.0051,0.0060,0.0075
-0.0104,0.0138,0.0191,0.0265,0.0356,0.0463,0.0596,0.0743,0.0916,0.1114
-0.1316,0.1533,0.1757,0.1988,0.2209,0.2455,0.2689,0.2945,0.3196,0.3437
-0.3697,0.3950,0.4196,0.4448,0.4702,0.4953,0.5186,0.5416,0.5650,0.5877
-0.6099,0.6316,0.6519,0.6719,0.6909,0.7099,0.7277,0.7463,0.7645,0.7821
-0.7979,0.8154,0.8320,0.8477,0.8612,0.8740,0.8865,0.8973,0.9077,0.9161
-0.9234,0.9301,0.9351,0.9406,0.9454,0.9497,0.9531,0.9570,0.9605,0.9631
-0.9660,0.9690,0.9713,0.9728,0.9748,0.9762,0.9775,0.9786,0.9800,0.9807
-0.9818,0.9827,0.9833,0.9843,0.9849,0.9857,0.9861,0.9866,0.9871,0.9877
-0.9883,0.9887,0.9891,0.9895,0.9898,0.9901,0.9907,0.9913,0.9916,0.9918
-0.9921,0.9925,0.9929,0.9931,0.9935,0.9940,0.9944,0.9946,0.9949,0.9952
-0.9956,0.9960,0.9966,0.9968,0.9970,0.9972,0.9974,0.9976,0.9979,0.9980
-0.9984,0.9985,0.9988,0.9990,0.9991,0.9993,0.9996,0.9998,0.9999,1.0000
-pwc2v1fract=0.0002,0.0006,0.0008,0.0011,0.0013,0.0016,0.0019,0.0020
-0.0022,0.0025,0.0030,0.0035,0.0038,0.0042,0.0049,0.0057,0.0076,0.0103
-0.0149,0.0200,0.0273,0.0353,0.0455,0.0574,0.0719,0.0865,0.1045,0.1224
-0.1416,0.1630,0.1844,0.2074,0.2317,0.2555,0.2807,0.3046,0.3298,0.3553
-0.3826,0.4075,0.4316,0.4563,0.4823,0.5065,0.5315,0.5554,0.5781,0.6014
-0.6235,0.6434,0.6643,0.6853,0.7050,0.7238,0.7415,0.7602,0.7787,0.7975
-0.8152,0.8307,0.8456,0.8595,0.8723,0.8851,0.8957,0.9043,0.9126,0.9205
-0.9276,0.9330,0.9383,0.9437,0.9484,0.9521,0.9553,0.9582,0.9607,0.9634
-0.9657,0.9676,0.9701,0.9722,0.9738,0.9755,0.9767,0.9781,0.9794,0.9804
-0.9814,0.9825,0.9835,0.9842,0.9847,0.9853,0.9861,0.9866,0.9871,0.9878
-0.9882,0.9888,0.9891,0.9897,0.9900,0.9903,0.9909,0.9910,0.9917,0.9919
-0.9924,0.9929,0.9937,0.9939,0.9944,0.9948,0.9954,0.9956,0.9961,0.9966
-0.9968,0.9972,0.9974,0.9978,0.9980,0.9981,0.9984,0.9986,0.9989,0.9991
-0.9995,0.9996,0.9998,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000,1.0000
-pwc2u2fract=0.0003,0.0004,0.0008,0.0011,0.0015,0.0018,0.0021,0.0024
-0.0027,0.0030,0.0033,0.0037,0.0039,0.0043,0.0046,0.0049,0.0059,0.0073
-0.0094,0.0129,0.0184,0.0267,0.0352,0.0446,0.0563,0.0707,0.0863,0.1030
-0.1206,0.1411,0.1629,0.1845,0.2087,0.2325,0.2578,0.2837,0.3091,0.3357
-0.3606,0.3867,0.4119,0.4362,0.4608,0.4857,0.5099,0.5349,0.5587,0.5814
-0.6047,0.6260,0.6480,0.6685,0.6892,0.7099,0.7282,0.7456,0.7643,0.7812
-0.7988,0.8141,0.8309,0.8454,0.8616,0.8738,0.8847,0.8955,0.9049,0.9133
-0.9199,0.9274,0.9341,0.9399,0.9445,0.9489,0.9529,0.9561,0.9593,0.9620
-0.9645,0.9667,0.9689,0.9701,0.9720,0.9740,0.9756,0.9771,0.9785,0.9796
-0.9808,0.9816,0.9823,0.9832,0.9839,0.9846,0.9854,0.9860,0.9867,0.9874
-0.9876,0.9881,0.9885,0.9889,0.9895,0.9900,0.9902,0.9907,0.9910,0.9916
-0.9919,0.9923,0.9927,0.9930,0.9934,0.9937,0.9942,0.9945,0.9949,0.9953
-0.9957,0.9962,0.9965,0.9968,0.9971,0.9973,0.9976,0.9979,0.9981,0.9984
-0.9986,0.9988,0.9989,0.9993,0.9995,0.9998,0.9999,0.9999,1.0000,1.0000
-pwc2x2fract=0.0002,0.0005,0.0008,0.0011,0.0014,0.0017,0.0021,0.0025
-0.0027,0.0031,0.0032,0.0034,0.0040,0.0045,0.0052,0.0065,0.0083,0.0112
-0.0150,0.0200,0.0264,0.0341,0.0435,0.0560,0.0701,0.0862,0.1027,0.1210
-0.1417,0.1628,0.1833,0.2069,0.2301,0.2547,0.2799,0.3062,0.3314,0.3582
-0.3860,0.4141,0.4390,0.4656,0.4903,0.5161,0.5410,0.5649,0.5874,0.6090
-0.6298,0.6507,0.6721,0.6923,0.7117,0.7312,0.7510,0.7706,0.7881,0.8052
-0.8204,0.8360,0.8525,0.8666,0.8793,0.8906,0.9019,0.9103,0.9194,0.9274
-0.9340,0.9397,0.9442,0.9483,0.9523,0.9557,0.9596,0.9625,0.9653,0.9678
-0.9698,0.9718,0.9732,0.9751,0.9768,0.9782,0.9793,0.9804,0.9813,0.9821
-0.9828,0.9834,0.9842,0.9848,0.9852,0.9857,0.9861,0.9864,0.9872,0.9877
-0.9880,0.9886,0.9889,0.9894,0.9898,0.9903,0.9908,0.9915,0.9921,0.9924
-0.9927,0.9930,0.9935,0.9939,0.9943,0.9945,0.9949,0.9952,0.9957,0.9960
-0.9963,0.9965,0.9967,0.9972,0.9975,0.9979,0.9980,0.9985,0.9987,0.9988
-0.9990,0.9991,0.9992,0.9995,0.9997,1.0000,1.0000,1.0000,1.0000,1.0000
-pwc2v2fract=0.0004,0.0006,0.0008,0.0012,0.0013,0.0016,0.0018,0.0021
-0.0024,0.0027,0.0029,0.0032,0.0036,0.0039,0.0043,0.0049,0.0063,0.0080
-0.0113,0.0155,0.0218,0.0300,0.0397,0.0508,0.0645,0.0793,0.0949,0.1135
-0.1343,0.1560,0.1786,0.2019,0.2250,0.2498,0.2756,0.3011,0.3270,0.3526
-0.3778,0.4042,0.4299,0.4570,0.4821,0.5077,0.5311,0.5540,0.5784,0.6010
-0.6219,0.6429,0.6633,0.6830,0.7023,0.7214,0.7403,0.7590,0.7786,0.7948
-0.8118,0.8288,0.8444,0.8587,0.8725,0.8842,0.8946,0.9044,0.9136,0.9208
-0.9264,0.9323,0.9377,0.9428,0.9472,0.9506,0.9541,0.9576,0.9602,0.9635
-0.9656,0.9675,0.9695,0.9715,0.9732,0.9751,0.9768,0.9777,0.9789,0.9802
-0.9809,0.9819,0.9828,0.9835,0.9841,0.9850,0.9858,0.9863,0.9866,0.9870
-0.9875,0.9880,0.9884,0.9888,0.9894,0.9899,0.9901,0.9905,0.9909,0.9912
-0.9917,0.9919,0.9922,0.9926,0.9931,0.9936,0.9941,0.9945,0.9951,0.9954
-0.9959,0.9962,0.9964,0.9967,0.9969,0.9971,0.9975,0.9978,0.9980,0.9983
-0.9986,0.9988,0.9991,0.9995,0.9998,0.9999,0.9999,0.9999,1.0000,1.0000
-
-;
-; Not sure why this is here
-; Makes the analyzer happy
-pdc_2_zpos = 0, 0
\ No newline at end of file
diff --git a/PARAM/SHMS/DC/pdc_test_stand.param b/PARAM/SHMS/DC/pdc_test_stand.param
new file mode 100644
index 0000000000000000000000000000000000000000..842f6f366f198c1c20c2190b7543b16ac1fde99e
--- /dev/null
+++ b/PARAM/SHMS/DC/pdc_test_stand.param
@@ -0,0 +1 @@
+psel_using_scin = 0
\ No newline at end of file
diff --git a/PARAM/TRIG/tshms.param b/PARAM/TRIG/tshms.param
new file mode 100644
index 0000000000000000000000000000000000000000..d30f2aca4242fc798921629daa3b670c768bfd63
--- /dev/null
+++ b/PARAM/TRIG/tshms.param
@@ -0,0 +1,8 @@
+t_shms_numAdc = 3
+t_shms_numTdc = 22
+
+; bar num:            1       2       3
+t_shms_adcNames = "pAERSUM pHGCSUM pNGCSUM"
+
+; bar num:          1   2   3   4   5   6   7   8   9     10      11      12      13     14      15      16      17      18      19      20      21       22
+t_shms_tdcNames = "pT1 pT2 p1X p1Y p2X p2Y p1T p2T pT3 pAERSUM pHGCSUM pNGCSUM pDCREF1 pDCREF2 pDCREF3 pDCREF4 pDCREF5 pDCREF6 pDCREF7 pDCREF8 pDCREF9 pDCREF10" 
\ No newline at end of file
diff --git a/SCRIPTS/HMS/replay_hcal_test_stand.C b/SCRIPTS/HMS/replay_hcal_test_stand.C
index f4b42da6333147beb89091e1d9695d6e1bfe3ecc..5e0eeeea7a4049dc4f456167cd1a9139ed1d9b68 100644
--- a/SCRIPTS/HMS/replay_hcal_test_stand.C
+++ b/SCRIPTS/HMS/replay_hcal_test_stand.C
@@ -16,8 +16,8 @@ void replay_hcal_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   }
 
   // Create file name patterns.
-  const char* RunFileNamePattern = "raw/hms_all_000%d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/test_%d.root";
+  const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
+  const char* ROOTFileNamePattern = "ROOTfiles/hms_hcal_replay_%d.root";
   // Add variables to global list.
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
   gHcParms->AddString("g_ctp_database_filename", "DBASE/standard.database");
diff --git a/SCRIPTS/HMS/replay_hdc_test_stand.C b/SCRIPTS/HMS/replay_hdc_test_stand.C
index 12de01928212d263036af7b6c63c38e9572cc60e..96453ca90823870f1f5d7d7403bade17b908c167 100644
--- a/SCRIPTS/HMS/replay_hdc_test_stand.C
+++ b/SCRIPTS/HMS/replay_hdc_test_stand.C
@@ -18,7 +18,7 @@ void replay_hdc_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   // Create file name patterns.
   //const char* RunFileNamePattern = "raw/test_%d.dat"
   //const char* RunFileNamePattern = "raw/hms_dc_000%d.dat";
-  const char* RunFileNamePattern = "raw/hms_all_000%d.dat";
+  const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
   const char* ROOTFileNamePattern = "ROOTfiles/test_%d.root";
   // Add variables to global list.
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
diff --git a/SCRIPTS/HMS/replay_hhodo_test_stand.C b/SCRIPTS/HMS/replay_hhodo_test_stand.C
index 729cf6212c2cc419276558db651f4036511fa778..9f240f42d51eb451076895f5ad5228e2197dcfb4 100644
--- a/SCRIPTS/HMS/replay_hhodo_test_stand.C
+++ b/SCRIPTS/HMS/replay_hhodo_test_stand.C
@@ -16,7 +16,7 @@ void replay_hhodo_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   }
 
   // Create file name patterns.
-  const char* RunFileNamePattern = "raw/hms_all_00%d.dat";
+  const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
   const char* ROOTFileNamePattern = "ROOTfiles/hhodo_htrig_replay_%d.root";
   // Add variables to global list.
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
diff --git a/SCRIPTS/HMS/replay_htrig_test_stand.C b/SCRIPTS/HMS/replay_htrig_test_stand.C
index 3c4a688042ec0aa270d4d4795ab216b1410d214f..77b0ce8c0d3020ed0400faf51f87644ed0b7ba92 100644
--- a/SCRIPTS/HMS/replay_htrig_test_stand.C
+++ b/SCRIPTS/HMS/replay_htrig_test_stand.C
@@ -16,8 +16,8 @@ void replay_htrig_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   }
 
   // Create file name patterns.
-  const char* RunFileNamePattern = "raw/hms_all_000%d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/test_%d.root";
+  const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
+  const char* ROOTFileNamePattern = "ROOTfiles/hms_htrig_replay_%d.root";
   // Add variables to global list.
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
   gHcParms->AddString("g_ctp_database_filename", "DBASE/standard.database");
diff --git a/SCRIPTS/SHMS/replay_pcal_test_stand.C b/SCRIPTS/SHMS/replay_pcal_test_stand.C
new file mode 100644
index 0000000000000000000000000000000000000000..161eeeac9bea570b4dbc0370b46ee84ba67c7030
--- /dev/null
+++ b/SCRIPTS/SHMS/replay_pcal_test_stand.C
@@ -0,0 +1,90 @@
+void replay_pcal_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
+
+  // Get RunNumber and MaxEvent if not provided.
+  if(RunNumber == 0) {
+    cout << "Enter a Run Number (-1 to exit): ";
+    cin >> RunNumber;
+    if( RunNumber<=0 ) return;
+  }
+  if(MaxEvent == 0) {
+    cout << "\nNumber of Events to analyze: ";
+    cin >> MaxEvent;
+    if(MaxEvent == 0) {
+      cerr << "...Invalid entry\n";
+      exit;
+    }
+  }
+
+  // Create file name patterns.
+  const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
+  const char* ROOTFileNamePattern = "ROOTfiles/shms_pcal_replay_%d.root";
+  // Add variables to global list.
+  gHcParms->Define("gen_run_number", "Run Number", RunNumber);
+  gHcParms->AddString("g_ctp_database_filename", "DBASE/standard.database");
+
+  // Load varibles from files to global list.
+  gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber);
+
+  // g_ctp_parm_filename and g_decode_map_filename should now be defined.
+  gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber);
+  gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename"));
+
+  // Load the Hall C style detector map
+  gHcDetectorMap = new THcDetectorMap();
+  gHcDetectorMap->Load("MAPS/SHMS/DETEC/pcal.map");
+  
+  // Set up the equipment to be analyzed.
+  THaApparatus* SHMS = new THcHallCSpectrometer("P", "SHMS");
+  gHaApps->Add(SHMS);
+  // Add hodoscope to HMS apparatus
+  THcShower* cal = new THcShower("cal", "Calorimeter");
+  SHMS->AddDetector(cal);
+
+  // Set up the analyzer - we use the standard one,
+  // but this could be an experiment-specific one as well.
+  // The Analyzer controls the reading of the data, executes
+  // tests/cuts, loops over Acpparatus's and PhysicsModules,
+  // and executes the output routines.
+  THcAnalyzer* analyzer = new THcAnalyzer;
+
+  // A simple event class to be output to the resulting tree.
+  // Creating your own descendant of THaEvent is one way of
+  // defining and controlling the output.
+  THaEvent* event = new THaEvent;
+
+  // Define the run(s) that we want to analyze.
+  // We just set up one, but this could be many.
+  char RunFileName[100];
+  sprintf(RunFileName, RunFileNamePattern, RunNumber);
+  THaRun* run = new THaRun(RunFileName);
+
+  // Eventually need to learn to skip over, or properly analyze
+  // the pedestal events
+  run->SetEventRange(1, MaxEvent);    // Physics Event number, does not
+                                      // include scaler or control events.
+  run->SetNscan(1);
+  run->SetDataRequired(0x7);
+  run->Print();
+
+  // Define the analysis parameters
+  TString ROOTFileName = Form(ROOTFileNamePattern, RunNumber);
+  analyzer->SetCountMode(2);    // 0 = counter is # of physics triggers
+                                // 1 = counter is # of all decode reads
+                                // 2 = counter is event number
+ analyzer->SetEvent(event);
+ analyzer->SetCrateMapFileName("MAPS/db_cratemap.dat");
+ analyzer->SetOutFile(ROOTFileName.Data());
+ analyzer->SetOdefFile("DEF-files/SHMS/CAL/pcalana.def");
+ analyzer->SetCutFile("DEF-files/SHMS/CAL/pcalana_cuts.def");    // optional
+
+ // File to record cuts accounting information
+ //analyzer->SetSummaryFile("summary_example.log");    // optional
+
+  // Start the actual analysis.
+  analyzer->Process(run);
+  // Create report file from template.
+  //analyzer->PrintReport(    // optional
+  //  "TEMPLATES/dcana.template",
+  //  Form("REPORT_OUTPUT/replay_hms_%05d.report", RunNumber)
+  //);
+}
diff --git a/SCRIPTS/SHMS/replay_pdc_test_stand.C b/SCRIPTS/SHMS/replay_pdc_test_stand.C
index 1cb393425eb347c0739dc288c9136ae66a120909..0db32feb83266574d889786f6ea32e57b600fe46 100644
--- a/SCRIPTS/SHMS/replay_pdc_test_stand.C
+++ b/SCRIPTS/SHMS/replay_pdc_test_stand.C
@@ -16,7 +16,7 @@ void replay_pdc_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   }
 
   // Create file name patterns.
-  const char* RunFileNamePattern = "raw/shms_dc_00%d.dat";
+  const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
   const char* ROOTFileNamePattern = "ROOTfiles/shms_dc_00%d.root";
   // Add variables to global list.
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
@@ -29,6 +29,9 @@ void replay_pdc_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber);
   gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename"));
 
+  // Load params for HMS DC test stand configuration
+  gHcParms->Load("PARAM/SHMS/DC/pdc_test_stand.param");
+
   gHcDetectorMap = new THcDetectorMap();
   //gHcDetectorMap->Load(gHcParms->GetString("g_decode_map_filename"));
   gHcDetectorMap->Load("MAPS/SHMS/DETEC/pdc.map");
diff --git a/SCRIPTS/SHMS/replay_phodo_test_stand.C b/SCRIPTS/SHMS/replay_phodo_test_stand.C
index c93c5096b2bf2ab33a43eaf654333cc100c4b480..3827cba166e0d4d4d41605d18c158bf1ac7e6c38 100644
--- a/SCRIPTS/SHMS/replay_phodo_test_stand.C
+++ b/SCRIPTS/SHMS/replay_phodo_test_stand.C
@@ -16,7 +16,7 @@ void replay_phodo_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   }
 
   // Create file name patterns.
-  const char* RunFileNamePattern = "raw/shms_all_00%d.dat";
+  const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
   const char* ROOTFileNamePattern = "ROOTfiles/phodo_replay_%d.root";
   // Add variables to global list.
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
@@ -29,12 +29,12 @@ void replay_phodo_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber);
   gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename"));
 
-  // // Load params for HMS trigger configuration
-  // gHcParms->Load("PARAM/TRIG/thms.param");
+  // Load params for HMS trigger configuration
+  gHcParms->Load("PARAM/TRIG/tshms.param");
 
   // Load the Hall C style detector map
   gHcDetectorMap = new THcDetectorMap();
-  gHcDetectorMap->Load("MAPS/SHMS/DETEC/phodo.map");
+  gHcDetectorMap->Load("MAPS/SHMS/DETEC/phodo_ptrig.map");
   
   // Set up the equipment to be analyzed.
   THaApparatus* SHMS = new THcHallCSpectrometer("P", "SHMS");
@@ -43,12 +43,12 @@ void replay_phodo_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
   THcHodoscope* hod = new THcHodoscope("hod", "Hodoscope");
   SHMS->AddDetector(hod);
 
-  // // Add trigger apparatus
-  // THaApparatus* TRG = new THcTrigApp("T", "TRG");
-  // gHaApps->Add(TRG);
-  // // Add trigger detector to trigger apparatus
-  // THcTrigDet* hms = new THcTrigDet("hms", "HMS Trigger Information");
-  // TRG->AddDetector(hms);
+  // Add trigger apparatus
+  THaApparatus* TRG = new THcTrigApp("T", "TRG");
+  gHaApps->Add(TRG);
+  // Add trigger detector to trigger apparatus
+  THcTrigDet* shms = new THcTrigDet("shms", "SHMS Trigger Information");
+  TRG->AddDetector(shms);
 
   // Set up the analyzer - we use the standard one,
   // but this could be an experiment-specific one as well.
diff --git a/SCRIPTS/SHMS/replay_ptrig_test_stand.C b/SCRIPTS/SHMS/replay_ptrig_test_stand.C
new file mode 100644
index 0000000000000000000000000000000000000000..2c83591e7f7e08f508e01107cb39263c5d2bef7e
--- /dev/null
+++ b/SCRIPTS/SHMS/replay_ptrig_test_stand.C
@@ -0,0 +1,93 @@
+void replay_ptrig_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
+
+  // Get RunNumber and MaxEvent if not provided.
+  if(RunNumber == 0) {
+    cout << "Enter a Run Number (-1 to exit): ";
+    cin >> RunNumber;
+    if( RunNumber<=0 ) return;
+  }
+  if(MaxEvent == 0) {
+    cout << "\nNumber of Events to analyze: ";
+    cin >> MaxEvent;
+    if(MaxEvent == 0) {
+      cerr << "...Invalid entry\n";
+      exit;
+    }
+  }
+
+  // Create file name patterns.
+  const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
+  const char* ROOTFileNamePattern = "ROOTfiles/shms_ptrig_replay_%d.root";
+  // Add variables to global list.
+  gHcParms->Define("gen_run_number", "Run Number", RunNumber);
+  gHcParms->AddString("g_ctp_database_filename", "DBASE/standard.database");
+
+  // Load varibles from files to global list.
+  gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber);
+
+  // g_ctp_parm_filename and g_decode_map_filename should now be defined.
+  gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber);
+  gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename"));
+
+  // Load params for HMS DC test stand configuration
+  gHcParms->Load("PARAM/TRIG/tshms.param");
+
+  // Load the Hall C style detector map
+  gHcDetectorMap = new THcDetectorMap();
+  gHcDetectorMap->Load("MAPS/SHMS/DETEC/ptrig.map");
+
+  // Add trigger apparatus
+  THaApparatus* TRG = new THcTrigApp("T", "TRG");
+  gHaApps->Add(TRG);
+  // Add trigger detector to trigger apparatus
+  THcTrigDet* shms = new THcTrigDet("shms", "SHMS Trigger Information");
+  TRG->AddDetector(shms);
+  
+  // Set up the analyzer - we use the standard one,
+  // but this could be an experiment-specific one as well.
+  // The Analyzer controls the reading of the data, executes
+  // tests/cuts, loops over Acpparatus's and PhysicsModules,
+  // and executes the output routines.
+  THcAnalyzer* analyzer = new THcAnalyzer;
+
+  // A simple event class to be output to the resulting tree.
+  // Creating your own descendant of THaEvent is one way of
+  // defining and controlling the output.
+  THaEvent* event = new THaEvent;
+
+  // Define the run(s) that we want to analyze.
+  // We just set up one, but this could be many.
+  char RunFileName[100];
+  sprintf(RunFileName, RunFileNamePattern, RunNumber);
+  THaRun* run = new THaRun(RunFileName);
+
+  // Eventually need to learn to skip over, or properly analyze
+  // the pedestal events
+  run->SetEventRange(1, MaxEvent);    // Physics Event number, does not
+                                      // include scaler or control events.
+  run->SetNscan(1);
+  run->SetDataRequired(0x7);
+  run->Print();
+
+  // Define the analysis parameters
+  TString ROOTFileName = Form(ROOTFileNamePattern, RunNumber);
+  analyzer->SetCountMode(2);    // 0 = counter is # of physics triggers
+                                // 1 = counter is # of all decode reads
+                                // 2 = counter is event number
+ analyzer->SetEvent(event);
+ analyzer->SetCrateMapFileName("MAPS/db_cratemap.dat");
+ analyzer->SetOutFile(ROOTFileName.Data());
+ analyzer->SetOdefFile("DEF-files/SHMS/TRIG/ptrigana.def");
+ analyzer->SetCutFile("DEF-files/SHMS/TRIG/ptrigana_cuts.def");    // optional
+
+ // File to record cuts accounting information
+ //analyzer->SetSummaryFile("summary_example.log");    // optional
+
+  // Start the actual analysis.
+  analyzer->Process(run);
+  // Create report file from template.
+  //analyzer->PrintReport(    // optional
+  //  "TEMPLATES/dcana.template",
+  //  Form("REPORT_OUTPUT/replay_hms_%05d.report", RunNumber)
+  //);
+}