CbmRoot
Loading...
Searching...
No Matches
much/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_MUCH_RecoSetupUnit_h
11#define ALGO_MUCH_RecoSetupUnit_h 1
12
13#include "CbmDefs.h"
14#include "CbmMuchAddress.h"
16
17#include <boost/serialization/access.hpp>
18
19namespace cbm::algo::much
20{
21 class RecoSetupUnit : public TrackingSetupIfs<RecoSetupUnit> {
22 friend class TrackingSetupIfs<RecoSetupUnit>;
23
24 public:
25 using OffsetContainer_t = std::vector<int>;
26
28 RecoSetupUnit() = default;
29
33 RecoSetupUnit(std::pair<std::vector<GeoVolume>, std::vector<GeoVolume>>&& stationVolumes,
34 OffsetContainer_t&& stationIdOffsets);
35
37 static constexpr std::string_view GetDetectorName() { return "MuCh"; }
38
40 static constexpr ECbmModuleId GetModuleId() { return ECbmModuleId::kMuch; }
41
42 private:
44
51 int ImplGetTrackingStationId(uint32_t address) const
52 {
54 }
55
58 bool ImplIsTimeInfoProvided(int /*stationId*/) const { return true; }
59
63 bool IsInitialized() const;
64
66 template<class Archive>
68 void serialize(Archive& ar, const unsigned int /*version*/)
69 {
70 ar& boost::serialization::base_object<TrackingSetupIfs<RecoSetupUnit>>(*this);
72 }
73 };
74} // namespace cbm::algo::much
75
76
77#endif // ALGO_MUCH_RecoSetupUnit_h
ECbmModuleId
Enumerator for module Identifiers.
Definition CbmDefs.h:45
@ kMuch
Muon detection system.
Definition CbmDefs.h:50
Base class for the detector interface for reconstruction algorithms.
static int32_t GetLayerIndex(int32_t address)
static int32_t GetStationIndex(int32_t address)
int ImplGetTrackingStationId(uint32_t address) const
Returns tracking station index by the much address.
static constexpr std::string_view GetDetectorName()
Name of the detector.
static constexpr ECbmModuleId GetModuleId()
Module ID.
OffsetContainer_t fvStationIdOffsets
Offset of tracking station ID vs MuCh station ID.
bool IsInitialized() const
Validates initialization of the instance.
RecoSetupUnit()=default
Default constructor (note: needed for serialization)
bool ImplIsTimeInfoProvided(int) const
Returns a flag, if time information is provided by the detector.
friend class boost::serialization::access
void serialize(Archive &ar, const unsigned int)
Serialization rule.
std::vector< int > OffsetContainer_t
Container to store MuCh layer offsets.