Belle II Software development
TrackFinderAutomaton.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/complete/TrackFinderAutomaton.h>
9
10#include <framework/core/ModuleParamList.templateDetails.h>
11#include <framework/core/ModuleParam.h>
12
13#include <vector>
14
15using namespace Belle2;
16using namespace TrackFindingCDC;
17using namespace TrackingUtilities;
18
20{
24
31
32 ModuleParamList moduleParamList;
33 const std::string prefix = "";
34 this->exposeParameters(&moduleParamList, prefix);
35 moduleParamList.getParameter<std::string>("flightTimeEstimation").setDefaultValue("outwards");
36 moduleParamList.getParameter<std::string>("TrackOrientation").setDefaultValue("outwards");
37
38 // Mimics earlier behaviour
39 moduleParamList.getParameter<bool>("WriteSegments").setDefaultValue(true);
40
41 m_wireHits.reserve(1000);
42 m_clusters.reserve(100);
43 m_superClusters.reserve(100);
44 m_segments.reserve(100);
45 m_tracks.reserve(20);
46}
47
49{
50 return "Performs pattern recognition in the CDC based on local hit following and application of a cellular automaton in two stages.";
51}
52
53void TrackFinderAutomaton::exposeParameters(ModuleParamList* moduleParamList, const std::string& prefix)
54{
55 m_wireHitsSwapper.exposeParameters(moduleParamList, prefix);
56 m_segmentsSwapper.exposeParameters(moduleParamList, prefix);
57 m_tracksSwapper.exposeParameters(moduleParamList, prefix);
58
59 m_wireHitPreparer.exposeParameters(moduleParamList, prefix);
60 m_clusterPreparer.exposeParameters(moduleParamList, prefix);
61 m_segmentFinderFacetAutomaton.exposeParameters(moduleParamList, prefix);
62 m_trackFinderSegmentPairAutomaton.exposeParameters(moduleParamList, prefix);
63 m_trackFlightTimeAdjuster.exposeParameters(moduleParamList, prefix);
64 m_trackExporter.exposeParameters(moduleParamList, prefix);
65}
66
68{
69 m_wireHits.clear();
70 m_clusters.clear();
71 m_superClusters.clear();
72 m_segments.clear();
73 m_tracks.clear();
75}
76
78{
79 // Acquire the wire hits, segments and tracks from the DataStore in case they have already been created
83
90
91 // Put the segments and tracks on the DataStore
95}
The Module parameter list class.
SegmentFinderFacetAutomaton m_segmentFinderFacetAutomaton
First stage cellular automaton segment finder.
TrackExporter m_trackExporter
Exports the generated CDCTracks as RecoTracks.
std::vector< TrackingUtilities::CDCTrack > m_tracks
Memory for the tracks.
WireHitPreparer m_wireHitPreparer
Preparation findlet creating the wire hits from the packed CDCHits.
std::string getDescription() override
Short description of the findlet.
void beginEvent() final
Signal the beginning of a new event.
std::vector< TrackingUtilities::CDCSegment2D > m_segments
Memory for the segments.
TrackFinderAutomaton()
Constructor registering the subordinary findlets to the processing signal distribution machinery.
TrackingUtilities::StoreVectorSwapper< TrackingUtilities::CDCWireHit, true > m_wireHitsSwapper
Puts the internal segments on the DataStore.
std::vector< TrackingUtilities::CDCWireHitCluster > m_clusters
Memory for the wire hits cluster.
std::vector< TrackingUtilities::CDCWireHit > m_wireHits
Memory for the wire hits.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
TrackFinderSegmentPairAutomaton m_trackFinderSegmentPairAutomaton
Second stage cellular automaton track finder from segments.
std::vector< TrackingUtilities::CDCWireHitCluster > m_superClusters
Memory for the wire hits super clusters.
ClusterPreparer m_clusterPreparer
Preparation findlet creating the clusters wire hits forming locally connected groups.
TrackingUtilities::StoreVectorSwapper< TrackingUtilities::CDCSegment2D > m_segmentsSwapper
Puts the internal segments on the DataStore.
TrackingUtilities::StoreVectorSwapper< TrackingUtilities::CDCTrack > m_tracksSwapper
Puts the internal segments on the DataStore.
TrackFlightTimeAdjuster m_trackFlightTimeAdjuster
Adjusts the flight time of the tracks to a setable trigger point.
void addProcessingSignalListener(ProcessingSignalListener *psl)
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
Abstract base class for different kinds of events.