Skip to content

v0.8.0

Latest
Compare
Choose a tag to compare
@c-dilks c-dilks released this 27 Nov 21:47
· 3 commits to main since this release
f1c7259

⚠️ Breaking Changes ⚠️

Handling Data-dependent Configuration Parameters

We now support data-dependent configuration in a thread safe way; for example, a configuration parameter that depends on the run number may only be set once the run number is known, and the run number can only be determined by reading the data. The run number may change while reading through the data, therefore the configuration parameter must be occasionally reloaded on-the-fly, but this must be done in a thread-safe manner.

If you use action functions, keep reading this section for the required changes; otherwise, if you use Run functions, you may skip to the next section since you are not impacted by these changes.

Two algorithms are impacted by this change, both requiring their function PrepareEvent to be called for each event before calling their action functions:

// physics::InclusiveKinematics
concurrent_key_t PrepareEvent(int const runnum, double const beam_energy = -1) const;

// clas12::ZVertexFilter
concurrent_key_t PrepareEvent(int const runnum) const;

This function handles the loading of configuration parameters for a given run number (runnum); furthermore, physics::InclusiveKinematics may use the RCDB to get the beam energy (if beam_energy argument is -1), or the caller may supply their own beam energy if preferred or needed.

Their return value is type concurrent_key_t, an integer, is a "hash key" and must be passed to the action function so that the correct configuration parameters are used.

The action function clas12::ZVertexFilter::Filter now requires additional parameters, in addition to the key:

- bool Filter(double const zvertex) const;
+ bool Filter(double const zvertex, int const pid, int const status, concurrent_key_t const key) const;
  • pid and status are additional properties from the particle bank row
  • key is the return value of PrepareEvent

Similarly, the action function physics::InclusiveKinematics::ComputeFromLepton also now requires a key as its last parameter:

- InclusiveKinematicsVars ComputeFromLepton(vector_element_t const lepton_px, vector_element_t const lepton_py, vector_element_t const lepton_pz) const;
+ InclusiveKinematicsVars ComputeFromLepton(vector_element_t const lepton_px, vector_element_t const lepton_py, vector_element_t const lepton_pz, concurrent_key_t const key) const;

The following pull requests are related to the above changes:

Removal of LorentzTransformer Algorithm

One other breaking change is the removal of the LorentzTransformer algorithm. This algorithm was just an example, and is not particularly useful since it is difficult to generalize. Details:

  • refactor!: remove LorentzTransformer example algorithm by @c-dilks in #286

⭐ Primary Changes ⭐

Updates

  • Sector Finder: Support for charged & neutral particles, added action function and validator by @rtysonCLAS12 in #243
  • feat: chameleon, a tool for language binding generation by @c-dilks in #250
    • we currently only use this to generate Fortran bindings
    • we plan to use this to also generate bindings and tests for other languages
    • Python bindings are still generated by cppyy
  • feat: thread-safe configuration reload functions by @c-dilks in #258
    • this is the data-dependent configuration handling mentioned above
    • some algorithms action functions have changed with the addition of this feature (see above)
  • feat: use RCDB to get the beam energy by @c-dilks in #256
  • feat: set configuration files and directories for all algorithms in an AlgorithmSequence by @c-dilks in #297
    • this is a convenience feature, so that users do not have to set custom configuration
      files or directories for each algorithm in an AlgorithmSequence; instead they
      only need to do so once
  • feat: set algorithm log levels from config yaml files by @c-dilks in #298
    • this allows the log level to be controlled from configuration yaml files, for convenience
    • example YAML syntax: log: trace

New Algorithms

🚧 Technical Changes 🚧

  • fix: treat warnings as errors and fix them by @c-dilks in #239
  • ci: repeat benchmarks and get average time by @c-dilks in #241
  • style: meson formatting by @c-dilks in #247
  • fix: const parameters of action functions by @c-dilks in #255
  • fix(ci): brew errors Broken pipe @ io_writev by @c-dilks in #248
  • fix(ci): no need for meson argument --cmake-prefix-path since we already set $CMAKE_PREFIX_PATH by @c-dilks in #252
  • fix: add FD cut for pre-filter photons in PhotonGBTFilter validator by @c-dilks in #254
  • fix: test minimum and latest ROOT versions by @c-dilks in #264
  • build(chameleon): decrease minimum ruby version and test it by @c-dilks in #257
  • build: decrease ROOT minimum version 6.28.12 -> 6.28.10 by @c-dilks in #266
  • feat(build): dump the project options by @c-dilks in #265
  • fix(chameleon): compatibility with Ruby 3.2 by @c-dilks in #269
  • fix(ci): fallback to alternate ALA mirror by @c-dilks in #273
  • fix(CI): mitigate GitHub API rate limit by @c-dilks in #276
  • ci: HIPO 4.2.0 testing by @c-dilks in #270
  • fix: workaround -Wstringop-overflow warnings from fmt by @c-dilks in #278
  • ci: add workflow_dispatch trigger by @c-dilks in #280
  • doc: simplify dependencies list by @c-dilks in #287
  • fix: iguana_test commands' usage guide by @c-dilks in #292
  • fix: handle wrapper arguments when sourcing this_iguana.sh by @c-dilks in #296
  • feat: change Algorithm::GetBankIndex to a public method by @c-dilks in #299
  • feat: add pindex to InclusiveKinematicsVars by @c-dilks in #301
  • fix: pindex should be short by @c-dilks in #302
  • feat: calculate PhPerp for SIDIS hadrons and dihadrons by @c-dilks in #304
  • fix: disable coverage test until fixed by @c-dilks in #305
  • feat: allow for SQLite DBMS for RCDB by @c-dilks in #288
  • build: make RCDB DBMS support optional by @c-dilks in #307
  • refactor: use hipo::getBanklistIndex to get bank indices by @c-dilks in #300
  • fix(doc): action functions must use action_function docstring, and non-action functions must not by @c-dilks in #312

Full Changelog: v0.7.1...v0.8.0