JeffersonLab / hcana

Hall C++ Analyzer
7 stars 118 forks source link

Modify THcRaster #402

Closed MarkKJones closed 6 years ago

MarkKJones commented 6 years ago

first commit

Modify THcRaster to add variable of EPICS beam energy

Add the variable ebeam_epics to the tree. This is the EPICS value of HALLC:p . For now this is good for monitoring changes in the beam energy but needs to be check how it compares to the Hall C beam energy measurement.

Second commit

Modify THCRaster

Main change was to allow the beam X and Y positions and angle at the target to be read in through parameters instead of always using the EPICS data. This gives added flexibility.

If either of the beam position parameters (gbeam_xoff or gbeam_yoff) are read-in as parameters, then the code uses the read-in parameters as the BPM position at target. If there are other beam position or angle parameter that are not read in then they are set to zero.

1) Modify THcRaster.h a) Added variables for X and Y beam angles at target. b) Added variable fFlag_use_EPICS_bpm which is a flag that is determines whether the code uses the parameters or EPICS reads.

2) Modified THcRaster.cxx a) set default BPM z-positions to Fall 2018 survey. b) Modified Process method so that the BPM position/angle variables that are set by parameters are no longer recalculated. Just use the existing variables fXbpm_tar, fYbpm_tar, fXpbpm_tar and fYPbpm_tar throughout the method.