8#include <tracking/vxdHoughTracking/findlets/RawTrackCandCleaner.dcl.h>
9#include <tracking/vxdHoughTracking/utilities/SVDHoughTrackingHelpers.h>
11#include <framework/core/ModuleParamList.h>
12#include <framework/core/ModuleParamList.templateDetails.h>
13#include <tracking/spacePointCreation/SpacePointTrackCand.h>
14#include <tracking/vxdHoughTracking/entities/VXDHoughState.h>
15#include <tracking/vxdHoughTracking/filters/relations/LayerRelationFilter.icc.h>
16#include <tracking/vxdHoughTracking/findlets/SVDHoughTrackingTreeSearcher.icc.h>
17#include <tracking/trackFindingCDC/filters/base/ChooseableFilter.icc.h>
18#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
19#include <tracking/trackFindingCDC/utilities/Algorithms.h>
20#include <vxd/dataobjects/VxdID.h>
22namespace Belle2::vxdHoughTracking {
38 Super::exposeParameters(moduleParamList, prefix);
39 m_relationCreator.exposeParameters(moduleParamList, prefix);
40 m_treeSearcher.exposeParameters(moduleParamList, prefix);
41 m_resultRefiner.exposeParameters(moduleParamList, prefix);
43 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"maxRelations"), m_maxRelations,
44 "Maximum number of relations allowed for entering tree search.", m_maxRelations);
55 std::vector<SpacePointTrackCand>& trackCandidates)
58 for (
auto& rawTrackCand : rawTrackCandidates) {
63 checkResizeClear<TrackFindingCDC::WeightedRelation<AHit>>(m_relations, 8192);
64 checkResizeClear<Result>(m_results, 8192);
65 checkResizeClear<SpacePointTrackCand>(m_unfilteredResults, 8192);
66 checkResizeClear<SpacePointTrackCand>(m_filteredResults, 8192);
68 m_relationCreator.apply(rawTrackCand, m_relations);
70 if (m_relations.size() > m_maxRelations) {
75 m_treeSearcher.apply(rawTrackCand, m_relations, m_results);
77 m_unfilteredResults.reserve(m_results.size());
79 std::vector<const SpacePoint*> spacePointsInResult;
80 spacePointsInResult.reserve(result.size());
82 spacePointsInResult.emplace_back(hit->getHit());
84 std::sort(spacePointsInResult.begin(), spacePointsInResult.end(), [](
const SpacePoint * a,
const SpacePoint * b) {
86 (a->getVxdID().getLayerNumber() < b->getVxdID().getLayerNumber()) or
87 (a->getVxdID().getLayerNumber() == b->getVxdID().getLayerNumber()
88 and a->getPosition().Perp() < b->getPosition().Perp());
90 m_unfilteredResults.emplace_back(spacePointsInResult);
93 for (
auto aTC : m_unfilteredResults) {
94 aTC.setFamily(family);
97 m_resultRefiner.apply(m_unfilteredResults, m_filteredResults);
100 trackCandidates.emplace_back(trackCand);
The Module parameter list class.
Storage for (VXD) SpacePoint-based track candidates.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
A mixin class to attach a weight to an object.
SVDHoughTrackingTreeSearcher< AHit, ChooseablePathFilter, Result > m_treeSearcher
perform a tree search using a cellular automaton for all the hits and relations of each raw track can...
void apply(std::vector< std::vector< AHit * > > &rawTrackCandidates, std::vector< SpacePointTrackCand > &trackCandidates) override
Reject bad SpacePointTrackCands and bad hits inside the remaining.
TrackCandidateResultRefiner m_resultRefiner
sort and refine the results for each raw track cand, performing a fit and a basic overlap check
void initialize() override
Create the store arrays.
RelationCreator< AHit, ChooseableRelationFilter > m_relationCreator
create relations between the hits in each raw track candidate
RawTrackCandCleaner()
Find intercepts in the 2D Hough space.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
~RawTrackCandCleaner()
Default destructor.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.