CbmRoot
Loading...
Searching...
No Matches
CaTrackingMonitor.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// NOTE: SZh: #prama once does not work properly in ROOT macros, so to use there enums from the header one
11// have to use old approach to protect from multiple includes
12//#pragma once
13
14#ifndef CaTrackingMonitor_h
15#define CaTrackingMonitor_h 1
16
17#include "CaMonitor.h"
18
19#include <boost/serialization/base_object.hpp>
20
21namespace cbm::algo::ca
22{
25 enum class ECounter
26 {
28 SubTS,
29 RecoTrack,
30 RecoHit,
32 Triplet,
33 // TODO: Provide counters vs. detector ID
44 END
45 };
46
49 /* clang-format off */
50 // NOTE: SZh 21.03.2024: Disabling clang-format to indicate the scope of timers using the indent
76 /* clang-format on */
77
79
82 class TrackingMonitor : public Monitor<ECounter, ETimer> {
83 public:
85 TrackingMonitor() : Monitor<ECounter, ETimer>("CA Framework Monitor")
86 {
87 SetCounterName(ECounter::TrackingCall, "full routine calls");
88 SetCounterName(ECounter::RecoTrack, "reco tracks");
91 SetCounterName(ECounter::RecoHitUsed, "used reco hits");
92 SetCounterName(ECounter::SubTS, "sub-timeslices");
93 SetCounterName(ECounter::RecoMvdHit, "MVD hits in tracks");
94 SetCounterName(ECounter::RecoStsHit, "STS hits in tracks");
95 SetCounterName(ECounter::RecoMuchHit, "MUCH hits in tracks");
96 SetCounterName(ECounter::RecoTrdHit, "TRD hits in tracks");
97 SetCounterName(ECounter::RecoTofHit, "TOF hits in tracks");
98 SetCounterName(ECounter::UndefinedMvdHit, "undefined MVD hits");
99 SetCounterName(ECounter::UndefinedStsHit, "undefined STS hits");
100 SetCounterName(ECounter::UndefinedMuchHit, "undefined MuCh hits");
101 SetCounterName(ECounter::UndefinedTrdHit, "undefined TRD hits");
102 SetCounterName(ECounter::UndefinedTofHit, "undefined TOF hits");
103
104 SetTimerName(ETimer::TrackingChain, "tracking chain");
105 SetTimerName(ETimer::PrepareInputData, "input data preparation");
106 SetTimerName(ETimer::Tracking, "algorithm execution");
107 SetTimerName(ETimer::PrepareTimeslice, "timeslice preparation");
108 SetTimerName(ETimer::TrackingThread, "tracking on one thread");
109 SetTimerName(ETimer::PrepareThread, "thread preparation");
110 SetTimerName(ETimer::PrepareWindow, "window preparation");
111 SetTimerName(ETimer::TrackingWindow, "tracking in one window");
112 SetTimerName(ETimer::InitWindow, "window initialization");
113 SetTimerName(ETimer::PrepareGrid, "grid preparation");
114 SetTimerName(ETimer::FindTracks, "track finding");
115 SetTimerName(ETimer::PrepareIteration, "iteration preparation");
116 SetTimerName(ETimer::ConstructTriplets, "triplet constrcution");
117 SetTimerName(ETimer::SearchNeighbours, "neighbors search");
118 SetTimerName(ETimer::CreateTracks, "track creation");
119 SetTimerName(ETimer::SuppressHitKeys, "used hit key suppression");
120 SetTimerName(ETimer::FitTracks, "track fitter");
121 SetTimerName(ETimer::MergeClones, "clone merger");
122 SetTimerName(ETimer::StoreTracksWindow, "track storing in window");
123 SetTimerName(ETimer::StoreTracksFinal, "final track storing");
126 }
127
128 private:
130 template<typename Archive>
131 void serialize(Archive& ar, const unsigned int /*version*/)
132 {
133 ar& boost::serialization::base_object<Monitor<ECounter, ETimer>>(*this);
134 }
135 };
136
137} // namespace cbm::algo::ca
138
139#endif
CA Tracking monitor class.
Monitor class for the CA tracking.
Definition CaMonitor.h:35
void SetCounterName(ECounter key, std::string_view name)
Definition CaMonitor.h:115
void SetTimerName(ETimer key, std::string_view name)
Definition CaMonitor.h:127
void SetRatioKeys(const std::vector< ECounter > &vKeys)
Definition CaMonitor.h:111
A monitor specialization for cbm::algo::ca::Framework class.
TrackingMonitor()
Default constructor.
void serialize(Archive &ar, const unsigned int)
friend class boost::serialization::access
TODO: SZh 8.11.2022: add selection of parameterisation.
Definition CaBranch.h:14
ECounter
Counter keys for the CA algo monitor.
@ RecoMuchHit
number of MUCH hits in tracks
@ RecoHit
number of reconstructed hits
@ RecoTrack
number of reconstructed tracks
@ RecoStsHit
number of STS hits in tracks
@ UndefinedTofHit
number of undefined TOF hits
@ TrackingCall
number of the routine calls
@ Triplet
number of triplets
@ UndefinedTrdHit
number of undefined TRD hits
@ RecoTrdHit
number of TRD hits in tracks
@ UndefinedMvdHit
number of undefined MVD hits
@ SubTS
number of sub time-slices
@ RecoMvdHit
number of MVD hits in tracks
@ RecoTofHit
number of TOF hits in tracks
@ UndefinedMuchHit
number of undefined MuCh hits
@ RecoHitUsed
number of used reconstructed hits
@ UndefinedStsHit
number of undefined STS hits
ETimer
Timer keys for the CA algo monitor.
@ PrepareIteration
(iterations loop)