C++11 introduced strongly typed compiler constants that are declared with constexpr. Since we are using the C++11 standard for WCSim, compiler constants that were formerly untyped #define macros should be converted to constexpr constants. The following #defines appear to define such constants.
#define RNMODEL_CONC_BOTTOM 2.63 // mBq/m^{3} -> From Nakano-san et al.
#define RNMODEL_CONC_CENTER 0.1 // mBq/m^{3} -> From Nakano-san et al.
#define RNMODEL_CONC_INTERMEDIATE 0.3 // mBq/m^{3} -> Arbitrary
These are used extensively within the header file that defines them but nowhere else. It looks like much of include/RnModel_Fit_Params.hh is are constants. Strangely, the header does not declare the variables vParam_Z and vParam_R2 that it modifies. What is going on with this header?
C++11 introduced strongly typed compiler constants that are declared with
constexpr
. Since we are using the C++11 standard for WCSim, compiler constants that were formerly untyped#define
macros should be converted toconstexpr
constants. The following#define
s appear to define such constants.include/RnModel_Fit_Params.hh
In L37-L40:
These are used extensively within the header file that defines them but nowhere else. It looks like much of
include/RnModel_Fit_Params.hh
is are constants. Strangely, the header does not declare the variablesvParam_Z
andvParam_R2
that it modifies. What is going on with this header?include/RnModel_Fit_Params.hh
is only included insrc/WCSimGenerator_Radioactivity.cc
at L204 and atL234
. It is included TWICE. Worse, both times are in the body of a function definition, WCSimGenerator_Radioactivity::SetScenario(). OK, this is an unsafe abuse the#include
mechanism.Spin this off into its own issue and set it aside for now.
Originally posted by @spradlin in https://github.com/spradlin/WCSim/issues/17#issuecomment-1381879702