JeffersonLab / hcana

Hall C++ Analyzer
7 stars 118 forks source link

Updated THcRaster and THcHallCSpectrmeter #393

Closed MarkKJones closed 6 years ago

MarkKJones commented 6 years ago

Modified THcRaster.cxx and THcRaster.h

1) Add tree variables for the three BPMs and projections to target in the EPICs coordinate system (+X beam right, +Y up) rb.raster.fr_xbpm_tar rb.raster.fr_ybpm_tar rb.raster.fr_xbpmA rb.raster.fr_ybpmA rb.raster.fr_xbpmB rb.raster.fr_ybpmB rb.raster.fr_xbpmC rb.raster.fr_ybpmC

2) Modified code so that it only modifies the BPM variables if they are all !=0 ( beam on) . Otherwise it sets them to the previous EPICS read. This gets rid of all zero EPICS reads,except if the first EPICs read the beam is off.

3) Removed the reading of gpbeam from the global parameter list in the Process method and just have it in ReadDatabase.

4) Change the calculation of beam at target to use the projection of BPM_A and BPM_C instead of BPM_A and BPM_B.

5) Remove setting the raster position to the hcana beam coordinate system with (+X beam left). The raster is in the EPICS coordinate system. This makes it easier to interpret the carbon hole runs.

Update THcHallCSpectrometer.cxx

Added setting of spectrometer mispointing according the the input spectrometer angle if the mispointing is not set by a parameter.

The formulas for deteriming the mispointing comes from fits to sureys.

If one wants to use different spectrometer mispointings then it is best to set hmispointing_x,hmispointing_y for HMS and pmispointing_x,pmispointing_y for SHMS in the kinematics setting file such as standard.kinematics .