CbmRoot
|
A chain for tracking algorithm. More...
#include <TrackingChain.h>
Classes | |
struct | Input_t |
Input to the TrackingChain. More... | |
struct | Output_t |
Output from the TrackingChain. More... | |
Public Member Functions | |
TrackingChain (std::shared_ptr< HistogramSender > histoSender=nullptr) | |
Constructor from parameters. | |
const ca::TrackingMonitor & | GetCaMonitor () const |
Gets internal monitor. | |
void | Init () |
Provides action in the initialization of the run. | |
void | RegisterSetup (std::shared_ptr< TrackingSetup > pSetup) |
Registers tracking setup. | |
Output_t | Run (Input_t recoResults) |
Provides action for a given time-slice. | |
void | Finalize () |
Provides action in the end of the run. | |
const ChainContext * | GetContext () |
void | SetContext (const ChainContext *ctx) |
const Options & | Opts () const |
const RecoParams & | Params () const |
bool | HasMonitor () const |
Monitor & | GetMonitor () const |
Private Member Functions | |
void | PrepareInput (Input_t recoResults) |
Prepares input data. | |
Output_t | PrepareOutput () |
Prepares output data. | |
template<ca::EDetectorID DetID> | |
void | ReadHits (PartitionedSpan< const ca::HitTypes_t::at< DetID > > hits) |
Reads from different detector subsystems. | |
Private Attributes | |
ca::TrackingMonitor | fCaMonitor {} |
CA internal monitor (debug purposes) | |
ca::TrackingMonitorData | fCaMonitorData {} |
CA monitor data object. | |
ca::Framework | fCaFramework {} |
CA framework instance. | |
ca::DataManager | fCaDataManager {} |
CA data manager. | |
ca::Qa | fQa |
CA QA builder. | |
std::shared_ptr< TrackingSetup > | fpSetup = nullptr |
setup interface | |
ca::DetIdArray_t< bool > | fbDetUsed |
Flags of detector subsystems used in tracking. | |
TrackingChainConfig | fConfig |
Tracking config. | |
ca::HitKeyIndex_t | fNofHitKeys = 0 |
Current number of hit keys (aux) | |
ca::Vector< std::tuple< ca::EDetectorID, uint32_t, uint32_t > > | faHitExternalIndices {"faHitExternalIndices"} |
External indices of used hits. | |
const ChainContext * | fContext = nullptr |
Static Private Attributes | |
static constexpr bool | kDEBUG = false |
Debug mode. | |
A chain for tracking algorithm.
The class executes a tracking algorithm in the online data reconstruction chain.
TrackingChain::TrackingChain | ( | std::shared_ptr< HistogramSender > | histoSender = nullptr | ) |
Constructor from parameters.
histoSender | A shared pointer to a histogram sender |
Definition at line 42 of file TrackingChain.cxx.
void TrackingChain::Finalize | ( | ) |
Provides action in the end of the run.
Definition at line 123 of file TrackingChain.cxx.
References cbm::algo::TrackingChainConfig::fbStoreMonitor, fCaMonitor, fConfig, cbm::algo::TrackingChainConfig::fsMoniOutName, L_, and cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::ToString().
|
inline |
|
inlineinherited |
Definition at line 16 of file SubChain.h.
References cbm::algo::SubChain::fContext.
Referenced by cbm::algo::tof::TrackingInterface::Init(), and cbm::algo::TrackingSetup::Init().
|
inlineinherited |
Definition at line 25 of file SubChain.h.
References cbm::algo::SubChain::fContext, and cbm::algo::SubChain::HasMonitor().
Referenced by cbm::algo::Reco::QueueEvbuildMetrics(), cbm::algo::Reco::QueueProcessingExtraMetrics(), cbm::algo::Reco::QueueProcessingMetrics(), cbm::algo::Reco::QueueStsRecoMetrics(), cbm::algo::Reco::QueueTofCalibMetrics(), cbm::algo::Reco::QueueTofRecoMetrics(), cbm::algo::Reco::QueueTrackingMetrics(), cbm::algo::Reco::QueueTrdRecoMetrics(), and cbm::algo::Reco::QueueUnpackerMetricsDet().
|
inlineinherited |
Definition at line 23 of file SubChain.h.
References cbm::algo::SubChain::fContext.
Referenced by cbm::algo::SubChain::GetMonitor(), cbm::algo::Reco::QueueEvbuildMetrics(), cbm::algo::Reco::QueueProcessingExtraMetrics(), cbm::algo::Reco::QueueProcessingMetrics(), cbm::algo::Reco::QueueStsRecoMetrics(), cbm::algo::Reco::QueueTofCalibMetrics(), cbm::algo::Reco::QueueTofRecoMetrics(), cbm::algo::Reco::QueueTrackingMetrics(), cbm::algo::Reco::QueueTrdRecoMetrics(), and cbm::algo::Reco::QueueUnpackerMetricsDet().
void TrackingChain::Init | ( | ) |
Provides action in the initialization of the run.
Definition at line 46 of file TrackingChain.cxx.
References cbm::algo::ParFiles::ca, fbDetUsed, fCaFramework, fCaMonitor, fConfig, fpSetup, fQa, cbm::algo::TrackingChainConfig::fsGeomConfig, cbm::algo::TrackingChainConfig::fsMainConfig, cbm::algo::TrackingChainConfig::fsSetupFilename, cbm::algo::TrackingChainConfig::fsUserConfig, cbm::algo::openmp::GetMaxThreads(), cbm::algo::ca::Framework::GetParameters(), cbm::algo::Options::Has(), cbm::algo::ca::Framework::Init(), cbm::algo::ca::Qa::Init(), cbm::algo::ca::Qa::IsSenderDefined(), cbm::algo::ca::kDetName, cbm::algo::ca::kMcbm, L_, cbm::algo::ParFiles::mainConfig, cbm::algo::SubChain::Opts(), cbm::algo::Options::ParamsDir(), cbm::algo::yaml::ReadFromFile(), cbm::algo::ca::Framework::ReceiveParameters(), cbm::algo::ca::Qa::RegisterParameters(), cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::Reset(), cbm::algo::ca::InitManager::SetDetectorNames(), and cbm::algo::ca::Framework::SetNofThreads().
|
inlineinherited |
Definition at line 20 of file SubChain.h.
References cbm::algo::SubChain::fContext.
Referenced by cbm::algo::Reco::Finalize(), cbm::algo::Reco::Init(), cbm::algo::tof::TrackingInterface::Init(), Init(), cbm::algo::Reco::PrintTimings(), cbm::algo::Reco::QueueEvbuildMetrics(), cbm::algo::Reco::QueueProcessingExtraMetrics(), cbm::algo::Reco::QueueProcessingMetrics(), cbm::algo::Reco::QueueStsRecoMetrics(), cbm::algo::Reco::QueueTofCalibMetrics(), cbm::algo::Reco::QueueTofRecoMetrics(), cbm::algo::Reco::QueueTrackingMetrics(), cbm::algo::Reco::QueueTrdRecoMetrics(), cbm::algo::Reco::QueueUnpackerMetricsDet(), and cbm::algo::Reco::Run().
|
inlineinherited |
Definition at line 21 of file SubChain.h.
References cbm::algo::SubChain::fContext.
Referenced by cbm::algo::Reco::Init(), and cbm::algo::Reco::Run().
|
private |
Prepares input data.
recoResults | Structure of reconstruction results |
Definition at line 136 of file TrackingChain.cxx.
References faHitExternalIndices, fbDetUsed, fCaDataManager, fCaFramework, fNofHitKeys, cbm::algo::ca::DataManager::GetNofHits(), L_, ReadHits(), cbm::algo::ca::Framework::ReceiveInputData(), cbm::algo::ca::Vector< T >::reserve(), cbm::algo::ca::DataManager::ResetInputData(), cbm::algo::ca::DataManager::SetNhitKeys(), cbm::algo::TrackingChain::Input_t::stsHits, cbm::algo::ca::DataManager::TakeInputData(), cbm::algo::TrackingChain::Input_t::tofHits, and cbm::algo::TrackingChain::Input_t::trdHits.
Referenced by Run().
|
private |
Prepares output data.
Definition at line 161 of file TrackingChain.cxx.
References cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::AddMonitorData(), cbm::algo::ca::Qa::Exec(), faHitExternalIndices, fCaFramework, fCaMonitor, fCaMonitorData, cbm::algo::ca::FindTracks, fQa, cbm::algo::ca::Framework::fRecoHits, cbm::algo::ca::Framework::fRecoTracks, cbm::algo::ca::Monitor< ECounterKey, ETimerKey >::GetCounterValue(), cbm::algo::ca::MonitorData< C, T >::GetCounterValue(), cbm::algo::ca::InputData::GetHit(), cbm::algo::ca::Framework::GetInputData(), cbm::algo::ca::Framework::GetNofThreads(), cbm::algo::ca::MonitorData< C, T >::GetTimer(), cbm::algo::ca::Timer::GetTotal(), cbm::algo::ca::Hit::Id(), cbm::algo::ca::MonitorData< C, T >::IncrementCounter(), cbm::algo::ca::Qa::IsSenderDefined(), kDEBUG, cbm::algo::ca::kSts, cbm::algo::ca::kTof, cbm::algo::ca::kTrd, L_, cbm::algo::TrackingChain::Output_t::monitorData, cbm::algo::ca::Vector< T >::push_back(), cbm::algo::ca::Qa, cbm::algo::ca::RecoStsHit, cbm::algo::ca::RecoTofHit, cbm::algo::ca::RecoTrack, cbm::algo::ca::RecoTrdHit, cbm::algo::ca::Qa::RegisterInputData(), cbm::algo::ca::Qa::RegisterRecoHitIndices(), cbm::algo::ca::Qa::RegisterTracks(), cbm::algo::ca::Vector< T >::reset(), cbm::algo::ca::MonitorData< C, T >::StartTimer(), cbm::algo::ca::MonitorData< C, T >::StopTimer(), cbm::algo::TrackingChain::Output_t::stsHitIndices, cbm::algo::TrackingChain::Output_t::tofHitIndices, cbm::algo::ca::TrackingCall, cbm::algo::ca::TrackingChain, cbm::algo::TrackingChain::Output_t::tracks, and cbm::algo::TrackingChain::Output_t::trdHitIndices.
Referenced by Run().
|
private |
Reads from different detector subsystems.
DetID | Detector ID |
hits | Hits vector |
FIXME: Define ranges from the hit, when will be available
Definition at line 234 of file TrackingChain.cxx.
References cbm::algo::ca::Hit::BackKey(), cbm::algo::ca::Hit::Check(), faHitExternalIndices, fCaDataManager, fCaFramework, fCaMonitorData, fNofHitKeys, fpSetup, cbm::algo::ca::Hit::FrontKey(), cbm::algo::ca::DataManager::GetNofHits(), cbm::algo::ca::Framework::GetParameters(), hits, cbm::algo::ca::MonitorData< C, T >::IncrementCounter(), cbm::algo::ca::kDetName, L_, cbm::algo::ca::Vector< T >::push_back(), cbm::algo::ca::DataManager::PushBackHit(), cbm::algo::ca::Hit::SetBackKey(), cbm::algo::ca::Hit::SetDt2(), cbm::algo::ca::Hit::SetDx2(), cbm::algo::ca::Hit::SetDxy(), cbm::algo::ca::Hit::SetDy2(), cbm::algo::ca::Hit::SetFrontKey(), cbm::algo::ca::Hit::SetId(), cbm::algo::ca::Hit::SetRangeT(), cbm::algo::ca::Hit::SetRangeX(), cbm::algo::ca::Hit::SetRangeY(), cbm::algo::ca::Hit::SetStation(), cbm::algo::ca::Hit::SetT(), cbm::algo::ca::Hit::SetX(), cbm::algo::ca::Hit::SetY(), cbm::algo::ca::Hit::SetZ(), sqrt(), cbm::algo::ca::Hit::T(), cbm::algo::ca::ToFlesSubsystem(), cbm::algo::ca::UndefinedMuchHit, cbm::algo::ca::UndefinedMvdHit, cbm::algo::ca::UndefinedStsHit, cbm::algo::ca::UndefinedTofHit, and cbm::algo::ca::UndefinedTrdHit.
Referenced by PrepareInput().
|
inline |
TrackingChain::Output_t TrackingChain::Run | ( | Input_t | recoResults | ) |
Provides action for a given time-slice.
recoResults | Structure of reconstruction results |
Definition at line 101 of file TrackingChain.cxx.
References fCaFramework, fCaMonitorData, cbm::algo::ca::Framework::FindTracks(), cbm::algo::ca::Framework::GetMonitorData(), PrepareInput(), cbm::algo::ca::PrepareInputData, PrepareOutput(), cbm::algo::ca::MonitorData< C, T >::Reset(), cbm::algo::ca::Framework::SetMonitorData(), cbm::algo::ca::MonitorData< C, T >::StartTimer(), cbm::algo::ca::MonitorData< C, T >::StopTimer(), and cbm::algo::ca::TrackingChain.
|
inlineinherited |
Definition at line 18 of file SubChain.h.
References cbm::algo::SubChain::fContext.
Referenced by cbm::algo::Reco::Init(), and cbm::algo::TrackingSetup::Init().
|
private |
External indices of used hits.
Definition at line 128 of file TrackingChain.h.
Referenced by PrepareInput(), PrepareOutput(), and ReadHits().
|
private |
Flags of detector subsystems used in tracking.
Definition at line 118 of file TrackingChain.h.
Referenced by Init(), and PrepareInput().
|
private |
CA data manager.
Definition at line 113 of file TrackingChain.h.
Referenced by PrepareInput(), and ReadHits().
|
private |
CA framework instance.
Definition at line 112 of file TrackingChain.h.
Referenced by Init(), PrepareInput(), PrepareOutput(), ReadHits(), and Run().
|
private |
CA internal monitor (debug purposes)
Definition at line 110 of file TrackingChain.h.
Referenced by Finalize(), GetCaMonitor(), Init(), and PrepareOutput().
|
private |
CA monitor data object.
Definition at line 111 of file TrackingChain.h.
Referenced by PrepareOutput(), ReadHits(), and Run().
|
private |
Tracking config.
Definition at line 123 of file TrackingChain.h.
Referenced by Finalize(), and Init().
|
privateinherited |
Definition at line 34 of file SubChain.h.
Referenced by cbm::algo::SubChain::GetContext(), cbm::algo::SubChain::GetMonitor(), cbm::algo::SubChain::HasMonitor(), cbm::algo::SubChain::Opts(), cbm::algo::SubChain::Params(), and cbm::algo::SubChain::SetContext().
|
private |
Current number of hit keys (aux)
Definition at line 124 of file TrackingChain.h.
Referenced by PrepareInput(), and ReadHits().
|
private |
setup interface
Definition at line 116 of file TrackingChain.h.
Referenced by Init(), ReadHits(), and RegisterSetup().
|
private |
CA QA builder.
Definition at line 114 of file TrackingChain.h.
Referenced by Init(), and PrepareOutput().
|
staticconstexprprivate |