8 #include <tracking/modules/cosmicsTrackMerger/CosmicsTrackMergerFindlet.h>
10 #include <tracking/trackFindingCDC/utilities/WeightedRelation.h>
11 #include <tracking/trackFindingCDC/utilities/Algorithms.h>
14 using namespace TrackFindingCDC;
18 this->addProcessingSignalListener(&m_trackRelationCreator);
23 return "Links tracks by extraction of track paths in a cellular automaton.";
28 m_trackRelationCreator.exposeParameters(moduleParamList, prefix);
29 m_cellularPathFinder.exposeParameters(moduleParamList, prefix);
31 moduleParamList->
addParameter(
"inputRecoTracks", m_param_inputRecoTracks,
32 "Store Array name of the input reco tracks.", m_param_inputRecoTracks);
33 moduleParamList->
addParameter(
"outputRecoTracks", m_param_outputRecoTracks,
34 "Store Array name of the output reco tracks.", m_param_outputRecoTracks);
39 m_inputTracks.isRequired(m_param_inputRecoTracks);
49 m_inputTrackVector.clear();
52 for (
const RecoTrack& recoTrack : m_inputTracks) {
53 m_inputTrackVector.emplace_back(&recoTrack);
56 std::sort(m_inputTrackVector.begin(), m_inputTrackVector.end());
59 std::vector<const CellularRecoTrack*> trackPtrs = as_pointers<const CellularRecoTrack>(m_inputTrackVector);
62 m_trackRelations.clear();
63 m_trackRelationCreator.apply(trackPtrs, m_trackRelations);
67 m_cellularPathFinder.apply(trackPtrs, m_trackRelations, m_trackPaths);
72 for (
const std::vector<const CellularRecoTrack*>& trackPath : m_trackPaths) {
74 const RecoTrack* firstTrack = *(trackPath.front());
77 unsigned int numberOfAddedHits = 0;
void initialize() final
Init the store arrays.
std::string getDescription() final
Short description of the findlet.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
void apply() final
Main algorithm.
CosmicsTrackMergerFindlet()
Constructor adding the filter as a subordinary processing signal listener.
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
The Module parameter list class.
This is the Reconstruction Event-Data Model Track.
size_t addHitsFromRecoTrack(const RecoTrack *recoTrack, unsigned int sortingParameterOffset=0, bool reversed=false, std::optional< double > optionalMinimalWeight=std::nullopt)
Add all hits from another RecoTrack to this RecoTrack.
RecoTrack * copyToStoreArray(StoreArray< RecoTrack > &storeArray) const
Append a new RecoTrack to the given store array and copy its general properties, but not the hits the...
static void registerRequiredRelations(StoreArray< RecoTrack > &recoTracks, std::string const &pxdHitsStoreArrayName="", std::string const &svdHitsStoreArrayName="", std::string const &cdcHitsStoreArrayName="", std::string const &bklmHitsStoreArrayName="", std::string const &eklmHitsStoreArrayName="", std::string const &recoHitInformationStoreArrayName="")
Convenience method which registers all relations required to fully use a RecoTrack.
Mixin class to attach an automaton cell to an object or pointer.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.