JeffersonLab / hcana

Hall C++ Analyzer
7 stars 118 forks source link

Modify src/THcRaster.cxx #388

Closed MarkKJones closed 6 years ago

MarkKJones commented 6 years ago

In the ReadDatabase , added default values for optional values of fgbpma_zpos = 370.82; fgbpmb_zpos = 224.96 ;// cm fgbpmc_zpos = 129.30 ;// cm

instead of zero.

Otherwise the code would get NaN for the calculated target beam position since it was divied by zero unless this the parameters are set externally in PARAM file.

hansenjo commented 6 years ago

In cases like this, I prefer to make the parameters mandatory. These are calibration constants that don't have a good default value. The way you have it now, the class will silently calculate incorrect results if the experimental values change.

Ole

Am 14.08.2018 um 14:19 schrieb Mark K Jones notifications@github.com:

Merged #388 into develop.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.