Belle II Software development
AxialTrackMerger.h
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#pragma once
9
10#include <tracking/trackFindingCDC/findlets/base/Findlet.h>
11
12#include <tracking/trackFindingCDC/numerics/WithWeight.h>
13#include <tracking/trackFindingCDC/utilities/MayBePtr.h>
14
15#include <vector>
16#include <string>
17
18namespace Belle2 {
24 namespace TrackFindingCDC {
25 class CDCTrack;
26 class CDCWireHit;
27 class CDCTrajectory2D;
28
30 class AxialTrackMerger : public Findlet<CDCTrack&, const CDCWireHit* const> {
31
32 private:
35
36 public:
38 std::string getDescription() final;
39
41 void exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix) final;
42
44 void apply(std::vector<CDCTrack>& axialTracks, const std::vector<const CDCWireHit*>& axialWireHits) final;
45
46 private:
51 void doTracksMerging(std::vector<CDCTrack>& axialTracks,
52 const std::vector<const CDCWireHit*>& allAxialWireHits);
53
54 private:
62 template <class ACDCTracks>
63 static WithWeight<MayBePtr<CDCTrack> > calculateBestTrackToMerge(CDCTrack& track, ACDCTracks& tracks);
64
70 static double doTracksFitTogether(CDCTrack& track1, CDCTrack& track2);
71
79 static void removeStrangeHits(double factor,
80 std::vector<const CDCWireHit*>& wireHits,
81 CDCTrajectory2D& trajectory);
82
89 static void mergeTracks(CDCTrack& track1,
90 CDCTrack& track2,
91 const std::vector<const CDCWireHit*>& allAxialWireHits);
92
93 private:
95 double m_param_minFitProb = 0.85;
96 };
97 }
99}
The Module parameter list class.
Findlet implementing the merging of axial tracks found in the legendre tree search.
static WithWeight< MayBePtr< CDCTrack > > calculateBestTrackToMerge(CDCTrack &track, ACDCTracks &tracks)
Searches for the best candidate to merge this track to.
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.
static void removeStrangeHits(double factor, std::vector< const CDCWireHit * > &wireHits, CDCTrajectory2D &trajectory)
Remove all hits that are further than factor * driftlength away from the trajectory.
static void mergeTracks(CDCTrack &track1, CDCTrack &track2, const std::vector< const CDCWireHit * > &allAxialWireHits)
Function to merge two track candidates.
std::string getDescription() final
Short description of the findlet.
static double doTracksFitTogether(CDCTrack &track1, CDCTrack &track2)
Fits the hit content of both tracks in a common fit repeated with an annealing schedule removing far ...
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void doTracksMerging(std::vector< CDCTrack > &axialTracks, const std::vector< const CDCWireHit * > &allAxialWireHits)
The track finding often finds two curling tracks, originating from the same particle.
double m_param_minFitProb
Parameter : Minimal fit probability of the common fit of two tracks to be eligible for merging.
Class representing a sequence of three dimensional reconstructed hits.
Definition: CDCTrack.h:41
Particle trajectory as it is seen in xy projection represented as a circle.
Class representing a hit wire in the central drift chamber.
Definition: CDCWireHit.h:55
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Definition: Findlet.h:26
A mixin class to attach a weight to an object.
Definition: WithWeight.h:24
Abstract base class for different kinds of events.
STL namespace.