8#include <tracking/trackFindingCDC/findlets/minimal/AxialTrackHitMigrator.h>
10#include <tracking/trackFindingCDC/processing/AxialTrackUtil.h>
12#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
13#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
15#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
17#include <framework/core/ModuleParamList.templateDetails.h>
20using namespace TrackFindingCDC;
24 return "Exchanges hits between axial tracks based on their distance to the respective "
29 const std::string& prefix)
31 moduleParamList->
addParameter(prefixed(prefix,
"dropDistance"),
33 "Distance for a hit to be removed.",
36 moduleParamList->
addParameter(prefixed(prefix,
"addDistance"),
38 "Distance for a hit to be added.",
43 std::vector<CDCTrack>& axialTracks)
46 for (
CDCTrack& track : axialTracks) {
52 for (
CDCTrack& track : axialTracks) {
53 if (track.size() < 5)
continue;
The Module parameter list class.
double m_param_addDistance
Parameter : Distance for a hit to be added.
std::string getDescription() final
Short description of the findlet.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
double m_param_dropDistance
Parameter : Distance for a hit to be removed.
void apply(const std::vector< const CDCWireHit * > &axialWireHits, std::vector< CDCTrack > &axialTracks) final
Do the hit migration.
Class representing a sequence of three dimensional reconstructed hits.
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.
static void assignNewHitsToTrack(CDCTrack &track, const std::vector< const CDCWireHit * > &allAxialWireHits, double minimalDistance=0.2)
Assign new hits to the track basing on the distance from the hit to the track.
static void normalizeTrack(CDCTrack &track)
Refit and resort the track. Unmask all hits.
static void deleteHitsFarAwayFromTrajectory(CDCTrack &track, double maximumDistance=0.2)
Postprocessing: Delete axial hits that do not "match" to the given track.
static std::vector< CDCRecoHit3D > splitBack2BackTrack(CDCTrack &track)
Tries to split back-to-back tracks into two different tracks.