10#include <tracking/trackFindingCDC/findlets/base/Findlet.h>
11#include <tracking/ckf/cdc/entities/CDCCKFPath.h>
13#include <boost/range/adaptor/reversed.hpp>
14#include <boost/functional/hash.hpp>
25 void apply(std::vector<CDCCKFPath>& newPaths)
override
28 std::unordered_map<size_t, CDCCKFPath> hashToPathList;
31 if (hashToPathList.find(lastHitsHash) != hashToPathList.end()) {
32 if (hashToPathList[lastHitsHash].size() < path.size()) {
33 hashToPathList[lastHitsHash] = path;
36 hashToPathList[lastHitsHash] = path;
41 for (
const auto& hashAndPathList : hashToPathList) {
42 const CDCCKFPath& path = hashAndPathList.second;
43 newPaths.push_back(path);
52 unsigned int counter = 0;
54 for (
const CDCCKFState& state : boost::adaptors::reverse(path)) {
58 if (not state.isSeed()) {
59 boost::hash_combine(seed, state.getWireHit());
void apply(std::vector< CDCCKFPath > &newPaths) override
main method of the findlet, reads/returns merged paths
size_t lastThreeHitHash(const CDCCKFPath &path)
helper function, returns has of the last 3 wire hits on the path
Define states for CKF algorithm, which can be seed track or CDC wire hit.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
std::vector< CDCCKFState > CDCCKFPath
Shortcut for the collection of CDC CKF-algorithm states.
Abstract base class for different kinds of events.