CbmRoot
Loading...
Searching...
No Matches
TrackingChain.h
Go to the documentation of this file.
1/* Copyright (C) 2023-2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#pragma once
11
12#include "CaDataManager.h"
13#include "CaFramework.h"
14#include "CaQa.h"
15#include "CaTrack.h"
16#include "CaTrackingMonitor.h"
17#include "CaVector.h"
18#include "PartitionedSpan.h"
19#include "RecoResults.h"
20#include "SubChain.h"
21#include "TrackingChainConfig.h"
22#include "TrackingDefs.h"
23#include "TrackingSetup.h"
24#include "sts/Hit.h"
25#include "tof/Hit.h"
26
27#include <memory>
28#include <vector>
29
30namespace cbm::algo::qa
31{
32 class Manager;
33}
34
35namespace cbm::algo
36{
41 class TrackingChain : public SubChain {
42 public:
47 TrackingChain(ECbmRecoMode recoMode, const std::unique_ptr<cbm::algo::qa::Manager>& qaManager = nullptr,
48 std::string_view name = "");
49
57
79
81 const ca::TrackingMonitor& GetCaMonitor() const { return fCaMonitor; }
82
84 void Init();
85
87 void RegisterSetup(std::shared_ptr<TrackingSetup> pSetup) { fpSetup = pSetup; }
88
92 Output_t Run(Input_t recoResults);
93
95 void Finalize();
96
97
98 private:
99 // *********************
100 // ** Utility functions
101
104 void PrepareInput(Input_t recoResults);
105
107 Output_t PrepareOutput();
108
112 template<ca::EDetectorID DetID>
114
115 // *************************
116 // ** Framework variables
117
123
124 std::shared_ptr<TrackingSetup> fpSetup = nullptr;
125
127
128 // ************************
129 // ** Auxilary variables
130
133
137
139
140 static constexpr bool kDEBUG = false;
141 };
142
143
144} // namespace cbm::algo
Input-output data manager for L1 tracking algorithm.
A QA module for CA tracking (header)
source file for the ca::Track class
Monitor specialization for the tracking algorithm.
ECbmRecoMode
Reconstruct the full time slice or event-by-event.
Definition CbmDefs.h:162
static vector< vector< QAHit > > hits
A structure for reconstructed results: digi-events, hits and tracks.
A configuration reader for the TrackingChain class.
Definitions for tracking in the online reconstruction.
A detector setup interface used for tracking input data initialization (source)
Output_t Run(Input_t recoResults)
Provides action for a given time-slice.
std::shared_ptr< TrackingSetup > fpSetup
setup interface
ca::Framework fCaFramework
CA framework instance.
void RegisterSetup(std::shared_ptr< TrackingSetup > pSetup)
Registers tracking setup.
void ReadHits(PartitionedSpan< const ca::HitTypes_t::at< DetID > > hits)
Reads from different detector subsystems.
TrackingChain(ECbmRecoMode recoMode, const std::unique_ptr< cbm::algo::qa::Manager > &qaManager=nullptr, std::string_view name="")
Constructor from parameters.
Output_t PrepareOutput()
Prepares output data.
ca::TrackingMonitorData fCaMonitorData
CA monitor data object.
ca::Qa fQa
CA QA builder.
void PrepareInput(Input_t recoResults)
Prepares input data.
void Init()
Provides action in the initialization of the run.
ca::DataManager fCaDataManager
CA data manager.
const ca::TrackingMonitor & GetCaMonitor() const
Gets internal monitor.
ca::Vector< std::tuple< ca::EDetectorID, uint32_t, uint32_t > > faHitExternalIndices
External indices of used hits.
TrackingChainConfig fConfig
Tracking config.
ECbmRecoMode fRecoMode
Reconstruction mode.
static constexpr bool kDEBUG
Debug mode.
ca::HitKeyIndex_t fNofHitKeys
Current number of hit keys (aux)
ca::TrackingMonitor fCaMonitor
CA internal monitor (debug purposes)
void Finalize()
Provides action in the end of the run.
ca::DetIdArray_t< bool > fbDetUsed
Flags of detector subsystems used in tracking.
A manager for the input-output data of the CA tracking algorithm.
Class of arrays, which can be accessed by an enum class entry as an index.
A monitor specialization for cbm::algo::ca::Framework class.
unsigned int HitKeyIndex_t
Index of the hit key (e.g. front / back cluster id for STS)
Definition CaHit.h:28
Configuration reader for the TrackingChain class.
Input to the TrackingChain.
PartitionedSpan< trd::Hit > trdHits
PartitionedSpan< sts::Hit > stsHits
PartitionedSpan< tof::Hit > tofHits
Output from the TrackingChain.
ca::Vector< ca::Track > tracks
Reconstructed tracks.
ca::TrackingMonitorData monitorData
Monitor data.
ca::Vector< std::vector< std::pair< uint32_t, uint32_t > > > trdHitIndices
TRD hit indices.
ca::Vector< std::vector< std::pair< uint32_t, uint32_t > > > tofHitIndices
TOF hit indices.
ca::Vector< std::vector< std::pair< uint32_t, uint32_t > > > stsHitIndices
STS hit indices.
std::tuple_element_t< static_cast< std::size_t >(DetID), std::tuple< Types... > > at