functor improvements
Improvements to the functors:
- Adjust functor code to allow printing via the owning algorithm.
- Provide a simple implementation of Warning that doesn't spam
- @graven, @clemenci it doesn't seem like this is a thing that I should be doing...but it's also not clear what would be better. The use-case is wanting to print a warning that gets suppressed after a while, where the text of the warning is not predictable (there are a "large" number of possible texts), and the performance of the code is not a major concern (the warning exists to tell you that you are doing something suboptimal...)
- Implement Gerhard's suggestion in #60 (closed) (remove apply_single, simplifying functor definitions slightly). Closes #60 (closed).
- Support adapters, so you can write e.g.
SUM(PT)
as aCombinationCut
- Try the implementation choice of
CombinationCut
acting on a special collection-of-tracks type -- this means that for something likeMAXDOCACHI2 < 10.
the functor can remain trivial (return combination.maxdocachi2();
), with the work done in the track combination type. By definingbegin
andend
functions the track-combination type is also iterable, so something likeSUM(PT)
(scalar sum of transverse momenta) can also work naturally.
- Try the implementation choice of
- Add some functors for acting on composite particles, e.g. "DIRA" angle between momentum and flight direction, and ipchi2 of a composite particle.
- Make the
detail::ComposedFunctor
helper variadic and implement most/all operations and overloads more succinctly using it. Also add some missing operator overloads. - Add generic
detail::FunctorWithDataDeps
helper for functors that have external data dependencies - Make some functors into templates (e.g. functors using PVs are templated on the PV container type), expose this to Python but allow implicit/default behaviour in normal cases
- Improvements in the Python wrapper:
- Add missing operator overloads
__r*__
for when the LHS is a basic type. - Allow functors with exactly one argument to have it specified as a positional argument.
- Add missing operator overloads
- Allow "prepared" functors to be accessed through the type-erasure layer.
- Support variadic functor signatures and add some new functors.
- Allows
void
functors for things likeSIZE("Some/TES/Location") > 0
. - Also permits functors that explicitly take two objects, e.g.
DOCA
.
- Allows
- Reduce the verbosity of the functor factory and try to enable cling optimisation.
Miscellaneous other improvements that risked getting lost:
- Move the proxies used to iterate
LHCb::Pr::Velo::Tracks
out of the functor code (closes #72 (closed)), see LHCb MR. - Make
Pr::Selection
's iterators compatible withstd::next()
- In
TracksFTConverter
make all states get a consistentq/p
error according to the algorithm property - Import commit from @pseyfert simplifying how we can write out
SOA::Container
skin/proxy types.
Other experiments, not finalised but also quite well-contained so may be fine to merge:
- Import commit from @wouter including new vertex types (!1477 (closed)) -- thanks to merge conflicts it was easier to pick the contents in one commit than merge that other branch as-is.
- Add a track combiner algorithm based on these new vertex classes, mainly as a way of testing that the relevant functor signatures work as expected
- Add a "void filter" algorithm, which wraps a functor that takes no arguments
- Add
Phys/SelAlgorithms
andPhys/SelKernel
packages to hold new algorithms/types/utilities.
Goes with LHCb!2029 (merged) and Moore!204 (merged).
Edited by Marco Cattaneo
Merge request reports
Activity
Filter activity
mentioned in merge request Moore!204 (merged)
mentioned in merge request LHCb!2029 (merged)
added 6 commits
- 68dd21ad - Add some accessors and tweak include order.
- 60934f5a - Use TrackCompactVertex as the output type.
- bf5ca795 - Add some helpers for calculating PV association.
- 11573162 - Expose result_type and prepared_type member types of
- 64a88ea8 - Provide getBestPVRel helper in addition to
- b9018459 - Reorganise and make some names shorter.
Toggle commit list- [2019-07-17 00:14] Validation started with lhcb-lcg-dev4#966
- [2019-07-18 00:16] Validation started with lhcb-lcg-dev4#967
- [2019-07-19 10:25] Validation started with lhcb-lcg-dev4#968
- [2019-07-20 00:12] Validation started with lhcb-lcg-dev4#969
- [2019-07-21 00:12] Validation started with lhcb-lcg-dev4#970
- [2019-07-22 00:10] Validation started with lhcb-lcg-dev4#971
- [2019-07-23 01:11] Validation started with lhcb-lcg-dev4#973
- [2019-07-24 00:12] Validation started with lhcb-lcg-dev4#974
- [2019-07-25 00:21] Validation started with lhcb-lcg-dev4#975
- [2019-07-26 00:07] Validation started with lhcb-lcg-dev4#976
- [2019-07-27 00:06] Validation started with lhcb-lcg-dev4#977
- [2019-07-28 00:13] Validation started with lhcb-lcg-dev4#978
- [2019-07-29 00:06] Validation started with lhcb-lcg-dev4#979
Edited by Software for LHCbadded 24 commits
-
48f18ac8...e0d119f8 - 7 commits from branch
master
- e24a5f77 - Move to SOA::contiguous_const_view_from_skin_t
- 9f846bbc - Add TrackCompactVertex and TrackNProngVertex (see !1477 (closed)).
- 42d1726f - Add missing include and chi2PerDoF() accessor (for use by the functors) to...
- 398715a3 - Support std::next() on Pr::Selection iterators.
- e1086b3c - Rename the actual C++ type to Pr::LegacyFilter, keep the Configurable name...
- b7f90df5 - - Print a warning if we mix AVX (stack) with scalar (JITed) code.
- 3a65139b - Add some accessors and tweak include order.
- 5273bc0b - Use TrackCompactVertex as the output type.
- cc6407ea - Add some helpers for calculating PV association.
- 5b80655b - Expose result_type and prepared_type member types of
- 9fd6dbff - Provide getBestPVRel helper in addition to
- 7ec9e63a - Reorganise and make some names shorter.
- f08b51fd - Add operator[] to access tracks in a combination.
- e38a0d36 - Implement dumping of child quantities.
- 96fa6f01 - - Retire FunctorUsingPVs in favour of the
- c8e25fca - Add more dumping.
- 757d77cb - Add functors.
Toggle commit list-
48f18ac8...e0d119f8 - 7 commits from branch
- Resolved by Olli Lupton
- Resolved by Olli Lupton
Brunel tests are looking good (just one functor no longer loaded from Cache), see https://lhcb-nightlies.cern.ch/logs/tests/nightly/lhcb-lcg-dev4/969/x86_64-centos7-gcc8-opt/Brunel/
added 31 commits
-
f85feeda...1b7edc5a - 9 commits from branch
master
- e63f77ab - Move to SOA::contiguous_const_view_from_skin_t
- bee7573f - Add TrackCompactVertex and TrackNProngVertex (see !1477 (closed)).
- 2d17ae33 - Add missing include and chi2PerDoF() accessor (for use by the functors) to...
- b692163e - Support std::next() on Pr::Selection iterators.
- e23e1164 - Rename the actual C++ type to Pr::LegacyFilter, keep the Configurable name...
- e2563c4a - - Print a warning if we mix AVX (stack) with scalar (JITed) code.
- d5c0349f - Add some accessors and tweak include order.
- 7c4819db - Use TrackCompactVertex as the output type.
- 7a493add - Add some helpers for calculating PV association.
- 31f1c2bc - Expose result_type and prepared_type member types of
- b61b39ec - Provide getBestPVRel helper in addition to
- dda766f5 - Reorganise and make some names shorter.
- 58a716b0 - Add operator[] to access tracks in a combination.
- 4073ed29 - Implement dumping of child quantities.
- 2477e5a0 - - Retire FunctorUsingPVs in favour of the
- 0876b7d1 - Add more dumping.
- 04b715ca - Add functors.
- 63df79f7 - Remove extraneous semicolon.
- b2e9861f - Improvements for composite ipchi2/vertex association.
- baaf3f34 - Use the same q/p error in all states.
- 893df7c9 - Use enum type for error code.
- 202ac593 - Add [p]{x,y,z} accessors.
Toggle commit list-
f85feeda...1b7edc5a - 9 commits from branch
added 2 commits
added 1 commit
- d4c475d4 - Make operators and transformations more succinct.
Please register or sign in to reply