Skip to content
Snippets Groups Projects
Commit 281156ba authored by Mark Jones's avatar Mark Jones Committed by Mark K Jones
Browse files

Modify replay_production_hms

Add THaReactionPoint to calculate z-position along target

Change THaRun to THcRun

change THcHallCSpectrometer to by THcHallCSpectormeter object

Add scaler event type 129
parent 29eb09d1
No related branches found
No related tags found
No related merge requests found
......@@ -10,3 +10,5 @@ block H.hod.*
block H.cal.*
block H.gtr.*
block H.kin.*
block H.rb.*
block H.react.*
TH1F hreactx 'HMS React x; React x (cm);' H.react.x 100 -5 5
TH1F hreacty 'HMS React x; React y (cm);' H.react.y 100 -5 5
TH1F hreactz 'HMS React x; React z (cm);' H.react.z 100 -15 15
......@@ -15,5 +15,6 @@
#include "DEF-files/HMS/PRODUCTION/RASTER/hraster_histos.def"
#include "DEF-files/HMS/PRODUCTION/TRIG/htrig_histos.def"
#include "DEF-files/HMS/PRODUCTION/EPICS/hepics_vars.def"
#include "DEF-files/HMS/PRODUCTION/REACT/hreact_histos.def"
......@@ -51,7 +51,7 @@ void replay_production_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
TRG->AddDetector(hms);
// Set up the equipment to be analyzed.
THaApparatus* HMS = new THcHallCSpectrometer("H", "HMS");
THcHallCSpectrometer* HMS = new THcHallCSpectrometer("H", "HMS");
gHaApps->Add(HMS);
// Add drift chambers to HMS apparatus
THcDC* dc = new THcDC("dc", "Drift Chambers");
......@@ -75,6 +75,8 @@ void replay_production_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
// 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);
// Add Ideal Beam Apparatus
// THaApparatus* beam = new THaIdealBeam("IB", "Ideal Beamline");
// gHaApps->Add(beam);
......@@ -89,8 +91,10 @@ void replay_production_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
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 1");
hscaler->AddEvtType(1);
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);
......@@ -108,7 +112,7 @@ void replay_production_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
// Define the run(s) that we want to analyze.
// We just set up one, but this could be many.
THaRun* run = new THaRun( pathList, Form(RunFileNamePattern, RunNumber) );
THcRun* run = new THcRun( pathList, Form(RunFileNamePattern, RunNumber) );
// Set to read in Hall C run database parameters
run->SetRunParamClass("THcRunParameters");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment