8#include <tracking/trackFindingCDC/findlets/combined/AxialTrackFinderHough.h>
10#include <tracking/trackingUtilities/eventdata/tracks/CDCTrack.h>
11#include <tracking/trackingUtilities/eventdata/hits/CDCWireHit.h>
13#include <tracking/trackingUtilities/utilities/StringManipulation.h>
15#include <framework/core/ModuleParamList.templateDetails.h>
16#include <framework/core/ModuleParam.h>
19using namespace TrackFindingCDC;
20using namespace TrackingUtilities;
34 const std::string prefix =
"";
38 moduleParamList.
getParameter<
int>(
"fineGranularityLevel").setDefaultValue(12);
39 moduleParamList.
getParameter<
int>(
"fineSectorLevelSkip").setDefaultValue(2);
41 moduleParamList.
getParameter<std::vector<float>>(
"fineCurvBounds").setDefaultValue({{ -0.02, 0.14}});
42 moduleParamList.
getParameter<
int>(
"fineDiscretePhi0Width").setDefaultValue(19);
43 moduleParamList.
getParameter<
int>(
"fineDiscretePhi0Overlap").setDefaultValue(5);
44 moduleParamList.
getParameter<
int>(
"fineDiscreteCurvWidth").setDefaultValue(1);
45 moduleParamList.
getParameter<
int>(
"fineDiscreteCurvOverlap").setDefaultValue(-1);
46 moduleParamList.
getParameter<std::vector<ParameterVariantMap>>(
"fineRelaxationSchedule")
50 moduleParamList.
getParameter<
int>(
"roughGranularityLevel").setDefaultValue(10);
51 moduleParamList.
getParameter<
int>(
"roughSectorLevelSkip").setDefaultValue(0);
52 moduleParamList.
getParameter<std::vector<float>>(
"roughCurvBounds").setDefaultValue({{ 0.0, 0.30}});
53 moduleParamList.
getParameter<
int>(
"roughDiscretePhi0Width").setDefaultValue(19);
54 moduleParamList.
getParameter<
int>(
"roughDiscretePhi0Overlap").setDefaultValue(5);
55 moduleParamList.
getParameter<
int>(
"roughDiscreteCurvWidth").setDefaultValue(1);
56 moduleParamList.
getParameter<
int>(
"roughDiscreteCurvOverlap").setDefaultValue(-1);
57 moduleParamList.
getParameter<std::vector<ParameterVariantMap>>(
"roughRelaxationSchedule")
63 return "Generates axial tracks from hits using several increasingly relaxed hough space search over phi0 and curvature.";
67 const std::string& prefix)
76 std::vector<CDCTrack>& tracks)
79 std::vector<const CDCWireHit*> axialWireHits;
80 axialWireHits.reserve(wireHits.size());
82 wireHit->unsetTemporaryFlags();
83 wireHit->unsetMaskedFlag();
84 if (not wireHit.isAxial())
continue;
85 if (wireHit->hasBackgroundFlag())
continue;
86 axialWireHits.emplace_back(&wireHit);
109std::vector<ParameterVariantMap>
112 std::vector<ParameterVariantMap> result;
119 result.push_back(ParameterVariantMap{
122 {
"maxCurv", 1.0 * 0.02},
123 {
"curvResolution", std::string(
"origin")},
124 {
"nRoadSearches", 1},
128 result.push_back(ParameterVariantMap{
131 {
"maxCurv", 2.0 * 0.02},
132 {
"curvResolution", std::string(
"origin")},
133 {
"nRoadSearches", 1},
137 for (
double minWeight = 50.0; minWeight > 10.0; minWeight *= 0.75) {
138 result.push_back(ParameterVariantMap{
140 {
"minWeight", minWeight},
142 {
"curvResolution", std::string(
"origin")},
143 {
"nRoadSearches", 1},
149 result.push_back(ParameterVariantMap{
152 {
"maxCurv", 1.0 * 0.02},
153 {
"curvResolution", std::string(
"nonOrigin")},
154 {
"nRoadSearches", 2},
158 result.push_back(ParameterVariantMap{
161 {
"maxCurv", 2.0 * 0.02},
162 {
"curvResolution", std::string(
"nonOrigin")},
163 {
"nRoadSearches", 2},
167 result.push_back(ParameterVariantMap{
171 {
"curvResolution", std::string(
"nonOrigin")},
172 {
"nRoadSearches", 2},
176 for (
double minWeight = 37.5; minWeight > 10.0; minWeight *= 0.75) {
177 result.push_back(ParameterVariantMap{
179 {
"minWeight", minWeight},
181 {
"curvResolution", std::string(
"nonOrigin")},
182 {
"nRoadSearches", 2},
190std::vector<ParameterVariantMap>
193 std::vector<ParameterVariantMap> result;
196 result.push_back(ParameterVariantMap{
199 {
"maxCurv", 1.0 * 0.02},
200 {
"curvResolution", std::string(
"nonOrigin")},
201 {
"nRoadSearches", 3},
205 result.push_back(ParameterVariantMap{
208 {
"maxCurv", 2.0 * 0.02},
209 {
"curvResolution", std::string(
"nonOrigin")},
210 {
"nRoadSearches", 3},
214 for (
double minWeight = 30.0; minWeight > 10.0; minWeight *= 0.75) {
215 result.push_back(ParameterVariantMap{
217 {
"minWeight", minWeight},
219 {
"curvResolution", std::string(
"nonOrigin")},
220 {
"nRoadSearches", 3},
The Module parameter list class.
const double m_maxCurvAcceptance
Maximal curvature acceptance of the CDC.
std::vector< TrackingUtilities::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.
Findlet< const TrackingUtilities::CDCWireHit, TrackingUtilities::CDCTrack > Super
Type of the base class.
void apply(const std::vector< TrackingUtilities::CDCWireHit > &wireHits, std::vector< TrackingUtilities::CDCTrack > &tracks) final
Generates the tracks from the given segments into the output argument.
std::vector< TrackingUtilities::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.
Class representing a hit wire in the central drift chamber.
void addProcessingSignalListener(ProcessingSignalListener *psl)
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
Abstract base class for different kinds of events.