10#include <tracking/ckf/general/findlets/SpacePointTagger.dcl.h>
12#include <tracking/trackFindingCDC/utilities/Algorithms.h>
13#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15#include <tracking/spacePointCreation/SpacePoint.h>
17#include <framework/core/ModuleParamList.templateDetails.h>
25 template <
class AResult,
class ACluster>
35 template <
class AResult,
class ACluster>
37 const std::string& prefix)
39 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"singleClusterLevel"),
41 "Mark SP as used, if the share a single cluster with the results, or if they "
44 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"markUsedSpacePoints"),
46 "Mark used space points as assigned.",
51 template <
class AResult,
class ACluster>
53 const std::vector<const SpacePoint*>& spacePoints)
59 for (
const AResult& result : results) {
60 const std::vector<const SpacePoint*>& hits = result.getHits();
68 const auto& relatedClusters = spacePoint->getRelationsTo<ACluster>();
69 for (
const ACluster& relatedCluster : relatedClusters) {
75 for (
const SpacePoint* spacePoint : spacePoints) {
77 spacePoint->setAssignmentState(
true);
85 const auto& relatedClusters = spacePoint->getRelationsTo<ACluster>();
86 for (
const ACluster& relatedCluster : relatedClusters) {
88 spacePoint->setAssignmentState(
true);
The Module parameter list class.
bool m_param_markUsedSpacePoints
bool m_param_singleClusterLevel
std::set< const ACluster * > m_usedClusters
Store the used clusters in the results.
std::set< const SpacePoint * > m_usedSpacePoints
Store the used space points in the results.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
void beginEvent() override
Clear the used clusters.
void apply(const std::vector< AResult > &results, const std::vector< const SpacePoint * > &spacePoints) override
Mark all space points as used, that they share clusters if the given kind with the results.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the findlet.
Abstract base class for different kinds of events.