8#include <tracking/trackFindingCDC/findlets/combined/AxialTrackFinderHough.h>
10#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
11#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
13#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
15#include <framework/core/ModuleParamList.templateDetails.h>
16#include <framework/core/ModuleParam.h>
19using namespace TrackFindingCDC;
33 const std::string prefix =
"";
37 moduleParamList.
getParameter<
int>(
"fineGranularityLevel").setDefaultValue(12);
38 moduleParamList.
getParameter<
int>(
"fineSectorLevelSkip").setDefaultValue(2);
40 moduleParamList.
getParameter<std::vector<float>>(
"fineCurvBounds").setDefaultValue({{ -0.02, 0.14}});
41 moduleParamList.
getParameter<
int>(
"fineDiscretePhi0Width").setDefaultValue(19);
42 moduleParamList.
getParameter<
int>(
"fineDiscretePhi0Overlap").setDefaultValue(5);
43 moduleParamList.
getParameter<
int>(
"fineDiscreteCurvWidth").setDefaultValue(1);
44 moduleParamList.
getParameter<
int>(
"fineDiscreteCurvOverlap").setDefaultValue(-1);
45 moduleParamList.
getParameter<std::vector<ParameterVariantMap>>(
"fineRelaxationSchedule")
49 moduleParamList.
getParameter<
int>(
"roughGranularityLevel").setDefaultValue(10);
50 moduleParamList.
getParameter<
int>(
"roughSectorLevelSkip").setDefaultValue(0);
51 moduleParamList.
getParameter<std::vector<float>>(
"roughCurvBounds").setDefaultValue({{ 0.0, 0.30}});
52 moduleParamList.
getParameter<
int>(
"roughDiscretePhi0Width").setDefaultValue(19);
53 moduleParamList.
getParameter<
int>(
"roughDiscretePhi0Overlap").setDefaultValue(5);
54 moduleParamList.
getParameter<
int>(
"roughDiscreteCurvWidth").setDefaultValue(1);
55 moduleParamList.
getParameter<
int>(
"roughDiscreteCurvOverlap").setDefaultValue(-1);
56 moduleParamList.
getParameter<std::vector<ParameterVariantMap>>(
"roughRelaxationSchedule")
62 return "Generates axial tracks from hits using several increasingly relaxed hough space search over phi0 and curvature.";
66 const std::string& prefix)
75 std::vector<CDCTrack>& tracks)
78 std::vector<const CDCWireHit*> axialWireHits;
79 axialWireHits.reserve(wireHits.size());
81 wireHit->unsetTemporaryFlags();
82 wireHit->unsetMaskedFlag();
83 if (not wireHit.isAxial())
continue;
84 if (wireHit->hasBackgroundFlag())
continue;
85 axialWireHits.emplace_back(&wireHit);
108std::vector<ParameterVariantMap>
111 std::vector<ParameterVariantMap> result;
118 result.push_back(ParameterVariantMap{
121 {
"maxCurv", 1.0 * 0.02},
122 {
"curvResolution", std::string(
"origin")},
123 {
"nRoadSearches", 1},
127 result.push_back(ParameterVariantMap{
130 {
"maxCurv", 2.0 * 0.02},
131 {
"curvResolution", std::string(
"origin")},
132 {
"nRoadSearches", 1},
136 for (
double minWeight = 50.0; minWeight > 10.0; minWeight *= 0.75) {
137 result.push_back(ParameterVariantMap{
139 {
"minWeight", minWeight},
141 {
"curvResolution", std::string(
"origin")},
142 {
"nRoadSearches", 1},
148 result.push_back(ParameterVariantMap{
151 {
"maxCurv", 1.0 * 0.02},
152 {
"curvResolution", std::string(
"nonOrigin")},
153 {
"nRoadSearches", 2},
157 result.push_back(ParameterVariantMap{
160 {
"maxCurv", 2.0 * 0.02},
161 {
"curvResolution", std::string(
"nonOrigin")},
162 {
"nRoadSearches", 2},
166 result.push_back(ParameterVariantMap{
170 {
"curvResolution", std::string(
"nonOrigin")},
171 {
"nRoadSearches", 2},
175 for (
double minWeight = 37.5; minWeight > 10.0; minWeight *= 0.75) {
176 result.push_back(ParameterVariantMap{
178 {
"minWeight", minWeight},
180 {
"curvResolution", std::string(
"nonOrigin")},
181 {
"nRoadSearches", 2},
189std::vector<ParameterVariantMap>
192 std::vector<ParameterVariantMap> result;
195 result.push_back(ParameterVariantMap{
198 {
"maxCurv", 1.0 * 0.02},
199 {
"curvResolution", std::string(
"nonOrigin")},
200 {
"nRoadSearches", 3},
204 result.push_back(ParameterVariantMap{
207 {
"maxCurv", 2.0 * 0.02},
208 {
"curvResolution", std::string(
"nonOrigin")},
209 {
"nRoadSearches", 3},
213 for (
double minWeight = 30.0; minWeight > 10.0; minWeight *= 0.75) {
214 result.push_back(ParameterVariantMap{
216 {
"minWeight", minWeight},
218 {
"curvResolution", std::string(
"nonOrigin")},
219 {
"nRoadSearches", 3},
The Module parameter list class.
void apply(const std::vector< const CDCWireHit * > &axialWireHits, std::vector< CDCTrack > &tracks) final
Generates the tracks from the given segments into the output argument.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
const double m_maxCurvAcceptance
Maximal curvature acceptance of the CDC.
void apply(const std::vector< CDCWireHit > &wireHits, std::vector< CDCTrack > &tracks) final
Generates the tracks from the given segments into the output argument.
std::vector< ParameterVariantMap > getDefaultFineRelaxationSchedule() const
Get a series of parameters to be set for each pass over the fine hough space.
std::string getDescription() final
Short description of the findlet.
std::vector< ParameterVariantMap > getDefaultRoughRelaxationSchedule() const
Get a series of parameters to be set for each pass over the rough hough space.
AxialTrackCreatorHitHough m_roughHoughSearch
Second hough search over a fine hough grid.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
AxialTrackMerger m_axialTrackMerger
Findlet to merge the tracks after the hough finder.
AxialTrackFinderHough()
Constructor.
AxialTrackHitMigrator m_axialTrackHitMigrator
Findlet to exchange hits between tracks based on their proximity to the respective trajectory.
AxialTrackCreatorHitHough m_fineHoughSearch
First hough search over a fine hough grid.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(const std::vector< const CDCWireHit * > &axialWireHits, std::vector< CDCTrack > &axialTracks) final
Do the hit migration.
void apply(std::vector< CDCTrack > &axialTracks, const std::vector< const CDCWireHit * > &axialWireHits) final
Merge tracks together. Allows for axial hits to be added as it may see fit.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
Class representing a hit wire in the central drift chamber.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
Abstract base class for different kinds of events.