 |
Belle II Software
release-05-01-25
|
10 #include <tracking/trackFindingCDC/findlets/minimal/AxialTrackCreatorSegmentHough.h>
12 #include <tracking/trackFindingCDC/hough/perigee/StandardBinSpec.h>
14 #include <tracking/trackFindingCDC/fitting/CDCRiemannFitter.h>
15 #include <tracking/trackFindingCDC/fitting/CDCObservations2D.h>
17 #include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
18 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
20 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
22 #include <framework/core/ModuleParamList.templateDetails.h>
25 using namespace TrackFindingCDC;
29 return "Generates axial tracks from segments using a hough space over phi0 impact and curvature for the spares case.";
33 const std::string& prefix)
35 moduleParamList->
addParameter(prefixed(prefix,
"minNHits"),
37 "Absolute minimal number of hits to make an axial track.",
40 moduleParamList->
addParameter(prefixed(prefix,
"minFractionNHits"),
42 "Minimal number of hits as a fraction of the total hits in the event.",
45 moduleParamList->
addParameter(prefixed(prefix,
"maxLevel"),
47 "Level of divisions in the hough space.",
50 moduleParamList->
addParameter(prefixed(prefix,
"curvBounds"),
52 "Curvature bounds of the hough space.",
55 moduleParamList->
addParameter(prefixed(prefix,
"impactBounds"),
57 "Impact parameter bounds of the hough space.",
60 moduleParamList->
addParameter(prefixed(prefix,
"discretePhi0Width"),
62 "Width of the phi0 bins at the lowest level of the hough space.",
65 moduleParamList->
addParameter(prefixed(prefix,
"discretePhi0Overlap"),
67 "Overlap of the phi0 bins at the lowest level of the hough space.",
70 moduleParamList->
addParameter(prefixed(prefix,
"discreteImpactWidth"),
72 "Width of the impact bins at the lowest level of the hough space.",
75 moduleParamList->
addParameter(prefixed(prefix,
"discreteImpactOverlap"),
77 "Overlap of the impact bins at the lowest level of the hough space.",
80 moduleParamList->
addParameter(prefixed(prefix,
"discreteCurvWidth"),
82 "Width of the curvature bins at the lowest level of the hough space.",
85 moduleParamList->
addParameter(prefixed(prefix,
"discreteCurvOverlap"),
87 "Overlap of the curvature bins at the lowest level of the hough space.",
128 std::vector<CDCTrack>& tracks)
132 size_t nAxialHits = 0;
133 std::vector<const CDCSegment2D*> ptrAxialSegments;
134 ptrAxialSegments.reserve(segments.size());
137 if (segment.getStereoKind() == EStereoKind::c_Axial) {
138 ptrAxialSegments.push_back(&segment);
139 nAxialHits += segment.size();
148 using Candidate = std::pair<HoughBox, std::vector<const CDCSegment2D*> >;
149 std::vector<Candidate> candidates =
m_houghTree->findBest(minWeight);
151 for (
const Candidate& candidate : candidates) {
155 const HoughBox& foundHoughBox = candidate.first;
156 const std::vector<const CDCSegment2D*>& foundSegments = candidate.second;
165 const std::array<DiscreteCurv, 2>& curvs = foundHoughBox.getBounds<
DiscreteCurv>();
166 float lowerCurv = *(curvs[0]);
167 float upperCurv = *(curvs[1]);
179 track.sortByArcLength2D();
182 if (track.empty())
continue;
186 track.setStartTrajectory3D(startTrajectory3D);
191 track.setEndTrajectory3D(endTrajectory3D);
193 tracks.push_back(std::move(track));
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
static ESign common(ESign n1, ESign n2)
Check if two values have a common sign.
int getNOverlap() const
Getter for the overlap in discrete number of positions.
int m_param_discretePhi0Width
Parameter: Width of the phi0 bins at the lowest level of the hough space.
Class representing a three dimensional reconstructed hit.
Class implementing the Riemann fit for two dimensional trajectory circle.
Class representing a sequence of three dimensional reconstructed hits.
static const int c_curvDivisions
Fixed parameter: Number of divisions in the curv direction.
void reverse()
Reverses the trajectory in place.
Representation for a discrete position in an array of discrete positions.
double setLocalOrigin(const Vector3D &localOrigin)
Setter for the origin of the local coordinate system.
int getNOverlap() const
Getter for the overlap in discrete number of positions.
double m_param_minNHits
Parameter: Absolute minimal number of hits to make an axial track.
std::vector< float > m_param_curvBounds
Parameter: Curvature bounds of the hough space.
double m_param_minFractionNHits
Parameter: Minimal number of hits as a fraction of the total hits in the event.
double getCurvature() const
Getter for the curvature as seen from the xy projection.
int m_param_maxLevel
Parameter: Level of divisions in the hough space.
Strategy to construct discrete impact points from discrete overlap specifications.
int m_param_discretePhi0Overlap
Parameter: Overlap of the phi0 bins at the lowest level of the hough space.
Particle trajectory as it is seen in xy projection represented as a circle.
int m_param_discreteCurvOverlap
Parameter: Overlap of the curvature bins at the lowest level of the hough space.
void initialize() override
Receive and dispatch signal before the start of the event processing.
int m_param_discreteCurvWidth
Parameter: Width of the curvature bins at the lowest level of the hough space.
std::size_t appendRange(const CDCSegment2D &segment2D)
Appends all reconstructed hits from the two dimensional segment.
DiscreteCurv::Array constructArray() const
Constuct the array of discrete curv positions.
Class serving as a storage of observed drift circles to present to the Riemann fitter.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Class representing a two dimensional reconstructed hit in the central drift chamber.
Abstract base class for different kinds of events.
double getOverlap() const
Getter for the overlap in real impact to investigate the value that results from the discrete overlap...
DiscretePhi0::Array constructArray() const
Constuct the array of discrete phi0 positions.
std::unique_ptr< SimpleSegmentPhi0ImpactCurvHoughTree > m_houghTree
The hough space tree search.
void terminate() override
Receive and dispatch Signal for termination of the event processing.
void apply(const std::vector< CDCSegment2D > &segments, std::vector< CDCTrack > &tracks) final
Generates the tracks from the given segments into the output argument.
std::vector< float > m_param_impactBounds
Parameter: Impact parameter bounds of the hough space.
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
static const int c_phi0Divisions
Fixed parameter: Number of divisions in the phi0 direction.
A reconstructed sequence of two dimensional hits in one super layer.
static const int c_impactDivisions
Fixed parameter: Number of divisions in the impact direction.
Strategy to construct discrete curv points from discrete overlap specifications.
void terminate() final
Cleanup the findlet after event processing.
Type to have values not based on discrete positions from an array.
static CDCRecoHit3D reconstruct(const CDCRecoHit2D &recoHit2D, const CDCTrajectory2D &trajectory2D)
Reconstructs the three dimensional hit from the two dimensional and the two dimensional trajectory.
The Module parameter list class.
const Vector3D & getRecoPos3D() const
Getter for the 3d position of the hit.
typename InBox::HoughBox HoughBox
Type of the hough box.
std::string getDescription() final
Short description of the findlet.
Strategy to construct discrete phi0 points from discrete overlap specifications.
int m_param_discreteImpactWidth
Parameter: Width of the impact bins at the lowest level of the hough space.
Particle full three dimensional trajectory.
int m_param_discreteImpactOverlap
Parameter: Overlap of the impact bins at the lowest level of the hough space.
void initialize() final
Initialize the findlet before event processing.