diff --git a/DEF-files/HMS/GEN/hstackana.def b/DEF-files/HMS/GEN/hstackana.def
index 3e849f4aa25a24008e66eee37bde95fac58f2a16..35c5ac18f35c2b9864afb90b6fa9a3eab17b754e 100644
--- a/DEF-files/HMS/GEN/hstackana.def
+++ b/DEF-files/HMS/GEN/hstackana.def
@@ -1,22 +1,22 @@
 # See $ANALYZER/examples/output_example.def for examples
 #
-#block T.hms.*
+block T.hms.*
 block H.dc.*
 block H.tr.*
-#block H.hod.*
-#block H.cer.*
-#block H.cal.*
+block H.hod.*
+block H.cer.*
+block H.cal.*
 block H.gtr.*
 
-TH1D hhdc_resid_1 '' H.dc.residual[0] 200 -1.0 1.0 
-TH1D hhdc_resid_2 '' H.dc.residual[1] 200 -1.0 1.0 
-TH1D hhdc_resid_3 '' H.dc.residual[2] 200 -1.0 1.0 
-TH1D hhdc_resid_4 '' H.dc.residual[3] 200 -1.0 1.0 
-TH1D hhdc_resid_5 '' H.dc.residual[4] 200 -1.0 1.0 
-TH1D hhdc_resid_6 '' H.dc.residual[5] 200 -1.0 1.0 
-TH1D hhdc_resid_7 '' H.dc.residual[6] 200 -1.0 1.0 
-TH1D hhdc_resid_8 '' H.dc.residual[7] 200 -1.0 1.0 
-TH1D hhdc_resid_9 '' H.dc.residual[8] 200 -1.0 1.0 
-TH1D hhdc_resid_10 '' H.dc.residual[9] 200 -1.0 1.0 
-TH1D hhdc_resid_11 '' H.dc.residual[10] 200 -1.0 1.0 
-TH1D hhdc_resid_12 '' H.dc.residual[11] 200 -1.0 1.0
\ No newline at end of file
+TH1D hhdc_resid_1 '' H.dc.residual[0] 200 -1.0 1.0
+TH1D hhdc_resid_2 '' H.dc.residual[1] 200 -1.0 1.0
+TH1D hhdc_resid_3 '' H.dc.residual[2] 200 -1.0 1.0
+TH1D hhdc_resid_4 '' H.dc.residual[3] 200 -1.0 1.0
+TH1D hhdc_resid_5 '' H.dc.residual[4] 200 -1.0 1.0
+TH1D hhdc_resid_6 '' H.dc.residual[5] 200 -1.0 1.0
+TH1D hhdc_resid_7 '' H.dc.residual[6] 200 -1.0 1.0
+TH1D hhdc_resid_8 '' H.dc.residual[7] 200 -1.0 1.0
+TH1D hhdc_resid_9 '' H.dc.residual[8] 200 -1.0 1.0
+TH1D hhdc_resid_10 '' H.dc.residual[9] 200 -1.0 1.0
+TH1D hhdc_resid_11 '' H.dc.residual[10] 200 -1.0 1.0
+TH1D hhdc_resid_12 '' H.dc.residual[11] 200 -1.0 1.0
diff --git a/PARAM/HMS/GEN/hgoldtrack.param b/PARAM/HMS/GEN/hgoldtrack.param
index 48f62c1f26d5a0a487940a1ac8fb1c9555eb25a2..80f2f7484e8ccaa15de1356e83226ec152ec7367 100644
--- a/PARAM/HMS/GEN/hgoldtrack.param
+++ b/PARAM/HMS/GEN/hgoldtrack.param
@@ -5,12 +5,12 @@ hmin_combos = 3, 3
 
 hstub_max_xpdiff = 0.5
 
-hsingle_stub = 1
+hsingle_stub = 0
 
 hxloscin  = 1, 1
 hxhiscin  = 16, 16
 hyloscin  = 1, 1
-hyhiscin  = 10, 10 
+hyhiscin  = 10, 10
 
 htrack_eff_test_num_scin_planes = 2
 
@@ -19,5 +19,3 @@ hdc_tdc_min_win = -55000,-55000,-55000,-55000,-55000,-55000
 
 hdc_tdc_max_win = 55000,55000,55000,55000,55000,55000
                   55000,55000,55000,55000,55000,55000
-
-
diff --git a/SCRIPTS/HMS/replay_hcal_test_stand.C b/SCRIPTS/HMS/replay_hcal_test_stand.C
index c5b4b82ec8858f78a559c61906b20448db1141ce..244ee4917c83a2207daab27d4393f94fd54a85ee 100644
--- a/SCRIPTS/HMS/replay_hcal_test_stand.C
+++ b/SCRIPTS/HMS/replay_hcal_test_stand.C
@@ -17,7 +17,7 @@ void replay_hcal_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/hms_hcal_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/hcal_replay_%05d.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_hcer_test_stand.C b/SCRIPTS/HMS/replay_hcer_test_stand.C
index 83c5024494e91bb8089f0ee324b97c6487badd9a..dfea06699872c857d823790a09ce59755bc8e58c 100644
--- a/SCRIPTS/HMS/replay_hcer_test_stand.C
+++ b/SCRIPTS/HMS/replay_hcer_test_stand.C
@@ -17,7 +17,7 @@ void replay_hcer_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/hcer_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/hcer_replay_%05d.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 6128bf52742cc740c73b5ee90a26b70356412bb4..a00a56f64e6cebc49b9f3d79e59262cd6a6caa0f 100644
--- a/SCRIPTS/HMS/replay_hdc_test_stand.C
+++ b/SCRIPTS/HMS/replay_hdc_test_stand.C
@@ -16,10 +16,8 @@ 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_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/hms_dc_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/hdc_replay_%05d.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_hhodo_test_stand.C b/SCRIPTS/HMS/replay_hhodo_test_stand.C
index 4c01e0496f82161fa1a0e7e0799cfd60cc19f4ef..5cf45826d4ac51aaf1a1bd9c7a8b918986e13435 100644
--- a/SCRIPTS/HMS/replay_hhodo_test_stand.C
+++ b/SCRIPTS/HMS/replay_hhodo_test_stand.C
@@ -17,7 +17,7 @@ void replay_hhodo_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/hhodo_htrig_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/hhodo_replay_%05d.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_hms.C b/SCRIPTS/HMS/replay_hms.C
index 4bd644d32480aba66a199831437f0cd9625f423e..70b75f3a3f0012c6301b3039ddd6e21b959f6d3f 100644
--- a/SCRIPTS/HMS/replay_hms.C
+++ b/SCRIPTS/HMS/replay_hms.C
@@ -17,7 +17,7 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/hms_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/hms_replay_%05d.root";
   // Add variables to global list.
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
   gHcParms->AddString("g_ctp_database_filename", "DBASE/standard.database");
@@ -45,7 +45,7 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
   // Add trigger detector to trigger apparatus
   THcTrigDet* hms = new THcTrigDet("hms", "HMS Trigger Information");
   TRG->AddDetector(hms);
-  
+
   // Set up the equipment to be analyzed.
   THaApparatus* HMS = new THcHallCSpectrometer("H", "HMS");
   gHaApps->Add(HMS);
@@ -65,7 +65,11 @@ void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
   // Include golden track information
   THaGoldenTrack* gtr = new THaGoldenTrack("H.gtr", "HMS Golden Track", "H");
   gHaPhysics->Add(gtr);
-  
+
+  // Add handler for prestart event 125.
+  THcConfigEvtHandler* ev125 = new THcConfigEvtHandler("HC", "Config Event type 125");
+  gHaEvtHandlers->Add(ev125);
+
   // 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
diff --git a/SCRIPTS/HMS/replay_htrig_test_stand.C b/SCRIPTS/HMS/replay_htrig_test_stand.C
index 9800130501586948304cffcd4180e8514d4a9967..f5b7de21b18cc965f8bcd4bf9d73402d56954237 100644
--- a/SCRIPTS/HMS/replay_htrig_test_stand.C
+++ b/SCRIPTS/HMS/replay_htrig_test_stand.C
@@ -17,7 +17,7 @@ void replay_htrig_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/hms_htrig_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/htrig_replay_%05d.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_paero_test_stand.C b/SCRIPTS/SHMS/replay_paero_test_stand.C
index aabfbfa8befcb226d6a4a308a18d26f125716d35..75bef804e3e54bedbcc671585b4a99cc05e23ee4 100644
--- a/SCRIPTS/SHMS/replay_paero_test_stand.C
+++ b/SCRIPTS/SHMS/replay_paero_test_stand.C
@@ -17,7 +17,7 @@ void replay_paero_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/paero_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/paero_replay_%05d.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
index 17abdea4500929a0599ccfd02473213c22727edc..f05a41d845246d2c6dcbfa96f8ed7ca6954d04a0 100644
--- a/SCRIPTS/SHMS/replay_pcal_test_stand.C
+++ b/SCRIPTS/SHMS/replay_pcal_test_stand.C
@@ -17,7 +17,7 @@ void replay_pcal_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/shms_pcal_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/pcal_replay_%05d.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_pdc_test_stand.C b/SCRIPTS/SHMS/replay_pdc_test_stand.C
index 0b1e8c7517decd18aa425b11f4cda027a8588ade..0ee247aa42d023519f6a33c8c49961f48cc19f08 100644
--- a/SCRIPTS/SHMS/replay_pdc_test_stand.C
+++ b/SCRIPTS/SHMS/replay_pdc_test_stand.C
@@ -17,7 +17,7 @@ void replay_pdc_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/shms_dc_00%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/pdc_replay_%05d.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_phgcer_test_stand.C b/SCRIPTS/SHMS/replay_phgcer_test_stand.C
index 53e1a432093aeba76eaf2051140fbfcf425ec591..70b7d1be6a72f51e4db1f6ce6972ea9c8ba88cce 100644
--- a/SCRIPTS/SHMS/replay_phgcer_test_stand.C
+++ b/SCRIPTS/SHMS/replay_phgcer_test_stand.C
@@ -17,7 +17,7 @@ void replay_phgcer_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/phgcer_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/phgcer_replay_%05d.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_phodo_test_stand.C b/SCRIPTS/SHMS/replay_phodo_test_stand.C
index 4ce629fc2bfcf094879e0c9d7ea5441f9adbedb2..01b08eecbf847be5765cf950aa6f1bef93eab427 100644
--- a/SCRIPTS/SHMS/replay_phodo_test_stand.C
+++ b/SCRIPTS/SHMS/replay_phodo_test_stand.C
@@ -17,7 +17,7 @@ void replay_phodo_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/phodo_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/phodo_replay_%05d.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_pngcer_test_stand.C b/SCRIPTS/SHMS/replay_pngcer_test_stand.C
index 5efeae369abc871ab96dca1419bb078742d9742e..5f8147f8bd43bee743f3b7d5e67fa058ea676abc 100644
--- a/SCRIPTS/SHMS/replay_pngcer_test_stand.C
+++ b/SCRIPTS/SHMS/replay_pngcer_test_stand.C
@@ -17,7 +17,7 @@ void replay_pngcer_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/pngcer_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/pngcer_replay_%05d.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_ptrig_test_stand.C b/SCRIPTS/SHMS/replay_ptrig_test_stand.C
index fabb4601fcbe30e2d53696e6d0ead946cd5db5d7..7835cde9da6fa13f937c92f34f92e39b461ee9e5 100644
--- a/SCRIPTS/SHMS/replay_ptrig_test_stand.C
+++ b/SCRIPTS/SHMS/replay_ptrig_test_stand.C
@@ -17,7 +17,7 @@ void replay_ptrig_test_stand(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/shms_ptrig_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/ptrig_replay_%05d.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_shms.C b/SCRIPTS/SHMS/replay_shms.C
index 017649963c702e616da4445eb9974e9b2e0a57b1..d4064a32c5edd1b0f1d7d78e02bd117a2ecac09f 100644
--- a/SCRIPTS/SHMS/replay_shms.C
+++ b/SCRIPTS/SHMS/replay_shms.C
@@ -17,7 +17,7 @@ void replay_shms(Int_t RunNumber=0, Int_t MaxEvent=0) {
 
   // Create file name patterns.
   const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
-  const char* ROOTFileNamePattern = "ROOTfiles/shms_replay_%d.root";
+  const char* ROOTFileNamePattern = "ROOTfiles/shms_replay_%05d.root";
   // Add variables to global list.
   gHcParms->Define("gen_run_number", "Run Number", RunNumber);
   gHcParms->AddString("g_ctp_database_filename", "DBASE/standard.database");
@@ -45,7 +45,7 @@ void replay_shms(Int_t RunNumber=0, Int_t MaxEvent=0) {
   // Add trigger detector to trigger apparatus
   THcTrigDet* shms = new THcTrigDet("shms", "SHMS Trigger Information");
   TRG->AddDetector(shms);
-  
+
   // Set up the equipment to be analyzed.
   THaApparatus* SHMS = new THcHallCSpectrometer("P", "SHMS");
   gHaApps->Add(SHMS);
@@ -71,7 +71,11 @@ void replay_shms(Int_t RunNumber=0, Int_t MaxEvent=0) {
   // Include golden track information
   THaGoldenTrack* gtr = new THaGoldenTrack("P.gtr", "SHMS Golden Track", "P");
   gHaPhysics->Add(gtr);
-  
+
+  // Add handler for prestart event 125.
+  THcConfigEvtHandler* ev125 = new THcConfigEvtHandler("HC", "Config Event type 125");
+  gHaEvtHandlers->Add(ev125);
+
   // 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