CbmRoot
Loading...
Searching...
No Matches
TrackingChain.h
Go to the documentation of this file.
1/* Copyright (C) 2023 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 "HistogramSender.h"
19#include "PartitionedSpan.h"
20#include "RecoResults.h"
21#include "SubChain.h"
22#include "TrackingChainConfig.h"
23#include "TrackingDefs.h"
24#include "TrackingSetup.h"
25#include "sts/Hit.h"
26#include "tof/Hit.h"
27
28#include <memory>
29#include <vector>
30
31namespace cbm::algo
32{
37 class TrackingChain : public SubChain {
38 public:
41 TrackingChain(std::shared_ptr<HistogramSender> histoSender = nullptr);
42
50
72
74 const ca::TrackingMonitor& GetCaMonitor() const { return fCaMonitor; }
75
77 void Init();
78
80 void RegisterSetup(std::shared_ptr<TrackingSetup> pSetup) { fpSetup = pSetup; }
81
85 Output_t Run(Input_t recoResults);
86
88 void Finalize();
89
90 private:
91 // *********************
92 // ** Utility functions
93
96 void PrepareInput(Input_t recoResults);
97
99 Output_t PrepareOutput();
100
104 template<ca::EDetectorID DetID>
106
107 // *************************
108 // ** Framework variables
109
115
116 std::shared_ptr<TrackingSetup> fpSetup = nullptr;
117
119
120 // ************************
121 // ** Auxilary variables
122
125
129
130 static constexpr bool kDEBUG = false;
131 };
132
133
134} // 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.
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.
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.
TrackingChain(std::shared_ptr< HistogramSender > histoSender=nullptr)
Constructor from parameters.
ca::Vector< std::tuple< ca::EDetectorID, uint32_t, uint32_t > > faHitExternalIndices
External indices of used hits.
TrackingChainConfig fConfig
Tracking config.
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