From e2891017ac4873c989783a00347070b6ed0877a9 Mon Sep 17 00:00:00 2001
From: Eric Pooser <pooser@jlab.org>
Date: Wed, 3 Jan 2018 14:39:37 -0500
Subject: [PATCH] Coin work (#349)

* Update coin kinematics db

* Include coincidence event types

* Add event type summary

* Add single arm coincidence replays
---
 DBASE/COIN/STD/standard.kinematics            |  75 +++++-
 .../COIN/PRODUCTION/coin_production_cuts.def  |  24 +-
 .../PRODUCTION/hstackana_production_cuts.def  |  25 +-
 .../PRODUCTION/pstackana_production_cuts.def  |  25 +-
 .../PRODUCTION/replay_production_hms_coin.C   | 159 +++++++++++++
 .../PRODUCTION/replay_production_shms_coin.C  | 164 +++++++++++++
 .../COIN/PRODUCTION/coin_production.template  |   5 +-
 .../HMS/PRODUCTION/hms_coin_production.cfg    | 191 ++++++++++++++++
 .../SHMS/PRODUCTION/shms_coin_production.cfg  | 216 ++++++++++++++++++
 9 files changed, 852 insertions(+), 32 deletions(-)
 create mode 100644 SCRIPTS/HMS/PRODUCTION/replay_production_hms_coin.C
 create mode 100644 SCRIPTS/SHMS/PRODUCTION/replay_production_shms_coin.C
 create mode 100644 onlineGUI/CONFIG/HMS/PRODUCTION/hms_coin_production.cfg
 create mode 100644 onlineGUI/CONFIG/SHMS/PRODUCTION/shms_coin_production.cfg

diff --git a/DBASE/COIN/STD/standard.kinematics b/DBASE/COIN/STD/standard.kinematics
index 507b9516..570db40a 100644
--- a/DBASE/COIN/STD/standard.kinematics
+++ b/DBASE/COIN/STD/standard.kinematics
@@ -1,10 +1,11 @@
 #
 # Need to set htheta_lab to a NEGATIVE value
 # Need to set ptheta_lab to a POSITIVE value
-# 1h gtargmass_amu=1.00794
-# 12C gtargmass_amu=12.0107
-# 27Al gtargmass_amu=26.98
+# 1H   gtargmass_amu = 1.00794
+# 12C  gtargmass_amu = 12.0107
+# 27Al gtargmass_amu = 26.98
 #
+
 0-99999
 gpbeam = 6.4
 gtargmass_amu=12.0107
@@ -14,3 +15,71 @@ hpcentral = 3.
 ppcentral = 3.
 hpartmass = 0.00051099
 ppartmass = 0.00051099
+
+1711-1722
+gpbeam=2.221
+hpartmass = 0.938272
+ppartmass = 0.00051099
+
+1711-1712
+hpcentral = 0.957
+ppcentral = 1.816
+htheta_lab = -53.33
+ptheta_lab = 25.01
+
+1711
+gtargmass_amu = 1.00794
+
+1712
+gtargmass_amu = 26.98
+
+1713-1716
+hpcentral = 1.136
+ppcentral = 1.816
+htheta_lab = -47.9
+ptheta_lab = 30.0
+
+1713
+gtargmass_amu = 1.00794
+
+1714-1715
+gtargmass_amu = 26.98
+
+1716
+gtargmass_amu = 1.00794
+
+1717-1718
+hpcentral = 1.136
+ppcentral = 1.686
+htheta_lab = -47.9
+ptheta_lab = 30.0
+
+1717
+gtargmass_amu = 26.98
+
+1718
+gtargmass_amu = 1.00794
+
+1719-1720
+hpcentral = 1.136
+ppcentral = 1.555
+htheta_lab = -47.9
+ptheta_lab = 30.0
+
+1719
+gtargmass_amu = 1.00794
+
+1720
+gtargmass_amu = 26.98
+
+1721-1722
+hpcentral = 0.936
+ppcentral = 2.012
+htheta_lab = -65.1
+ptheta_lab = 25.0
+
+1721
+gtargmass_amu = 26.98
+
+1722
+gtargmass_amu = 1.00794
\ No newline at end of file
diff --git a/DEF-files/COIN/PRODUCTION/coin_production_cuts.def b/DEF-files/COIN/PRODUCTION/coin_production_cuts.def
index e3596208..29498e9b 100644
--- a/DEF-files/COIN/PRODUCTION/coin_production_cuts.def
+++ b/DEF-files/COIN/PRODUCTION/coin_production_cuts.def
@@ -1,21 +1,29 @@
 Block: RawDecode
 
-Pedestal_event     g.evtyp == 99
-
-RawDecode_master  1
+Pedestal_event       g.evtyp == 99
+SHMS_event           g.evtyp == 1
+HMS_event            g.evtyp == 2
+BOTH_SINGLES_event   g.evtyp == 3
+COIN_ONLY_event      g.evtyp == 4
+SHMS_COIN_event      g.evtyp == 5
+HMS_COIN_event       g.evtyp == 6 
+COIN_ALL_event       g.evtyp == 7
+ALL_events           SHMS_event || HMS_event || BOTH_SINGLES_event || COIN_ONLY_event || COIN_ALL_event
+
+RawDecode_master  ALL_events
 
 Block: Decode
 
-Decode_master     1
+Decode_master     ALL_events
 
 Block: CoarseTracking
-CoarseTracking_master 1
+CoarseTracking_master ALL_events
 
 Block: CoarseReconstruct
-CoarseReconstruct_master 1
+CoarseReconstruct_master ALL_events
 
 Block: Tracking
-Tracking_master  1
+Tracking_master  ALL_events
 
 Block: Reconstruct
-Reconstruct_master 1
\ No newline at end of file
+Reconstruct_master ALL_events
\ No newline at end of file
diff --git a/DEF-files/HMS/PRODUCTION/hstackana_production_cuts.def b/DEF-files/HMS/PRODUCTION/hstackana_production_cuts.def
index 5da0a03a..e719ac18 100644
--- a/DEF-files/HMS/PRODUCTION/hstackana_production_cuts.def
+++ b/DEF-files/HMS/PRODUCTION/hstackana_production_cuts.def
@@ -2,10 +2,15 @@
 
 Block: RawDecode
 
-Pedestal_event     g.evtyp == 99
-HMS_event          g.evtyp == 2
-SHMS_event         g.evtyp == 1
-COIN_event         g.evtyp == 4
+Pedestal_event       g.evtyp == 99
+SHMS_event           g.evtyp == 1
+HMS_event            g.evtyp == 2
+BOTH_SINGLES_event   g.evtyp == 3
+COIN_ONLY_event      g.evtyp == 4
+SHMS_COIN_event      g.evtyp == 5
+HMS_COIN_event       g.evtyp == 6 
+COIN_ALL_event       g.evtyp == 7
+ALL_events           SHMS_event || HMS_event || BOTH_SINGLES_event || COIN_ONLY_event || COIN_ALL_event
 
 TRIG1        T.hms.hTRIG1_tdcTimeRaw > 0
 TRIG2        T.hms.hTRIG2_tdcTimeRaw > 0
@@ -20,10 +25,10 @@ RawDecode_master  1
 
 Block: Decode
 
-Decode_master     HMS_event
+Decode_master     ALL_events
 
 Block: CoarseTracking
-CoarseTracking_master HMS_event
+CoarseTracking_master ALL_events
 
 #add cuts to stricter times and apply them to drift distances (HMS 6 GeV Drift Chambers)
 time_cut1                            H.dc.1x1.time > 0 && H.dc.1x1.time < 250
@@ -118,13 +123,13 @@ hTest1                hmsHitsPlanes && (!hSpacePoints)
 hTest2                hSpacePoints && (!hStubLT)
 
 Block: CoarseReconstruct
-CoarseReconstruct_master HMS_event
+CoarseReconstruct_master ALL_events
 
 Block: Tracking
-Tracking_master  HMS_event
+Tracking_master  ALL_events
 
 Block: Reconstruct
-Reconstruct_master HMS_event
+Reconstruct_master ALL_events
 cer_pmt1_elec        H.cer.npe[0]>.5
 cer_pmt2_elec        H.cer.npe[0]>.5
 cer_elec       H.cer.npeSum>.5
@@ -205,4 +210,4 @@ HMS_hcer_track_matched_tot H.cer.totNumTracksMatched>0
 HMS_hcer_track_fired_tot H.cer.totNumTracksFired>0
 
 Block: Physics
-Physics_master HMS_event
+Physics_master ALL_events
diff --git a/DEF-files/SHMS/PRODUCTION/pstackana_production_cuts.def b/DEF-files/SHMS/PRODUCTION/pstackana_production_cuts.def
index c212d4dd..17061816 100644
--- a/DEF-files/SHMS/PRODUCTION/pstackana_production_cuts.def
+++ b/DEF-files/SHMS/PRODUCTION/pstackana_production_cuts.def
@@ -2,10 +2,15 @@
 
 Block: RawDecode
 
-Pedestal_event      g.evtyp == 99
-SHMS_event          g.evtyp == 1
-HMS_event           g.evtyp == 2
-COIN_event          g.evtyp == 4
+Pedestal_event       g.evtyp == 99
+SHMS_event           g.evtyp == 1
+HMS_event            g.evtyp == 2
+BOTH_SINGLES_event   g.evtyp == 3
+COIN_ONLY_event      g.evtyp == 4
+SHMS_COIN_event      g.evtyp == 5
+HMS_COIN_event       g.evtyp == 6 
+COIN_ALL_event       g.evtyp == 7
+ALL_events           SHMS_event || HMS_event || BOTH_SINGLES_event || COIN_ONLY_event || COIN_ALL_event
 
 TRIG1         T.shms.pTRIG1_tdcTimeRaw > 0
 TRIG2         T.shms.pTRIG2_tdcTimeRaw > 0
@@ -24,10 +29,10 @@ good_S1_time         T.shms.p1T_tdcTime > 241 && T.shms.p1T_tdcTime < 243
 good_S2X_time        T.shms.p2X_tdcTime > 180 && T.shms.p2X_tdcTime < 220
 good_S1_S2X_time     good_S1_time && good_S2X_time
 
-Decode_master     SHMS_event
+Decode_master     ALL_events
 
 Block: CoarseTracking
-CoarseTracking_master SHMS_event
+CoarseTracking_master ALL_events
 
 # Add cuts to stricter times and apply them to drift distances 
 time_cut1      P.dc.1u1.time > 0 && P.dc.1u1.time < 250
@@ -143,13 +148,13 @@ pTest1     shmsHitsPlanes && (!pSpacePoints)
 pTest2	   pSpacePoints && (!pStubLT)
 
 Block: CoarseReconstruct
-CoarseReconstruct_master SHMS_event
+CoarseReconstruct_master ALL_events
 
 Block: Tracking
-Tracking_master  SHMS_event
+Tracking_master  ALL_events
 
 Block: Reconstruct
-Reconstruct_master SHMS_event
+Reconstruct_master ALL_events
 
 cer_ng_elec    	  P.ngcer.npeSum > 0.5
 cer_ng_pi      	  P.ngcer.npeSum <= 0.5
@@ -271,4 +276,4 @@ SHMS_aero_track_matched_tot P.aero.totNumTracksMatched>0
 SHMS_aero_track_fired_tot P.aero.totNumTracksFired>0
 
 Block: Physics
-Physics_master SHMS_event
+Physics_master ALL_events
diff --git a/SCRIPTS/HMS/PRODUCTION/replay_production_hms_coin.C b/SCRIPTS/HMS/PRODUCTION/replay_production_hms_coin.C
new file mode 100644
index 00000000..8e317bf4
--- /dev/null
+++ b/SCRIPTS/HMS/PRODUCTION/replay_production_hms_coin.C
@@ -0,0 +1,159 @@
+void replay_production_hms_coin(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 = "coin_all_%05d.dat";
+  vector<TString> pathList;
+    pathList.push_back(".");
+    pathList.push_back("./raw");
+    pathList.push_back("./raw/../raw.copiedtotape");
+    pathList.push_back("./cache");
+
+  const char* ROOTFileNamePattern = "ROOTfiles/hms_coin_replay_production_%d_%d.root";
+
+  //Load Global parameters
+  // Add variables to global list.
+  gHcParms->Define("gen_run_number", "Run Number", RunNumber);
+  gHcParms->AddString("g_ctp_database_filename", "DBASE/HMS/STD/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"));
+  gHcParms->Load(gHcParms->GetString("g_ctp_calib_filename"));
+  // Load params for HMS trigger configuration
+  gHcParms->Load("PARAM/TRIG/thms.param");
+
+  // Load the Hall C detector map
+  gHcDetectorMap = new THcDetectorMap();
+  gHcDetectorMap->Load("MAPS/HMS/DETEC/STACK/hms_stack.map");
+  gHcParms->Load("PARAM/HMS/GEN/h_fadc_debug.param");
+
+  // 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);
+
+  // Set up the equipment to be analyzed.
+  THcHallCSpectrometer* HMS = new THcHallCSpectrometer("H", "HMS");
+  gHaApps->Add(HMS);
+  // Add drift chambers to HMS apparatus
+  THcDC* dc = new THcDC("dc", "Drift Chambers");
+  HMS->AddDetector(dc);
+  // Add hodoscope to HMS apparatus
+  THcHodoscope* hod = new THcHodoscope("hod", "Hodoscope");
+  HMS->AddDetector(hod);
+  // Add Cherenkov to HMS apparatus
+  THcCherenkov* cer = new THcCherenkov("cer", "Heavy Gas Cherenkov");
+  HMS->AddDetector(cer);
+  // Add Aerogel Cherenkov to HMS apparatus
+  //THcAerogel* aero = new THcAerogel("aero", "Aerogel");
+  //HMS->AddDetector(aero);
+  // Add calorimeter to HMS apparatus
+  THcShower* cal = new THcShower("cal", "Calorimeter");
+  HMS->AddDetector(cal);
+
+  // Include golden track information
+  THaGoldenTrack* gtr = new THaGoldenTrack("H.gtr", "HMS Golden Track", "H");
+  gHaPhysics->Add(gtr);
+// Add Rastered Beam Apparatus
+  THaApparatus* beam = new THcRasteredBeam("H.rb", "Rastered Beamline");
+  gHaApps->Add(beam);  
+  THaReactionPoint* hrp= new THaReactionPoint("H.react"," HMS reaction point","H","H.rb");
+  gHaPhysics->Add(hrp);
+  THcExtTarCor* hext = new THcExtTarCor("H.extcor"," HMS extended target corrections","H","H.react");
+  gHaPhysics->Add(hext);
+// Add Ideal Beam Apparatus
+ // THaApparatus* beam = new THaIdealBeam("IB", "Ideal Beamline");
+ // gHaApps->Add(beam);
+  // Add Physics Module to calculate primary (scattered) beam kinematics
+  THcPrimaryKine* hkin = new THcPrimaryKine("H.kin", "HMS Single Arm Kinematics", "H", "H.rb");
+  gHaPhysics->Add(hkin);
+  THcHodoEff* heff = new THcHodoEff("hhodeff"," HMS hodo efficiency","H.hod");
+  gHaPhysics->Add(heff);
+
+  // Add handler for prestart event 125.
+  THcConfigEvtHandler* ev125 = new THcConfigEvtHandler("HC", "Config Event type 125");
+  gHaEvtHandlers->Add(ev125);
+  // Add handler for EPICS events
+  THaEpicsEvtHandler *hcepics = new THaEpicsEvtHandler("epics", "HC EPICS event type 180");
+  gHaEvtHandlers->Add(hcepics);
+  // Add handler for scaler events
+  THcScalerEvtHandler *hscaler = new THcScalerEvtHandler("H", "Hall C scaler event type 2");  
+  hscaler->AddEvtType(2);
+  hscaler->AddEvtType(129);
+  hscaler->SetDelayedType(129);
+  hscaler->SetUseFirstEvent(kTRUE);
+  gHaEvtHandlers->Add(hscaler);
+  // Add event handler for DAQ configuration event
+  THcConfigEvtHandler *hconfig = new THcConfigEvtHandler("hconfig", "Hall C configuration event handler");
+  gHaEvtHandlers->Add(hconfig);
+
+  // 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.
+  THcRun* run = new THcRun( pathList, Form(RunFileNamePattern, RunNumber) );
+
+  // Set to read in Hall C run database parameters
+  run->SetRunParamClass("THcRunParameters");
+  
+  // 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, MaxEvent);
+  analyzer->SetCountMode(2);    // 0 = counter is # of physics triggers
+                                // 1 = counter is # of all decode reads
+                                // 2 = counter is event number
+ analyzer->SetEvent(event);
+ // Set EPICS event type
+ analyzer->SetEpicsEvtType(180);
+ // Define crate map
+ analyzer->SetCrateMapFileName("MAPS/db_cratemap.dat");
+ // Define output ROOT file
+ analyzer->SetOutFile(ROOTFileName.Data());
+ // Define output DEF-file 
+ analyzer->SetOdefFile("DEF-files/HMS/PRODUCTION/hstackana_production.def");
+ // Define cuts file
+ analyzer->SetCutFile("DEF-files/HMS/PRODUCTION/hstackana_production_cuts.def");    // optional
+ // File to record cuts accounting information for cuts
+ analyzer->SetSummaryFile(Form("REPORT_OUTPUT/HMS/PRODUCTION/summary_production_%d_%d.report", RunNumber, MaxEvent));    // optional
+ // Start the actual analysis.
+ analyzer->Process(run);
+ // Create report file from template.
+ analyzer->PrintReport("TEMPLATES/HMS/PRODUCTION/hstackana_production.template",
+		       Form("REPORT_OUTPUT/HMS/PRODUCTION/replay_hms_production_%d_%d.report", RunNumber, MaxEvent));
+
+}
diff --git a/SCRIPTS/SHMS/PRODUCTION/replay_production_shms_coin.C b/SCRIPTS/SHMS/PRODUCTION/replay_production_shms_coin.C
new file mode 100644
index 00000000..2b74de20
--- /dev/null
+++ b/SCRIPTS/SHMS/PRODUCTION/replay_production_shms_coin.C
@@ -0,0 +1,164 @@
+void replay_production_shms_coin (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 = "coin_all_%05d.dat";
+  vector<TString> pathList;
+    pathList.push_back(".");
+    pathList.push_back("./raw");
+    pathList.push_back("./raw/../raw.copiedtotape");
+    pathList.push_back("./cache");
+
+  const char* ROOTFileNamePattern = "ROOTfiles/shms_coin_replay_production_%d_%d.root";
+  
+  // Load global parameters
+  // Add variables to global list.
+  gHcParms->Define("gen_run_number", "Run Number", RunNumber);
+  gHcParms->AddString("g_ctp_database_filename", "DBASE/SHMS/STD/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"));
+  gHcParms->Load(gHcParms->GetString("g_ctp_calib_filename"));
+  // Load params for SHMS trigger configuration
+  gHcParms->Load("PARAM/TRIG/tshms.param");
+
+  // Load the Hall C detector map
+  gHcDetectorMap = new THcDetectorMap();
+  gHcDetectorMap->Load("MAPS/SHMS/DETEC/STACK/shms_stack.map");
+  gHcParms->Load("PARAM/SHMS/GEN/p_fadc_debug.param");
+
+  // 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 equipment to be analyzed.
+  THcHallCSpectrometer* SHMS = new THcHallCSpectrometer("P", "SHMS");
+  gHaApps->Add(SHMS);
+  // Add Noble Gas Cherenkov to SHMS apparatus
+  THcCherenkov* ngcer = new THcCherenkov("ngcer", "Noble Gas Cherenkov");
+  SHMS->AddDetector(ngcer);
+  // Add drift chambers to SHMS apparatus
+  THcDC* dc = new THcDC("dc", "Drift Chambers");
+  SHMS->AddDetector(dc);
+  // Add hodoscope to SHMS apparatus
+  THcHodoscope* hod = new THcHodoscope("hod", "Hodoscope");
+  SHMS->AddDetector(hod);
+  // Add Heavy Gas Cherenkov to SHMS apparatus
+  THcCherenkov* hgcer = new THcCherenkov("hgcer", "Heavy Gas Cherenkov");
+  SHMS->AddDetector(hgcer);
+
+  // Add Aerogel Cherenkov to SHMS apparatus
+  THcAerogel* aero = new THcAerogel("aero", "Aerogel");
+  SHMS->AddDetector(aero);
+  // Add calorimeter to SHMS apparatus
+  THcShower* cal = new THcShower("cal", "Calorimeter");
+  SHMS->AddDetector(cal);
+
+  // Include golden track information
+  THaGoldenTrack* gtr = new THaGoldenTrack("P.gtr", "SHMS Golden Track", "P");
+  gHaPhysics->Add(gtr);
+  // Add Rastered Beam Apparatus
+  THaApparatus* beam = new THcRasteredBeam("P.rb", "Rastered Beamline");
+  gHaApps->Add(beam);
+  THaReactionPoint* prp= new THaReactionPoint("P.react"," SHMS reaction point","P","P.rb");
+  gHaPhysics->Add(prp);
+  THcExtTarCor* pext = new THcExtTarCor("P.extcor"," HMS extended target corrections","P","P.react");
+  gHaPhysics->Add(pext);
+  // Add Physics Module to calculate primary (scattered beam - usually electrons) kinematics
+  THcPrimaryKine* kin = new THcPrimaryKine("P.kin", "SHMS Single Arm Kinematics", "P", "P.rb");
+  gHaPhysics->Add(kin);
+ THcHodoEff* peff = new THcHodoEff("phodeff"," SHMS hodo efficiency","P.hod");
+  gHaPhysics->Add(peff);
+
+   
+
+  // Add event handler for prestart event 125.
+  THcConfigEvtHandler* ev125 = new THcConfigEvtHandler("HC", "Config Event type 125");
+  gHaEvtHandlers->Add(ev125);
+  // Add event handler for EPICS events
+  THaEpicsEvtHandler* hcepics = new THaEpicsEvtHandler("epics", "HC EPICS event type 180");
+  gHaEvtHandlers->Add(hcepics);
+  // Add event handler for scaler events
+  THcScalerEvtHandler* pscaler = new THcScalerEvtHandler("P", "Hall C scaler event type 1");
+  pscaler->AddEvtType(1);
+  pscaler->AddEvtType(129);
+  pscaler->SetDelayedType(129);
+  pscaler->SetUseFirstEvent(kTRUE);
+  gHaEvtHandlers->Add(pscaler);
+  // Add event handler for DAQ configuration event
+  THcConfigEvtHandler *pconfig = new THcConfigEvtHandler("pconfig", "Hall C configuration event handler");
+  gHaEvtHandlers->Add(pconfig);
+
+  // 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.
+  THcRun* run = new THcRun( pathList, Form(RunFileNamePattern, RunNumber) );
+
+  // Set to read in Hall C run database parameters
+  run->SetRunParamClass("THcRunParameters");
+  
+  // 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, MaxEvent);
+  analyzer->SetCountMode(2);    // 0 = counter is # of physics triggers
+                                // 1 = counter is # of all decode reads
+                                // 2 = counter is event number
+  analyzer->SetEvent(event);
+  // Set EPICS event type
+  analyzer->SetEpicsEvtType(180);
+  // Define crate map
+  analyzer->SetCrateMapFileName("MAPS/db_cratemap.dat");
+  // Define output ROOT file
+  analyzer->SetOutFile(ROOTFileName.Data());
+  // Define DEF-file
+  analyzer->SetOdefFile("DEF-files/SHMS/PRODUCTION/pstackana_production.def");
+  // Define cuts file
+  analyzer->SetCutFile("DEF-files/SHMS/PRODUCTION/pstackana_production_cuts.def");  // optional
+  // File to record accounting information for cuts
+  analyzer->SetSummaryFile(Form("REPORT_OUTPUT/SHMS/PRODUCTION/summary_production_%d_%d.report", RunNumber, MaxEvent));  // optional
+  // Start the actual analysis.
+  analyzer->Process(run);
+  // Create report file from template
+  analyzer->PrintReport("TEMPLATES/SHMS/PRODUCTION/pstackana_production.template",
+  			Form("REPORT_OUTPUT/SHMS/PRODUCTION/replay_shms_production_%d_%d.report", RunNumber, MaxEvent));  // optional
+
+}
diff --git a/TEMPLATES/COIN/PRODUCTION/coin_production.template b/TEMPLATES/COIN/PRODUCTION/coin_production.template
index 134bc07e..c352e92c 100644
--- a/TEMPLATES/COIN/PRODUCTION/coin_production.template
+++ b/TEMPLATES/COIN/PRODUCTION/coin_production.template
@@ -22,4 +22,7 @@ BCM1 Counts: {P.BCM1.scalerCut} 	Total Charge: {P.BCM1.scalerChargeCut:%.3f} uC
 BCM2 Counts: {P.BCM2.scalerCut} 	Total Charge: {P.BCM2.scalerChargeCut:%.3f} uC
 Unser Counts: {P.Unser.scalerCut} 	Total Charge: {P.Unser.scalerChargeCut:%.3f} uC
 
-All triggers  :  {all_trigs.npassed}
\ No newline at end of file
+HMS Singles Triggers   :  {HMS_event.npassed}
+SHMS Singles Triggers  :  {SHMS_event.npassed}
+Coincidence Triggers   :  {COIN_event.npassed}
+All triggers           :  {ALL_events.npassed}
\ No newline at end of file
diff --git a/onlineGUI/CONFIG/HMS/PRODUCTION/hms_coin_production.cfg b/onlineGUI/CONFIG/HMS/PRODUCTION/hms_coin_production.cfg
new file mode 100644
index 00000000..73dd00bb
--- /dev/null
+++ b/onlineGUI/CONFIG/HMS/PRODUCTION/hms_coin_production.cfg
@@ -0,0 +1,191 @@
+protorootfile ../ROOTfiles/hms_coin_replay_production_XXXXX_latest.root
+guicolor orange
+canvassize 1600 800
+
+newpage  4 2
+title HMS HODO ADC Occ/Mult
+macro 'UTIL/GEN/overlay2.C("hhodo_1x_good_adc_occ_pos","hhodo_1x_good_adc_occ_neg","1x+","1x-","1x Good ADC Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hhodo_1y_good_adc_occ_pos","hhodo_1y_good_adc_occ_neg","1y+","1y-","1y Good ADC Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hhodo_2x_good_adc_occ_pos","hhodo_2x_good_adc_occ_neg","2x+","2x-","2x Good ADC Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hhodo_2y_good_adc_occ_pos","hhodo_2y_good_adc_occ_neg","2y+","2y+","2y Good ADC Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hhodo_1x_good_adc_mult_pos","hhodo_1x_good_adc_mult_neg","1x+","1x-","1x Good ADC Multiplicity")'
+macro 'UTIL/GEN/overlay2.C("hhodo_1y_good_adc_mult_pos","hhodo_1y_good_adc_mult_neg","1y+","1y-","1y Good ADC Multiplicity")'
+macro 'UTIL/GEN/overlay2.C("hhodo_2x_good_adc_mult_pos","hhodo_2x_good_adc_mult_neg","2x+","2x-","2x Good ADC Multiplicity")'
+macro 'UTIL/GEN/overlay2.C("hhodo_2y_good_adc_mult_pos","hhodo_2y_good_adc_mult_neg","2y+","2y-","2y Good ADC Multiplicity")'
+
+newpage 4 2
+title HMS HODO TDC Occ/Mult
+macro 'UTIL/GEN/overlay2.C("hhodo_1x_good_tdc_occ_pos","hhodo_1x_good_tdc_occ_neg","1x+","1x-","1x Good TDC Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hhodo_1y_good_tdc_occ_pos","hhodo_1y_good_tdc_occ_neg","1y+","1y-","1y Good TDC Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hhodo_2x_good_tdc_occ_pos","hhodo_2x_good_tdc_occ_neg","2x+","2x-","2x Good TDC Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hhodo_2y_good_tdc_occ_pos","hhodo_2y_good_tdc_occ_neg","2y+","2y-","2y Good TDC Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hhodo_1x_good_tdc_mult_pos","hhodo_1x_good_tdc_mult_neg","1x+","1x-","1x Good TDC Multiplicity")'
+macro 'UTIL/GEN/overlay2.C("hhodo_1y_good_tdc_mult_pos","hhodo_1y_good_tdc_mult_neg","1y+","1y-","1y Good TDC Multiplicity")'
+macro 'UTIL/GEN/overlay2.C("hhodo_2x_good_tdc_mult_pos","hhodo_2x_good_tdc_mult_neg","2x+","2x-","2x Good TDC Multiplicity")'
+macro 'UTIL/GEN/overlay2.C("hhodo_2y_good_tdc_mult_pos","hhodo_2y_good_tdc_mult_neg","2y+","2y-","2y Good TDC Multiplicity")'
+
+newpage  4 2 logz
+title HMS HODO Pedestals
+hhodo_1x_good_pped_vs_pmt_pos  -nostat
+hhodo_1y_good_pped_vs_pmt_pos  -nostat
+hhodo_2x_good_pped_vs_pmt_pos  -nostat
+hhodo_2y_good_pped_vs_pmt_pos  -nostat
+hhodo_1x_good_pped_vs_pmt_neg -nostat
+hhodo_1y_good_pped_vs_pmt_neg  -nostat
+hhodo_2x_good_pped_vs_pmt_neg -nostat
+hhodo_2y_good_pped_vs_pmt_neg -nostat
+
+newpage 2 3
+title HMS DC Wire Maps
+macro    UTIL/GEN/overlay2.C("hdc1u1_wirenum","hdc2v1_wirenum","1U1","2V1")
+macro    UTIL/GEN/overlay2.C("hdc1u2_wirenum","hdc2v2_wirenum","1U2","2V2")
+macro    UTIL/GEN/overlay2.C("hdc1x1_wirenum","hdc2x1_wirenum","1X1","2X1")
+macro    UTIL/GEN/overlay2.C("hdc1x2_wirenum","hdc2x2_wirenum","1X2","2X2")
+macro    UTIL/GEN/overlay2.C("hdc1v1_wirenum","hdc2u1_wirenum","1V1","2U1")
+macro    UTIL/GEN/overlay2.C("hdc1v2_wirenum","hdc2u2_wirenum","1V2","2U2")
+
+newpage 2 3
+title HMS DC Drift Distance
+macro    UTIL/GEN/overlay2.C("hdc1u1_ddist","hdc2v1_ddist","1U1","2V1")
+macro    UTIL/GEN/overlay2.C("hdc1u2_ddist","hdc2v2_ddist","1U2","2V2")
+macro    UTIL/GEN/overlay2.C("hdc1x1_ddist","hdc2x1_ddist","1X1","2X1")
+macro    UTIL/GEN/overlay2.C("hdc1x2_ddist","hdc2x2_ddist","1X2","2X2")
+macro    UTIL/GEN/overlay2.C("hdc1v1_ddist","hdc2u1_ddist","1V1","2U1")
+macro    UTIL/GEN/overlay2.C("hdc1v2_ddist","hdc2u2_ddist","1V2","2U2")
+
+newpage 2 3
+title HMS DC Drift Time
+macro    UTIL/GEN/overlay2.C("hdc1u1_drifttime","hdc2v1_drifttime","1U1","2V1")
+macro    UTIL/GEN/overlay2.C("hdc1u2_drifttime","hdc2v1_drifttime","1U2","2V2")
+macro    UTIL/GEN/overlay2.C("hdc1x1_drifttime","hdc2x1_drifttime","1X1","2X1")
+macro    UTIL/GEN/overlay2.C("hdc1x2_drifttime","hdc2x2_drifttime","1X2","2X2")
+macro    UTIL/GEN/overlay2.C("hdc1v1_drifttime","hdc2u1_drifttime","1V1","2U1")
+macro    UTIL/GEN/overlay2.C("hdc1v2_drifttime","hdc2u2_drifttime","1V2","2U2")
+
+newpage 3 2 logz
+title HMS Focal Plane
+hdc_xfp_vs_yfp -nostat
+hdc_xpfp_vs_ypfp -nostat
+hdc_xfp_vs_ypfp -nostat
+hdc_xfp_vs_xpfp -nostat
+hdc_yfp_vs_xpfp -nostat
+hdc_yfp_vs_ypfp -nostat
+
+newpage 3 2 logz
+title HMS Target
+hgtr_xtar_vs_ytar -nostat
+hgtr_xptar_vs_yptar -nostat
+hgtr_xtar_vs_xptar -nostat
+hgtr_xtar_vs_yptar -nostat
+hgtr_ytar_vs_xptar -nostat
+hgtr_ytar_vs_yptar -nostat
+
+newpage 2 2
+title HMS CER Occu/Mult/Ped
+hcer_good_occ -nostat
+hcer_good_mult -nostat
+hcer_good_pped_vs_pmt -nostat
+
+newpage 1 2 logz
+title HMS CER NPEs
+hcer_npe -nostat
+hcer_tot_npe  -nostat
+
+newpage 2 2 
+title HMS CAL Occupancy
+macro 'UTIL/GEN/overlay2.C("hcal_hA_good_occ_pos","hcal_hA_good_occ_neg","hA+","hA-","hA Good Occupancy")'
+macro 'UTIL/GEN/overlay2.C("hcal_hB_good_occ_pos","hcal_hB_good_occ_neg","hB+","hB-","hB Good Occupancy")'
+hcal_hC_good_occ_pos -nostat
+hcal_hD_good_occ_pos -nostat
+
+newpage 2 2 
+title HMS CAL Multiplicity
+macro 'UTIL/GEN/overlay2.C("hcal_hA_good_mult_pos","hcal_hA_good_mult_neg","hA+","hA-","hA Good Multiplicity")'
+macro 'UTIL/GEN/overlay2.C("hcal_hB_good_mult_pos","hcal_hB_good_mult_neg","hB+","hB-","hB Good Multiplicity")'
+hcal_hC_good_mult_pos -nostat
+hcal_hD_good_mult_pos -nostat
+
+newpage 2 3 logz
+title HMS CAL Pedestals 
+hcal_hA_good_pped_vs_pmt_pos -nostat
+hcal_hA_good_pped_vs_pmt_neg -nostat
+hcal_hB_good_pped_vs_pmt_pos -nostat
+hcal_hB_good_pped_vs_pmt_neg -nostat
+hcal_hC_good_pped_vs_pmt_pos -nostat
+hcal_hD_good_pped_vs_pmt_pos -nostat
+
+newpage 2 2 
+title HMS DC Reference Time
+htrig_hdc_ref1 -nostat
+htrig_hdc_ref2 -nostat
+htrig_hdc_ref3 -nostat
+htrig_hdc_ref4 -nostat
+
+newpage 4 2 
+title HMS TRIG Reference Time
+htrig_h1x_good_tdc -nostat
+htrig_h1y_good_tdc -nostat
+htrig_h2x_good_tdc -nostat
+htrig_h2y_good_tdc -nostat
+htrig_h1T_good_tdc -nostat
+htrig_h2T_good_tdc -nostat
+htrig_hT1_good_tdc -nostat
+htrig_hT2_good_tdc -nostat
+
+newpage 2 1 logz
+title HMS Fast Raster
+hFRA_XvsY -nostat
+hFRB_XvsY -nostat
+
+newpage 2 2
+title HMS Kinematics
+hkin_q2 -nostat
+hkin_w  -nostat
+hkin_omega -nostat
+hkin_theta -nostat
+
+newpage 3 2
+title HMS Tracked Variables
+hcal_xytrack -nostat
+hcal_xdiff -nostat
+hcal_xdiff_v_xtr -nostat
+hcal_xyclusttrack -nostat
+hcal_ydiff -nostat
+hcal_ydiff_v_ytr -nostat
+
+newpage 4 2 logz
+title HMS PID
+hcer_vs_hpreShwr -nostat
+hcal_hshwr_vs_hpreShwr -nostat
+hcal_delta_etracknorm -nostat
+hdc_trk_beta -nostat
+hdc_trk_mom -nostat
+hcal_xtrack_vs_etrack -nostat
+hcal_ytrack_vs_etrack -nostat
+
+newpage 4 2 logz
+title HMS PID (electrons)
+hcer_vs_hpreShwr_elec -nostat
+hcal_hshwr_vs_hpreShwr_elec -nostat
+hcal_delta_etracknorm_elec -nostat
+hdc_trk_beta_elec -nostat
+hdc_trk_mom_elec -nostat
+hcal_xtrack_vs_etrack_elec -nostat
+hcal_ytrack_vs_etrack_elec -nostat
+
+newpage 4 2 logz
+title HMS PID (pions)
+hcer_vs_hpreShwr_pi -nostat
+hcal_hshwr_vs_hpreShwr_pi -nostat
+hcal_delta_etracknorm_pi -nostat
+hdc_trk_beta_pi -nostat
+hdc_trk_mom_pi -nostat
+hcal_xtrack_vs_etrack_pi -nostat
+hcal_ytrack_vs_etrack_pi -nostat
+
+newpage 2 2
+title HMS EPICS
+hac_bcm_average -nostat
+ibcm1 -nostat
+ibcm2 -nostat
+iunser -nostat
diff --git a/onlineGUI/CONFIG/SHMS/PRODUCTION/shms_coin_production.cfg b/onlineGUI/CONFIG/SHMS/PRODUCTION/shms_coin_production.cfg
new file mode 100644
index 00000000..f1755d57
--- /dev/null
+++ b/onlineGUI/CONFIG/SHMS/PRODUCTION/shms_coin_production.cfg
@@ -0,0 +1,216 @@
+protorootfile ../ROOTfiles/shms_coin_replay_production_XXXXX_latest.root
+guicolor orange
+canvassize 1600 800
+
+newpage 4 2
+title SHMS Hodoscope ADC Occ/Mult
+macro 'UTIL/GEN/overlay2.C("phodo_1x_good_adc_occ_pos","phodo_1x_good_adc_occ_neg","S1x+","S1x-","SHMS Hodo 1x Good ADC Occupancy")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_1y_good_adc_occ_pos","phodo_1y_good_adc_occ_neg","S1y+","S1y-","SHMS Hodo 1y Good ADC Occupancy")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_2x_good_adc_occ_pos","phodo_2x_good_adc_occ_neg","S2x+","S2x-","SHMS Hodo 2x Good ADC Occupancy")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_2y_good_adc_occ_pos","phodo_2y_good_adc_occ_neg","S2y+","S2y-","SHMS Hodo 2y Good ADC Occupancy")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_1x_good_adc_mult_pos","phodo_1x_good_adc_mult_neg","S1x+","S1x-","SHMS Hodo 1x Good ADC Multiplicity")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_1y_good_adc_mult_pos","phodo_1y_good_adc_mult_neg","S1y+","S1y-","SHMS Hodo 1y Good ADC Multiplicity")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_2x_good_adc_mult_pos","phodo_2x_good_adc_mult_neg","S2x+","S2x-","SHMS Hodo 2x Good ADC Multiplicity")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_2y_good_adc_mult_pos","phodo_2y_good_adc_mult_neg","S2y+","S2y-","SHMS Hodo 2y Good ADC Multiplicity")' -nostat
+
+newpage 4 2
+title SHMS Hodoscope TDC Occ/Mult
+macro 'UTIL/GEN/overlay2.C("phodo_1x_good_tdc_occ_pos","phodo_1x_good_tdc_occ_neg","S1x+","S1x-","SHMS Hodo 1x Good TDC Occupancy")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_1y_good_tdc_occ_pos","phodo_1y_good_tdc_occ_neg","S1y+","S1y-","SHMS Hodo 1y Good TDC Occupancy")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_2x_good_tdc_occ_pos","phodo_2x_good_tdc_occ_neg","S2x+","S2x-","SHMS Hodo 2x Good TDC Occupancy")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_2y_good_tdc_occ_pos","phodo_2y_good_tdc_occ_neg","S2y+","S2y-","SHMS Hodo 2y Good TDC Occupancy")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_1x_good_tdc_mult_pos","phodo_1x_good_tdc_mult_neg","S1x+","S1x-","SHMS Hodo 1x Good TDC Multiplicity")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_1y_good_tdc_mult_pos","phodo_1y_good_tdc_mult_neg","S1y+","S1y-","SHMS Hodo 1y Good TDC Multiplicity")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_2x_good_tdc_mult_pos","phodo_2x_good_tdc_mult_neg","S2x+","S2x-","SHMS Hodo 2x Good TDC Multiplicity")' -nostat
+macro 'UTIL/GEN/overlay2.C("phodo_2y_good_tdc_mult_pos","phodo_2y_good_tdc_mult_neg","S2y+","S2y-","SHMS Hodo 2y Good TDC Multiplicity")' -nostat
+
+newpage 4 2
+title SHMS Hodoscope Pedestals
+phodo_1x_good_pped_vs_pmt_pos -nostat
+phodo_1y_good_pped_vs_pmt_pos -nostat
+phodo_2x_good_pped_vs_pmt_pos -nostat
+phodo_2y_good_pped_vs_pmt_pos -nostat
+phodo_1x_good_pped_vs_pmt_neg -nostat
+phodo_1y_good_pped_vs_pmt_neg -nostat
+phodo_2x_good_pped_vs_pmt_neg -nostat
+phodo_2y_good_pped_vs_pmt_neg -nostat
+
+newpage 2 3
+title SHMS DC Wire Maps 
+macro UTIL/GEN/overlay2.C("pdc1u1_wirenum","pdc2v1_wirenum","1U1","2V1")
+macro UTIL/GEN/overlay2.C("pdc1u2_wirenum","pdc2v2_wirenum","1U2","2V2")
+macro UTIL/GEN/overlay2.C("pdc1x1_wirenum","pdc2x1_wirenum","1X1","2X1")
+macro UTIL/GEN/overlay2.C("pdc1x2_wirenum","pdc2x2_wirenum","1X2","2X2")
+macro UTIL/GEN/overlay2.C("pdc1v1_wirenum","pdc2u1_wirenum","1V1","2U1")
+macro UTIL/GEN/overlay2.C("pdc1v2_wirenum","pdc2u2_wirenum","1V2","2U2")
+
+newpage 2 3
+title SHMS DC Drift Distance
+macro UTIL/GEN/overlay2.C("pdc1u1_ddist","pdc2v1_ddist","1U1","2V1")
+macro UTIL/GEN/overlay2.C("pdc1u2_ddist","pdc2v2_ddist","1U2","2V2")
+macro UTIL/GEN/overlay2.C("pdc1x1_ddist","pdc2x1_ddist","1X1","2X1")
+macro UTIL/GEN/overlay2.C("pdc1x2_ddist","pdc2x2_ddist","1X2","2X2")
+macro UTIL/GEN/overlay2.C("pdc1v1_ddist","pdc2u1_ddist","1V1","2U1")
+macro UTIL/GEN/overlay2.C("pdc1v2_ddist","pdc2u2_ddist","1V2","2U2")
+
+newpage 2 3
+title SHMS DC Drift Time
+macro UTIL/GEN/overlay2.C("pdc1u1_drifttime","pdc2v1_drifttime","1U1","2V1")
+macro UTIL/GEN/overlay2.C("pdc1u2_drifttime","pdc2v1_drifttime","1U2","2V2")
+macro UTIL/GEN/overlay2.C("pdc1x1_drifttime","pdc2x1_drifttime","1X1","2X1")
+macro UTIL/GEN/overlay2.C("pdc1x2_drifttime","pdc2x2_drifttime","1X2","2X2")
+macro UTIL/GEN/overlay2.C("pdc1v1_drifttime","pdc2u1_drifttime","1V1","2U1")
+macro UTIL/GEN/overlay2.C("pdc1v2_drifttime","pdc2u2_drifttime","1V2","2U2")
+
+newpage 3 2 logz
+title SHMS Focal Plane
+pdc_xfp_vs_yfp -nostat
+pdc_xpfp_vs_ypfp -nostat
+pdc_xfp_vs_xpfp -nostat
+pdc_xfp_vs_ypfp -nostat
+pdc_yfp_vs_xpfp -nostat
+pdc_yfp_vs_ypfp -nostat
+
+newpage 3 2 logz
+title SHMS Target
+pgtr_xtar_vs_ytar -nostat
+pgtr_xptar_vs_yptar -nostat
+pgtr_xtar_vs_xptar -nostat
+pgtr_xtar_vs_yptar -nostat
+pgtr_ytar_vs_xptar -nostat
+pgtr_ytar_vs_yptar -nostat
+
+newpage 3 2
+title SHMS Cherenkov Occ/Mult
+macro 'UTIL/GEN/overlay2.C("paero_good_occ_pos","paero_good_occ_neg","Aero+","Aero-","SHMS Aerogel Cherenkov Good Occupancy")' -nostat
+pngcer_good_occ -nostat
+phgcer_good_occ -nostat
+macro 'UTIL/GEN/overlay2.C("paero_good_mult_pos","paero_good_mult_neg","Aero+","Aero-","SHMS Aerogel Cherenkov Good Multiplicity")' -nostat
+pngcer_good_mult -nostat
+phgcer_good_mult -nostat
+
+newpage 3 2
+title SHMS Cherenkov Pedestals
+paero_good_pped_vs_pmt_pos -nostat
+pngcer_good_pped_vs_pmt -nostat
+phgcer_good_pped_vs_pmt -nostat
+paero_good_pped_vs_pmt_neg -nostat
+
+newpage 4 4 logz
+title SHMS Cherenkov NPE
+paero_npe_pos -nostat
+paero_npe_neg -nostat
+pngcer_npe -nostat
+phgcer_npe -nostat
+paero_tot_npe_pos -nostat
+paero_tot_npe_neg -nostat
+pngcer_tot_npe -nostat
+phgcer_tot_npe -nostat
+paero_x_vs_npe -nostat
+paero_x_vs_npe -nostat
+pngcer_x_vs_npe -nostat
+phgcer_x_vs_npe -nostat
+paero_y_vs_npe -nostat
+paero_y_vs_npe -nostat
+pngcer_y_vs_npe -nostat
+phgcer_y_vs_npe -nostat
+
+newpage 2 2
+title SHMS Calorimeter Occ/Mult
+macro 'UTIL/GEN/overlay2.C("pcal_prshwr_good_occ_pos","pcal_prshwr_good_occ_neg","PrSh+","PrSh-","SHMS PreShower Good Occupancy")' -nostat
+pcal_shwr_good_occ -nostat
+macro 'UTIL/GEN/overlay2.C("pcal_prshwr_good_mult_pos","pcal_prshwr_good_mult_neg","PrSh+","PrSh-","SHMS PreShower Good Multiplicity")' -nostat
+pcal_shwr_good_mult -nostat
+
+newpage 2 2
+title SHMS Calorimeter Pedestals
+pcal_prshwr_good_pped_vs_pmt_pos -nostat
+pcal_shwr_good_pped_vs_pmt -nostat
+pcal_prshwr_good_pped_vs_pmt_neg -nostat
+
+newpage 4 3
+title SHMS DC Reference Times
+ptrig_pdc_ref1 -nostat
+ptrig_pdc_ref2 -nostat
+ptrig_pdc_ref3 -nostat
+ptrig_pdc_ref4 -nostat
+ptrig_pdc_ref5 -nostat
+ptrig_pdc_ref6 -nostat
+ptrig_pdc_ref7 -nostat
+ptrig_pdc_ref8 -nostat
+ptrig_pdc_ref9 -nostat
+ptrig_pdc_ref10 -nostat
+
+newpage 4 3
+title SHMS Trigger Reference Times
+ptrig_p1x_good_tdc -nostat
+ptrig_p1y_good_tdc -nostat
+ptrig_p2x_good_tdc -nostat
+ptrig_p2y_good_tdc -nostat
+ptrig_p1T_good_tdc -nostat
+ptrig_p2T_good_tdc -nostat
+ptrig_pT1_good_tdc -nostat
+ptrig_pT2_good_tdc -nostat
+ptrig_pT3_good_tdc -nostat
+ptrig_pFADC_TREF_ROC2_good_tdc -nostat
+
+newpage 2 1
+title SHMS Fast Raster
+pFRA_XvsY -nostat
+pFRB_XvsY -nostat
+
+newpage 2 2
+title SHMS Kinematics
+pkin_q2 -nostat
+pkin_w -nostat
+pkin_omega -nostat
+pkin_theta -nostat
+
+newpage 3 2 logz
+title SHMS Tracked Variables
+pcal_xytrack -nostat
+pcal_xdiff -nostat
+pcal_xdiff_v_xtr -nostat
+pcal_xyclusttrack -nostat
+pcal_ydiff -nostat
+pcal_ydiff_v_ytr -nostat
+
+newpage 2 4 logz
+title SHMS PID
+hgc_vs_prshw -nostat
+ngc_vs_prshw -nostat
+pcal_shw_vs_prshw -nostat
+pcal_delta_etracknorm -nostat
+pdc_trk_beta -nostat
+pdc_trk_mom -nostat
+pcal_xtrack_vs_etrack -nostat
+pcal_ytrack_vs_etrack -nostat
+
+newpage 2 4 logz
+title SHMS PID (electrons)
+hgc_vs_prshw_elec -nostat
+ngc_vs_prshw_elec -nostat
+pcal_shw_vs_prshw_elec -nostat
+pcal_delta_etracknorm_elec -nostat
+pdc_trk_beta_elec -nostat
+pdc_trk_mom_elec -nostat
+pcal_xtrack_vs_etrack_elec -nostat
+pcal_ytrack_vs_etrack_elec -nostat
+
+newpage 2 4 logz
+title SHMS PID (pions)
+hgc_vs_prshw_pi -nostat
+ngc_vs_prshw_pi -nostat
+pcal_shw_vs_prshw_pi -nostat
+pcal_delta_etracknorm_pi -nostat
+pdc_trk_beta_pi -nostat
+pdc_trk_mom_pi -nostat
+pcal_xtrack_vs_etrack_pi -nostat
+pcal_ytrack_vs_etrack_pi -nostat
+
+newpage 2 2
+title EPICS
+hac_bcm_average -nostat
+ibcm1 -nostat
+ibcm2 -nostat
+iunser -nostat
-- 
GitLab