CbmRoot
Loading...
Searching...
No Matches
much/RecoSetupUnit.cxx
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
11
12#include <limits>
13#include <unordered_set>
14
16
17// ---------------------------------------------------------------------------------------------------------------------
18//
19RecoSetupUnit::RecoSetupUnit(std::pair<std::vector<GeoVolume>, std::vector<GeoVolume>>&& stationVolumes,
20 OffsetContainer_t&& stationIdOffsets)
21 : TrackingSetupIfs<RecoSetupUnit>(std::move(stationVolumes))
22 , fvStationIdOffsets(std::move(stationIdOffsets))
23{
24}
25
26// ---------------------------------------------------------------------------------------------------------------------
27//
29{
30 // MuCh tracking detector is initialized, if:
31 // - fvStationIdOffsets has elements
32 // - fvStationIdOffsets.front() == 0 and fvStationIdOffsets.back() == GetNofTrackingStations()
33
34 bool res = true;
35 if (!fvStationIdOffsets.size()) {
36 LOG(error) << "\t - station ID offset container is empty";
37 res = false;
38 }
39
40 if (fvStationIdOffsets.front() != 0) {
41 LOG(error) << "\t - the first station ID offset must be 0";
42 res = false;
43 }
44
46 LOG(error) << "\t - the last station ID offset must be equal to number of stations from geometry ("
47 << GetNofTrackingStations() << ")";
48 res = false;
49 }
50
51 return res;
52}
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)
std::vector< int > OffsetContainer_t
Container to store MuCh layer offsets.
MuCh representation for tracking.
Hash for CbmL1LinkKey.