CbmRoot
Loading...
Searching...
No Matches
mvd/RecoSetupUnit.h
Go to the documentation of this file.
1/* Copyright (C) 2025 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Sergei Zharko [committer] */
4
9
10#ifndef ALGO_MVD_RecoSetupUnit_h
11#define ALGO_MVD_RecoSetupUnit_h 1
12
13#include "CbmDefs.h"
14#include "CbmMvdAddress.h"
16
17#include <boost/serialization/access.hpp>
18
19namespace cbm::algo::mvd
20{
21 class RecoSetupUnit : public TrackingSetupIfs<RecoSetupUnit> {
22 friend class TrackingSetupIfs<RecoSetupUnit>;
23
24 public:
25 using StationIdMap_t = std::vector<int>;
26
28 RecoSetupUnit() = default;
29
33 RecoSetupUnit(std::pair<std::vector<GeoVolume>, std::vector<GeoVolume>>&& stationVolumes,
34 StationIdMap_t&& stationIdMap);
35
37 static constexpr std::string_view GetDetectorName() { return "MVD"; }
38
40 static constexpr ECbmModuleId GetModuleId() { return ECbmModuleId::kMvd; }
41
42 private:
44 // FIXME:
45 // In a time being between the https://git.cbm.gsi.de/computing/cbmroot/-/merge_requests/2187
46 // and the second iteration of the MVD data-classes refactoring, the MVD tracking station ID is mapped on
47 // on the global identifier of an MVD sensor. After the second iteration will be merged, one has to
48 // re-define the ImplGetTrackingStationId function as follows:
49 // int ImplGetTrackingStationId(uint32_t address) const
50 // {
51 // return CbmMvdAddress::GetStationIndex(address);
52 // }
53 //
54 // This should be triggered by the removal of CbmMvdAddress::GetSensorNrFromAddress(uint32_t address) method
55 // from the CbmMvdAddress namespace
56 //
57
61 int ImplGetTrackingStationId(uint32_t address) const
62 {
64 }
65
68 bool ImplIsTimeInfoProvided(int /*stationId*/) const { return true; }
69
73 bool IsInitialized() const;
74
76 template<class Archive>
78 void serialize(Archive& ar, const unsigned int /*version*/)
79 {
80 ar& boost::serialization::base_object<TrackingSetupIfs<RecoSetupUnit>>(*this);
82 }
83 };
84} // namespace cbm::algo::mvd
85
86
87#endif // ALGO_MVD_RecoSetupUnit_h
ECbmModuleId
Enumerator for module Identifiers.
Definition CbmDefs.h:45
@ kMvd
Micro-Vertex Detector.
Definition CbmDefs.h:47
Base class for the detector interface for reconstruction algorithms.
static int32_t GetSensorNrFromAddress(uint32_t address)
int ImplGetTrackingStationId(uint32_t address) const
Returns tracking station index by the MVD address.
StationIdMap_t fvStationIdMap
A map of global index of MVD sensor on the tracking station.
RecoSetupUnit()=default
Default constructor (note: needed for serialization)
bool ImplIsTimeInfoProvided(int) const
Returns a flag, if time information is provided by the detector.
bool IsInitialized() const
Validates initialization of the instance.
void serialize(Archive &ar, const unsigned int)
Serialization rule.
static constexpr ECbmModuleId GetModuleId()
Module ID.
friend class boost::serialization::access
static constexpr std::string_view GetDetectorName()
Name of the detector.