Belle II Software  release-08-01-10
TrackFinderSegmentTripleAutomaton.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/combined/TrackFinderSegmentTripleAutomaton.h>
9 
10 #include <tracking/trackFindingCDC/utilities/Algorithms.h>
11 
12 using namespace Belle2;
13 using namespace TrackFindingCDC;
14 
16 {
25 
26  m_axialSegmentPairs.reserve(75);
27  m_segmentTriples.reserve(100);
28  m_segmentTripleRelations.reserve(100);
29  m_preLinkingTracks.reserve(20);
30  m_orientedTracks.reserve(20);
31 }
32 
34 {
35  return "Generates tracks from segments using a cellular automaton built from segment triples.";
36 }
37 
39  const std::string& prefix)
40 {
41  m_axialSegmentPairCreator.exposeParameters(moduleParamList, prefixed(prefix, "axialSegmentPair"));
42  m_segmentTripleCreator.exposeParameters(moduleParamList, prefixed(prefix, "segmentTriple"));
43  m_segmentTripleRelationCreator.exposeParameters(moduleParamList, prefixed(prefix, "segmentTripleRelation"));
44  m_trackCreatorSegmentTripleAutomaton.exposeParameters(moduleParamList, prefixed(prefix, "segmentTripleRelation"));
45  m_trackCreatorSingleSegments.exposeParameters(moduleParamList, prefix);
46  m_trackLinker.exposeParameters(moduleParamList, prefixed(prefix, "TrackRelation"));
47  m_trackOrienter.exposeParameters(moduleParamList, prefix);
48  m_segmentTripleSwapper.exposeParameters(moduleParamList, prefix);
49 }
50 
52 {
53  m_axialSegmentPairs.clear();
54  m_segmentTriples.clear();
56  m_preLinkingTracks.clear();
57  m_orientedTracks.clear();
59 }
60 
61 void TrackFinderSegmentTripleAutomaton::apply(const std::vector<CDCSegment2D>& inputSegments,
62  std::vector<CDCTrack>& tracks)
63 {
65 
67 
68  std::vector<const CDCSegmentTriple*> segmentTriplePtrs =
69  as_pointers<const CDCSegmentTriple>(m_segmentTriples);
71 
73 
77 
78  // Put the segment triples on the DataStore
80 }
The Module parameter list class.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(const std::vector< CDCSegment2D > &inputSegments, std::vector< CDCAxialSegmentPair > &axialSegmentPairs) final
Main method constructing pairs in adjacent super layers.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
void beginEvent() override
Receive and dispatch signal for the start of a new event.
void apply(const std::vector< CDCSegment2D > &inputSegments, const std::vector< CDCAxialSegmentPair > &inputAxialSegmentPairs, std::vector< CDCSegmentTriple > &segmentTriples) final
Main method constructing pairs in adjacent super layers.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(const std::vector< CDCSegmentTriple > &inputSegmentTriples, const std::vector< WeightedRelation< const CDCSegmentTriple >> &inputSegmentTripleRelations, std::vector< CDCTrack > &outputTracks) final
Main function of the segment finding by the cellular automaton.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(const std::vector< CDCSegment2D > &segments, std::vector< CDCTrack > &tracks) final
Main algorithm.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
StoreVectorSwapper< CDCSegmentTriple > m_segmentTripleSwapper
Helper to swap the local segment triples out to the DataStore.
void apply(const std::vector< CDCSegment2D > &inputSegments, std::vector< CDCTrack > &tracks) final
Generates the tracks.
TrackOrienter m_trackOrienter
Fixes the direction of flight of tracks by a simple chooseable heuristic.
TrackCreatorSingleSegments m_trackCreatorSingleSegments
Creates tracks from left over segments.
TrackCreatorSegmentTripleAutomaton m_trackCreatorSegmentTripleAutomaton
Instance of the cellular automaton creating creating tracks over segment triple.
TrackLinker m_trackLinker
Findlet responsible for the linking of tracks.
AxialSegmentPairCreator m_axialSegmentPairCreator
Instance of the axial to axial segment pair creator.
std::string getDescription() final
Short description of the findlet.
SegmentTripleCreator m_segmentTripleCreator
Instance of the segment triple creator.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
std::vector< CDCTrack > m_preLinkingTracks
Memory for the tracks before linking was applied.
std::vector< CDCAxialSegmentPair > m_axialSegmentPairs
Memory for the axial to axial segment pairs.
TrackFinderSegmentTripleAutomaton()
Constructor registering the subordinary findlets to the processing signal distribution machinery.
std::vector< WeightedRelation< const CDCSegmentTriple > > m_segmentTripleRelations
Memory for the segment triple relations.
WeightedRelationCreator< const CDCSegmentTriple, ChooseableSegmentTripleRelationFilter > m_segmentTripleRelationCreator
Instance of the segment triple relation creator.
std::vector< CDCSegmentTriple > m_segmentTriples
Memory for the segment triples.
std::vector< CDCTrack > m_orientedTracks
Memory for the tracks after orientation was applied.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
Definition: TrackLinker.cc:28
void apply(const std::vector< CDCTrack > &inputTracks, std::vector< CDCTrack > &outputTracks) final
Main algorithm.
Definition: TrackLinker.cc:34
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply(const std::vector< CDCTrack > &inputTracks, std::vector< CDCTrack > &outputTracks) final
Main algorithm applying the adjustment of the orientation.
Abstract base class for different kinds of events.