24isStateValid(
const Cache& cache)
31doStateAssembly(
Cache&& cache,
const double newWeight)
33 if (!isStateValid(cache)) {
39 const double fixedWeights = 1. /
static_cast<double>(cacheSize);
41 component.weight = fixedWeights;
52 const double scalingFactor =
55 component.weight *= scalingFactor;
63prepareStateForAssembly(
Cache& cache)
66 if (!isStateValid(cache)) {
72 double const validWeightFraction = den > 0 ? cache.
validWeightSum / den : 0;
81 return x.weight > y.weight;
85 if (totalWeight != 0.) {
89 const double minimumWeight =
91 std::numeric_limits<double>::min());
95 auto lower_than = std::upper_bound(
102 auto lower_than_reverse = std::make_reverse_iterator(lower_than);
104 itr != lower_than_reverse;
110 if (!isStateValid(cache)) {
123 if (!prepareStateForAssembly(cache)) {
131 return doStateAssembly(std::move(cache), totalWeight);
Definition of component parameters for use in a mixture of many components. In this regime each track...
Helper struct representing a cache of the Multicomponent state under assembly.
MultiComponentState assembledState(MultiComponentStateAssembler::Cache &&cache)
Method to return the cached state object - it performs a reweighting before returning the object base...
std::vector< ComponentParameters > MultiComponentState
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
static constexpr double minimumFractionalWeight
Trk::MultiComponentState multiComponentState
static constexpr double minimumValidFraction