9 #include <tracking/ckf/svd/findlets/CKFToSVDFindlet.h>
11 #include <tracking/ckf/general/findlets/SpacePointTagger.icc.h>
12 #include <tracking/ckf/general/findlets/StateCreatorWithReversal.icc.h>
13 #include <tracking/ckf/general/findlets/StateCreator.icc.h>
14 #include <tracking/ckf/general/findlets/CKFRelationCreator.icc.h>
15 #include <tracking/ckf/general/findlets/TreeSearcher.icc.h>
16 #include <tracking/ckf/general/findlets/OverlapResolver.icc.h>
17 #include <tracking/ckf/general/findlets/StateRejecter.icc.h>
18 #include <tracking/ckf/general/findlets/ResultStorer.icc.h>
19 #include <tracking/ckf/general/utilities/Helpers.h>
21 #include <tracking/trackFindingCDC/filters/base/ChooseableFilter.icc.h>
22 #include <tracking/ckf/svd/filters/relations/LayerSVDRelationFilter.icc.h>
24 #include <framework/core/ModuleParamList.h>
27 using namespace TrackFindingCDC;
33 addProcessingSignalListener(&m_dataHandler);
34 addProcessingSignalListener(&m_hitsLoader);
35 addProcessingSignalListener(&m_stateCreatorFromTracks);
36 addProcessingSignalListener(&m_stateCreatorFromHits);
37 addProcessingSignalListener(&m_relationCreator);
38 addProcessingSignalListener(&m_treeSearchFindlet);
39 addProcessingSignalListener(&m_overlapResolver);
40 addProcessingSignalListener(&m_spacePointTagger);
41 addProcessingSignalListener(&m_resultStorer);
46 Super::exposeParameters(moduleParamList, prefix);
48 m_dataHandler.exposeParameters(moduleParamList, prefix);
49 m_hitsLoader.exposeParameters(moduleParamList, prefix);
50 m_stateCreatorFromTracks.exposeParameters(moduleParamList, prefix);
51 m_stateCreatorFromHits.exposeParameters(moduleParamList, prefix);
52 m_relationCreator.exposeParameters(moduleParamList, prefix);
53 m_treeSearchFindlet.exposeParameters(moduleParamList, prefix);
54 m_overlapResolver.exposeParameters(moduleParamList, prefix);
55 m_spacePointTagger.exposeParameters(moduleParamList, prefix);
56 m_resultStorer.exposeParameters(moduleParamList, prefix);
58 moduleParamList->
addParameter(
"minimalHitRequirement", m_param_minimalHitRequirement,
59 "Minimal Hit requirement for the results (counted in space points)",
60 m_param_minimalHitRequirement);
62 moduleParamList->
getParameter<std::string>(
"firstHighFilter").setDefaultValue(
"mva_with_direction_check");
63 moduleParamList->
getParameter<std::string>(
"advanceHighFilter").setDefaultValue(
"advance");
64 moduleParamList->
getParameter<std::string>(
"secondHighFilter").setDefaultValue(
"mva");
65 moduleParamList->
getParameter<std::string>(
"updateHighFilter").setDefaultValue(
"fit");
66 moduleParamList->
getParameter<std::string>(
"thirdHighFilter").setDefaultValue(
"mva");
68 moduleParamList->
getParameter<std::string>(
"filter").setDefaultValue(
"mva");
70 moduleParamList->
getParameter<std::string>(
"hitFilter").setDefaultValue(
"sensor");
71 moduleParamList->
getParameter<std::string>(
"seedFilter").setDefaultValue(
"all");
72 moduleParamList->
getParameter<std::string>(
"preSeedFilter").setDefaultValue(
"loose");
73 moduleParamList->
getParameter<std::string>(
"preHitFilter").setDefaultValue(
"loose");
75 moduleParamList->
getParameter<std::string>(
"hitsSpacePointsStoreArrayName").setDefaultValue(
"SVDSpacePoints");
77 moduleParamList->
getParameter<
bool>(
"useAssignedHits").setDefaultValue(
false);
88 m_cdcRecoTrackVector.clear();
89 checkResizeClear<const SpacePoint*>(m_spacePointVector, 40000);
92 checkResizeClear<CKFToSVDState>(m_states, 40000);
94 checkResizeClear<TrackFindingCDC::WeightedRelation<CKFToSVDState>>(m_relations, 100000);
97 m_filteredResults.clear();
102 m_dataHandler.apply(m_cdcRecoTrackVector);
103 m_hitsLoader.apply(m_spacePointVector);
105 B2DEBUG(29,
"Now have " << m_spacePointVector.size() <<
" hits.");
107 if (m_spacePointVector.empty() or m_cdcRecoTrackVector.empty()) {
111 m_stateCreatorFromTracks.apply(m_cdcRecoTrackVector, m_seedStates);
112 m_stateCreatorFromHits.apply(m_spacePointVector, m_states);
113 m_relationCreator.apply(m_seedStates, m_states, m_relations);
115 B2DEBUG(29,
"Created " << m_relations.size() <<
" relations.");
116 m_treeSearchFindlet.apply(m_seedStates, m_states, m_relations, m_results);
118 B2DEBUG(29,
"Having found " << m_results.size() <<
" results before overlap check");
121 return result.getHits().size() < m_param_minimalHitRequirement;
123 TrackFindingCDC::erase_remove_if(m_results, hasLowHitNumber);
125 m_overlapResolver.apply(m_results, m_filteredResults);
127 B2DEBUG(29,
"Having found " << m_filteredResults.size() <<
" results");
129 m_resultStorer.apply(m_filteredResults);
130 m_spacePointTagger.apply(m_filteredResults, m_spacePointVector);
~CKFToSVDFindlet() override
Default desctructor.
void beginEvent() override
Clear the object pools.
CKFToSVDFindlet()
Constructor, for setting module description and parameters.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the sub findlets.
void apply() override
Do the track/hit finding/merging.
The Module parameter list class.
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.