Belle II Software development
AxialTrackHitMigrator.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8#include <tracking/trackFindingCDC/findlets/minimal/AxialTrackHitMigrator.h>
9
10#include <tracking/trackFindingCDC/processing/AxialTrackUtil.h>
11
12#include <tracking/trackingUtilities/eventdata/tracks/CDCTrack.h>
13#include <tracking/trackingUtilities/eventdata/hits/CDCWireHit.h>
14
15#include <tracking/trackingUtilities/utilities/StringManipulation.h>
16
17#include <framework/core/ModuleParamList.templateDetails.h>
18
19using namespace Belle2;
20using namespace TrackFindingCDC;
21using namespace TrackingUtilities;
22
24{
25 return "Exchanges hits between axial tracks based on their distance to the respective "
26 "trajectory.";
27}
28
30 const std::string& prefix)
31{
32 moduleParamList->addParameter(prefixed(prefix, "dropDistance"),
34 "Distance for a hit to be removed.",
36
37 moduleParamList->addParameter(prefixed(prefix, "addDistance"),
39 "Distance for a hit to be added.",
41}
42
43void AxialTrackHitMigrator::apply(const std::vector<const CDCWireHit*>& axialWireHits,
44 std::vector<CDCTrack>& axialTracks)
45{
46 // First release some hits
47 for (CDCTrack& track : axialTracks) {
50 }
51
52 // Now add new ones
53 for (CDCTrack& track : axialTracks) {
54 if (track.size() < 5) continue;
57
60 }
61}
The Module parameter list class.
void apply(const std::vector< const TrackingUtilities::CDCWireHit * > &axialWireHits, std::vector< TrackingUtilities::CDCTrack > &axialTracks) final
Do the hit migration.
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.
Class representing a sequence of three dimensional reconstructed hits.
Definition CDCTrack.h:39
void addParameter(const std::string &name, T &paramVariable, 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 normalizeTrack(TrackingUtilities::CDCTrack &track)
Refit and resort the track. Unmask all hits.
static std::vector< TrackingUtilities::CDCRecoHit3D > splitBack2BackTrack(TrackingUtilities::CDCTrack &track)
Tries to split back-to-back tracks into two different tracks.
static void assignNewHitsToTrack(TrackingUtilities::CDCTrack &track, const std::vector< const TrackingUtilities::CDCWireHit * > &allAxialWireHits, double minimalDistance=0.2)
Assign new hits to the track basing on the distance from the hit to the track.
static void deleteHitsFarAwayFromTrajectory(TrackingUtilities::CDCTrack &track, double maximumDistance=0.2)
Postprocessing: Delete axial hits that do not "match" to the given track.